From d8ba4fde1b1b428107fec9c398ad29798037699a Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sun, 23 Aug 2015 16:33:25 +0000 Subject: [PATCH] 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 --- src/wp-includes/link-template.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/wp-includes/link-template.php b/src/wp-includes/link-template.php index 498585fbdb..2a1c7b2382 100644 --- a/src/wp-includes/link-template.php +++ b/src/wp-includes/link-template.php @@ -2423,6 +2423,17 @@ function _navigation_markup( $links, $class = 'posts-navigation', $screen_reader '; + /** + * 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 ); }