[ Index ] |
PHP Cross Reference of WordPress |
[Source view] [Print] [Project Stats]
WordPress Customize Nav Menus classes
File Size: | 1586 lines (57 kb) |
Included or required: | 1 time |
Referenced: | 0 times |
Includes or requires: | 0 files |
__construct( $manager ) X-Ref |
Constructor. param: WP_Customize_Manager $manager Customizer bootstrap instance. since: 4.3.0 |
filter_nonces( $nonces ) X-Ref |
Adds a nonce for customizing menus. param: string[] $nonces Array of nonces. return: string[] Modified array of nonces. since: 4.5.0 |
ajax_load_available_items() X-Ref |
Ajax handler for loading available menu items. since: 4.3.0 |
load_available_items_query( $object_type = 'post_type', $object_name = 'page', $page = 0 ) X-Ref |
Performs the post_type and taxonomy queries for loading available menu items. param: string $object_type Optional. Accepts any custom object type and has built-in support for param: string $object_name Optional. Accepts any registered taxonomy or post type name. Default is 'page'. param: int $page Optional. The page number used to generate the query offset. Default is '0'. return: array|WP_Error An array of menu items on success, a WP_Error object on failure. since: 4.3.0 |
ajax_search_available_items() X-Ref |
Ajax handler for searching available menu items. since: 4.3.0 |
search_available_items_query( $args = array() X-Ref |
Performs post queries for available-item searching. Based on WP_Editor::wp_link_query(). param: array $args Optional. Accepts 'pagenum' and 's' (search) arguments. return: array Menu items. since: 4.3.0 |
enqueue_scripts() X-Ref |
Enqueues scripts and styles for Customizer pane. since: 4.3.0 |
filter_dynamic_setting_args( $setting_args, $setting_id ) X-Ref |
Filters a dynamic setting's constructor args. For a dynamic setting to be registered, this filter must be employed to override the default false value with an array of args to pass to the WP_Customize_Setting constructor. param: false|array $setting_args The arguments to the WP_Customize_Setting constructor. param: string $setting_id ID for dynamic setting, usually coming from `$_POST['customized']`. return: array|false since: 4.3.0 |
filter_dynamic_setting_class( $setting_class, $setting_id, $setting_args ) X-Ref |
Allows non-statically created settings to be constructed with custom WP_Customize_Setting subclass. param: string $setting_class WP_Customize_Setting or a subclass. param: string $setting_id ID for dynamic setting, usually coming from `$_POST['customized']`. param: array $setting_args WP_Customize_Setting or a subclass. return: string since: 4.3.0 |
customize_register() X-Ref |
Adds the customizer settings and controls. since: 4.3.0 |
intval_base10( $value ) X-Ref |
Gets the base10 intval. This is used as a setting's sanitize_callback; we can't use just plain intval because the second argument is not what intval() expects. param: mixed $value Number to convert. return: int Integer. since: 4.3.0 |
available_item_types() X-Ref |
Returns an array of all the available item types. return: array The available menu item types. since: 4.3.0 since: 4.7.0 Each array item now includes a `$type_label` in addition to `$title`, `$type`, and `$object`. |
insert_auto_draft_post( $postarr ) X-Ref |
Adds a new `auto-draft` post. param: array $postarr { return: WP_Post|WP_Error Inserted auto-draft post object or error. since: 4.7.0 |
ajax_insert_auto_draft_post() X-Ref |
Ajax handler for adding a new auto-draft post. since: 4.7.0 |
print_templates() X-Ref |
Prints the JavaScript templates used to render Menu Customizer components. Templates are imported into the JS use wp.template. since: 4.3.0 |
available_items_template() X-Ref |
Prints the HTML template used to render the add-menu-item frame. since: 4.3.0 |
print_post_type_container( $available_item_type ) X-Ref |
Prints the markup for new menu items. To be used in the template #available-menu-items. param: array $available_item_type Menu item data to output, including title, type, and label. since: 4.7.0 |
print_custom_links_available_menu_item() X-Ref |
Prints the markup for available menu item custom links. since: 4.7.0 |
customize_dynamic_partial_args( $partial_args, $partial_id ) X-Ref |
Filters arguments for dynamic nav_menu selective refresh partials. param: array|false $partial_args Partial args. param: string $partial_id Partial ID. return: array Partial args. since: 4.5.0 |
customize_preview_init() X-Ref |
Adds hooks for the Customizer preview. since: 4.3.0 |
make_auto_draft_status_previewable() X-Ref |
Makes the auto-draft status protected so that it can be queried. since: 4.7.0 |
sanitize_nav_menus_created_posts( $value ) X-Ref |
Sanitizes post IDs for posts created for nav menu items to be published. param: array $value Post IDs. return: array Post IDs. since: 4.7.0 |
save_nav_menus_created_posts( $setting ) X-Ref |
Publishes the auto-draft posts that were created for nav menu items. The post IDs will have been sanitized by already by `WP_Customize_Nav_Menu_Items::sanitize_nav_menus_created_posts()` to remove any post IDs for which the user cannot publish or for which the post is not an auto-draft. param: WP_Customize_Setting $setting Customizer setting object. since: 4.7.0 |
filter_wp_nav_menu_args( $args ) X-Ref |
Keeps track of the arguments that are being passed to wp_nav_menu(). param: array $args An array containing wp_nav_menu() arguments. return: array Arguments. since: 4.3.0 |
filter_wp_nav_menu( $nav_menu_content, $args ) X-Ref |
Prepares wp_nav_menu() calls for partial refresh. Injects attributes into container element. param: string $nav_menu_content The HTML content for the navigation menu. param: object $args An object containing wp_nav_menu() arguments. return: string Nav menu HTML with selective refresh attributes added if partial can be refreshed. since: 4.3.0 |
hash_nav_menu_args( $args ) X-Ref |
Hashes (hmac) the nav menu arguments to ensure they are not tampered with when submitted in the Ajax request. Note that the array is expected to be pre-sorted. param: array $args The arguments to hash. return: string Hashed nav menu arguments. since: 4.3.0 |
customize_preview_enqueue_deps() X-Ref |
Enqueues scripts for the Customizer preview. since: 4.3.0 |
export_preview_data() X-Ref |
Exports data from PHP to JS. since: 4.3.0 |
export_partial_rendered_nav_menu_instances( $response ) X-Ref |
Exports any wp_nav_menu() calls during the rendering of any partials. param: array $response Response. return: array Response. since: 4.5.0 |
render_nav_menu_partial( $partial, $nav_menu_args ) X-Ref |
Renders a specific menu via wp_nav_menu() using the supplied arguments. param: WP_Customize_Partial $partial Partial. param: array $nav_menu_args Nav menu args supplied as container context. return: string|false since: 4.3.0 |
Generated: Sun Dec 22 01:00:02 2024 | Cross-referenced by PHPXref 0.7.1 |