Posts, Post Types: Introduce a filter paginate_links() output.

Props sabernhardt, audrasjb, re.ardestani.
Fixes #44018.

git-svn-id: https://develop.svn.wordpress.org/trunk@49976 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2021-01-18 12:05:06 +00:00
parent fa7f87b546
commit ca5538dda3

View File

@ -4111,7 +4111,7 @@ function language_attributes( $doctype = 'html' ) {
}
/**
* Retrieve paginated link for archive post pages.
* Retrieves paginated links for archive post pages.
*
* Technically, the function can be used to create paginated link list for any
* area. The 'base' argument is used to reference the url, which will be used to
@ -4357,6 +4357,16 @@ function paginate_links( $args = '' ) {
break;
}
/**
* Filters the HTML output of paginated links for archives.
*
* @since 5.7.0
*
* @param string $r HTML output.
* @param array $args An array of arguments. See paginate_links() for accepted arguments.
*/
$r = apply_filters( 'paginate_links_output', $r, $args );
return $r;
}