Add a filter to _navigation_markup: 'navigation_markup_template'
Props joedolson, mordauk. Fixes #31315. Built from https://develop.svn.wordpress.org/trunk@33714 git-svn-id: http://core.svn.wordpress.org/trunk@33681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -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 );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user