Docs: Add a description and example to the hook docs for the navigation_markup_template filter, introduced in [33714].

Since the value of the filter is passed through `sprintf()` it's important to note that any filtered output needs to contain the expected specifiers.

See #31315.


git-svn-id: https://develop.svn.wordpress.org/trunk@33717 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Drew Jaynes 2015-08-23 18:07:41 +00:00
parent 3969554606
commit 83476bb77f

View File

@ -2426,10 +2426,19 @@ function _navigation_markup( $links, $class = 'posts-navigation', $screen_reader
/**
* Filter the navigation markup template.
*
* Note: The filtered template HTML must contain specifiers for the navigation
* class (%1$s), the screen-reader-text value (%2$s), and placement of the
* navigation links (%3$s):
*
* <nav class="navigation %1$s" role="navigation">
* <h2 class="screen-reader-text">%2$s</h2>
* <div class="nav-links">%3$s</div>
* </nav>
*
* @since 4.4.0
*
* @param string $template The default template
* @param string $class The class passed by the calling function.
* @param string $template The default template.
* @param string $class The class passed by the calling function.
* @return string Navigation template.
*/
$template = apply_filters( 'navigation_markup_template', $template, $class );