wppaste
WordPress

apply_filters( 'navigation_markup_template', string $template, string $css_class )

Since
4.4.0
Filters the navigation markup template.

Description

Note: The filtered template HTML must contain specifiers for the navigation class (%1$s), the screen-reader-text value (%2$s), placement of the navigation links (%3$s), and ARIA label text if screen-reader-text does not fit that (%4$s):

<nav class="navigation %1$s" aria-label="%4$s">
 <h2 class="screen-reader-text">%2$s</h2>
 <div class="nav-links">%3$s</div>
</nav>

Compatibility

WordPress
since 4.4.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Parameters

$templatestring
The default template.
$css_classstring
The class passed by the calling function.

Where this hook fires · 1

  • wp-includes/link-template.php:3064_navigation_markup()

Source code

	 *	 * @since 4.4.0	 *	 * @param string $template  The default template.	 * @param string $css_class The class passed by the calling function.	 */	$template = apply_filters( 'navigation_markup_template', $template, $css_class ); 	return sprintf( $template, sanitize_html_class( $css_class ), esc_html( $screen_reader_text ), $links, esc_attr( $aria_label ) );} /** * Retrieves the comments page number link.

Changelog

Introduced in 4.4.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.