General: Add wp_get_archives_args filter to wp_get_archives().

Developed in https://github.com/WordPress/wordpress-develop/pull/10552

Props jeherve, westonruter.
Fixes #64304.

Built from https://develop.svn.wordpress.org/trunk@61326


git-svn-id: http://core.svn.wordpress.org/trunk@60638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter
2025-11-30 17:41:34 +00:00
parent 588188b2c6
commit 5a94066473
2 changed files with 12 additions and 1 deletions

View File

@@ -2018,6 +2018,17 @@ function wp_get_archives( $args = '' ) {
'w' => get_query_var( 'w' ),
);
/**
* Filters the arguments for displaying archive links.
*
* @since 7.0.0
*
* @see wp_get_archives()
*
* @param array<string, string|int|bool> $args Arguments.
*/
$args = apply_filters( 'wp_get_archives_args', $args );
$parsed_args = wp_parse_args( $args, $defaults );
$post_type_object = get_post_type_object( $parsed_args['post_type'] );

View File

@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '7.0-alpha-61325';
$wp_version = '7.0-alpha-61326';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.