PHP 클래스 Mlp_Nav_Menu_Frontend

파일 보기 프로젝트 열기: inpsyde/multilingual-press

공개 메소드들

메소드 설명
__construct ( string $meta_key, Mlp_Language_Api_Interface $language_api ) Constructor.
filter_items ( array $items ) : WP_Post[] Filters the nav menu items.
maybe_delete_obsolete_item ( WP_Post $item ) : boolean Checks if the site with the given post's remote site ID still exists, and deletes the post if not.

비공개 메소드들

메소드 설명
get_item_details ( array $translations, integer $site_id ) : array Returns the remote URL and the translation object for the according item.
get_site_id ( WP_Post $item ) : integer Returns the site ID for the given nav menu item object.
prepare_item ( WP_Post $item, array $translations ) : void Assigns the remote URL and fires an action hook.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( string $meta_key, Mlp_Language_Api_Interface $language_api )
$meta_key string The site ID meta key.
$language_api Mlp_Language_Api_Interface The language API.

filter_items() 공개 메소드

Filters the nav menu items.
public filter_items ( array $items ) : WP_Post[]
$items array Nav menu items.
리턴 WP_Post[]

maybe_delete_obsolete_item() 공개 메소드

Checks if the site with the given post's remote site ID still exists, and deletes the post if not.
public maybe_delete_obsolete_item ( WP_Post $item ) : boolean
$item WP_Post Nav menu item.
리턴 boolean