Add a filter to _navigation_markup: 'navigation_markup_template'

Props joedolson, mordauk.
Fixes #31315.


git-svn-id: https://develop.svn.wordpress.org/trunk@33714 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2015-08-23 16:33:25 +00:00
parent 9596ae0993
commit d8ba4fde1b

View File

@@ -2423,6 +2423,17 @@ function _navigation_markup( $links, $class = 'posts-navigation', $screen_reader
<div class="nav-links">%3$s</div>
</nav>';
/**
* Filter the navigation markup template.
*
* @since 4.4.0
*
* @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 );
return sprintf( $template, sanitize_html_class( $class ), esc_html( $screen_reader_text ), $links );
}