WPDev.one
Core Class

WP_Customize_Nav_Menus

class WP_Customize_Nav_Menus // Constructor: function Object() { [native code] }

Customize Nav Menus class.

Methods 30 methods

Method / Return Description
__construct()
void

Constructor.

Parameters: $manager: mixed
filter_nonces()
string[]

Adds a nonce for customizing menus.

Parameters: $nonces: mixed
ajax_load_available_items()
void

Ajax handler for loading available menu items.

load_available_items_query()
(array

Performs the post_type and taxonomy queries for loading available menu items.

Parameters: $object_type: mixed, $object_name: mixed, $page: mixed
ajax_search_available_items()
void

Ajax handler for searching available menu items.

search_available_items_query()
array

Performs post queries for available-item searching.

Parameters: $args: mixed
enqueue_scripts()
void

Enqueues scripts and styles for Customizer pane.

filter_dynamic_setting_args()
(array

Filters a dynamic setting's constructor args.

Parameters: $setting_args: mixed, $setting_id: mixed
filter_dynamic_setting_class()
string

Allows non-statically created settings to be constructed with custom WP_Customize_Setting subclass.

Parameters: $setting_class: mixed, $setting_id: mixed, $setting_args: mixed
customize_register()
void

Adds the customizer settings and controls.

intval_base10()
int

Gets the base10 intval.

Parameters: $value: mixed
available_item_types()
array

Returns an array of all the available item types.

insert_auto_draft_post()
(WP_Post

Adds a new `auto-draft` post.

Parameters: $postarr: mixed
ajax_insert_auto_draft_post()
void

Ajax handler for adding a new auto-draft post.

print_templates()
void

Prints the JavaScript templates used to render Menu Customizer components.

available_items_template()
void

Prints the HTML template used to render the add-menu-item frame.

print_post_type_container()
void

Prints the markup for new menu items.

Parameters: $available_item_type: mixed
print_custom_links_available_menu_item()
void

Prints the markup for available menu item custom links.

customize_dynamic_partial_args()
array

Filters arguments for dynamic nav_menu selective refresh partials.

Parameters: $partial_args: mixed, $partial_id: mixed
customize_preview_init()
void

Adds hooks for the Customizer preview.

make_auto_draft_status_previewable()
void

Makes the auto-draft status protected so that it can be queried.

sanitize_nav_menus_created_posts()
array

Sanitizes post IDs for posts created for nav menu items to be published.

Parameters: $value: mixed
save_nav_menus_created_posts()
void

Publishes the auto-draft posts that were created for nav menu items.

Parameters: $setting: mixed
filter_wp_nav_menu_args()
array

Keeps track of the arguments that are being passed to wp_nav_menu().

Parameters: $args: mixed
filter_wp_nav_menu()
string

Prepares wp_nav_menu() calls for partial refresh.

Parameters: $nav_menu_content: mixed, $args: mixed
hash_nav_menu_args()
string

Hashes (hmac) the nav menu arguments to ensure they are not tampered with when

Parameters: $args: mixed
customize_preview_enqueue_deps()
void

Enqueues scripts for the Customizer preview.

export_preview_data()
void

Exports data from PHP to JS.

export_partial_rendered_nav_menu_instances()
array

Exports any wp_nav_menu() calls during the rendering of any partials.

Parameters: $response: mixed
render_nav_menu_partial()
(string

Renders a specific menu via wp_nav_menu() using the supplied arguments.

Parameters: $partial: mixed, $nav_menu_args: mixed

Properties

Property / Type Description
$manager
mixed
public
No description available.
$original_nav_menu_locations
mixed
public
No description available.
$preview_nav_menu_instance_args
mixed
public
No description available.

Class Information

Since Version
4.3.0
Source File
wp-includes/class-wp-customize-nav-menus.php
Advertisement