Summery Summery
Prepares wp_nav_menu() calls for partial refresh.
Syntax Syntax
Description Description
Injects attributes into container element.
Parameters Parameters
- $nav_menu_content
-
(Required) The HTML content for the navigation menu.
- $args
-
(Required) An object containing wp_nav_menu() arguments.
Return Return
(string) Nav menu HTML with selective refresh attributes added if partial can be refreshed.
Source Source
File: wp-includes/class-wp-customize-nav-menus.php
* selective refreshed if... */ $can_partial_refresh = ( // ...if wp_nav_menu() is directly echoing out the menu (and thus isn't manipulating the string after generated), ! empty( $args['echo'] ) && // ...and if the fallback_cb can be serialized to JSON, since it will be included in the placement context data, ( empty( $args['fallback_cb'] ) || is_string( $args['fallback_cb'] ) ) &&
Advertisement
Changelog Changelog
Version | Description |
---|---|
4.3.0 | Introduced. |