[ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Source view] [Print] [Project Stats]
WordPress Customize Nav Menus classes
File Size: | 1599 lines (57 kb) |
Included or required: | 1 time |
Referenced: | 0 times |
Includes or requires: | 1 file wp-admin/includes/template.php |
__construct( $manager ) X-Ref |
Constructor. param: WP_Customize_Manager $manager Customizer bootstrap instance. |
filter_nonces( $nonces ) X-Ref |
Adds a nonce for customizing menus. param: string[] $nonces Array of nonces. return: string[] Modified array of nonces. |
ajax_load_available_items() X-Ref |
Ajax handler for loading available menu items. |
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. |
ajax_search_available_items() X-Ref |
Ajax handler for searching available menu items. |
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. |
enqueue_scripts() X-Ref |
Enqueues scripts and styles for Customizer pane. |
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 |
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 |
customize_register() X-Ref |
Adds the customizer settings and controls. |
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. |
available_item_types() X-Ref |
Returns an array of all the available item types. return: array The available menu item types. |
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. |
ajax_insert_auto_draft_post() X-Ref |
Ajax handler for adding a new auto-draft post. |
print_templates() X-Ref |
Prints the JavaScript templates used to render Menu Customizer components. Templates are imported into the JS use wp.template. |
available_items_template() X-Ref |
Prints the HTML template used to render the add-menu-item frame. |
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. |
print_custom_links_available_menu_item() X-Ref |
Prints the markup for available menu item custom links. |
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. |
customize_preview_init() X-Ref |
Adds hooks for the Customizer preview. |
make_auto_draft_status_previewable() X-Ref |
Makes the auto-draft status protected so that it can be queried. |
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. |
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. |
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. |
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. |
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. |
customize_preview_enqueue_deps() X-Ref |
Enqueues scripts for the Customizer preview. |
export_preview_data() X-Ref |
Exports data from PHP to JS. |
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. |
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 |
Generated : Thu Nov 21 08:20:01 2024 | Cross-referenced by PHPXref |