Méthode | Description | |
---|---|---|
__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. |
Méthode | Description | |
---|---|---|
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. |
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. |
public filter_items ( array $items ) : WP_Post[] | ||
$items | array | Nav menu items. |
Résultat | WP_Post[] |
public maybe_delete_obsolete_item ( WP_Post $item ) : boolean | ||
$item | WP_Post | Nav menu item. |
Résultat | boolean |