Merge pull request #1967 from IanDelMar/deprecate-link-pages-args

Deprecate understrap_link_pages_args filter hook
This commit is contained in:
Brian Coords 2023-10-11 07:14:54 -07:00 committed by GitHub
commit 1c8ea76098
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 20 additions and 6 deletions

View File

@ -322,16 +322,30 @@ if ( ! function_exists( 'understrap_link_pages' ) ) {
*
* @since 1.0.0
*
* @link https://developer.wordpress.org/reference/functions/wp_link_pages/
*
* @return void|string Formatted output in HTML.
*/
function understrap_link_pages() {
$args = apply_filters(
'understrap_link_pages_args',
array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'understrap' ),
'after' => '</div>',
)
$args = array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'understrap' ),
'after' => '</div>',
);
/**
* Filters the arguments used in retrieving page links for paginated posts.
*
* Runs before the 'wp_link_pages_args' hook.
*
* @since 1.0.0
*/
$args = apply_filters_deprecated(
'understrap_link_pages_args',
array( $args ),
'1.2.3',
'wp_link_pages_args'
);
wp_link_pages( $args );
}
}