PHP Class Mlp_Language_Nav_Menu_Data

Inheritance: implements Mlp_Nav_Menu_Selector_Data_Interface
Mostra file Open project: inpsyde/multilingual-press

Public Methods

Method Description
__construct ( string $handle, string $meta_key, Inpsyde\MultilingualPress\Common\Nonce\Nonce $nonce, AssetManager $asset_manager ) Constructor.
get_ajax_menu_items ( ) : array AJAX handler.
get_button_id ( ) : string
get_list ( ) : array
get_list_id ( ) : string
has_menu ( ) : boolean
is_allowed ( ) : boolean Is the AJAX request allowed and should be processed?
load_script ( string $hook ) : void
register_script ( ) : void

Private Methods

Method Description
create_menu_item ( $titles, $blog_id ) : null | WP_Post Insert item into database.
is_valid_blog_id ( array $titles, integer $blog_id ) : boolean Check if a blog id is for a linked, existing blog.
prepare_menu_items ( array $titles ) : array
set_menu_item_meta ( WP_Post $menu_item, integer $blog_id ) : WP_Post Set item meta data.

Method Details

__construct() public method

Constructor.
public __construct ( string $handle, string $meta_key, Inpsyde\MultilingualPress\Common\Nonce\Nonce $nonce, AssetManager $asset_manager )
$handle string
$meta_key string
$nonce Inpsyde\MultilingualPress\Common\Nonce\Nonce
$asset_manager Inpsyde\MultilingualPress\Asset\AssetManager

get_ajax_menu_items() public method

Called by the view. The 'exit' is handled there.
public get_ajax_menu_items ( ) : array
return array

get_button_id() public method

public get_button_id ( ) : string
return string

get_list() public method

public get_list ( ) : array
return array

get_list_id() public method

public get_list_id ( ) : string
return string

has_menu() public method

public has_menu ( ) : boolean
return boolean

is_allowed() public method

Is the AJAX request allowed and should be processed?
public is_allowed ( ) : boolean
return boolean

load_script() public method

public load_script ( string $hook ) : void
$hook string
return void

register_script() public method

public register_script ( ) : void
return void