diff --git a/wp-includes/sitemaps/providers/class-wp-sitemaps-posts.php b/wp-includes/sitemaps/providers/class-wp-sitemaps-posts.php index c9d982ddce..701d170a6a 100644 --- a/wp-includes/sitemaps/providers/class-wp-sitemaps-posts.php +++ b/wp-includes/sitemaps/providers/class-wp-sitemaps-posts.php @@ -148,15 +148,20 @@ class WP_Sitemaps_Posts extends WP_Sitemaps_Provider { * Gets the max number of pages available for the object type. * * @since 5.5.0 + * @since 5.9.0 Renamed `$post_type` to `$object_subtype` to match parent class + * for PHP 8 named parameter support. * - * @param string $post_type Optional. Post type name. Default empty. + * @param string $object_subtype Optional. Post type name. Default empty. * @return int Total number of pages. */ - public function get_max_num_pages( $post_type = '' ) { - if ( empty( $post_type ) ) { + public function get_max_num_pages( $object_subtype = '' ) { + if ( empty( $object_subtype ) ) { return 0; } + // Restores the more descriptive, specific name for use within this method. + $post_type = $object_subtype; + /** * Filters the max number of pages before it is generated. * diff --git a/wp-includes/sitemaps/providers/class-wp-sitemaps-taxonomies.php b/wp-includes/sitemaps/providers/class-wp-sitemaps-taxonomies.php index f5b6bb631a..636815397e 100644 --- a/wp-includes/sitemaps/providers/class-wp-sitemaps-taxonomies.php +++ b/wp-includes/sitemaps/providers/class-wp-sitemaps-taxonomies.php @@ -134,15 +134,20 @@ class WP_Sitemaps_Taxonomies extends WP_Sitemaps_Provider { * Gets the max number of pages available for the object type. * * @since 5.5.0 + * @since 5.9.0 Renamed `$taxonomy` to `$object_subtype` to match parent class + * for PHP 8 named parameter support. * - * @param string $taxonomy Taxonomy name. + * @param string $object_subtype Optional. Taxonomy name. Default empty. * @return int Total number of pages. */ - public function get_max_num_pages( $taxonomy = '' ) { - if ( empty( $taxonomy ) ) { + public function get_max_num_pages( $object_subtype = '' ) { + if ( empty( $object_subtype ) ) { return 0; } + // Restores the more descriptive, specific name for use within this method. + $taxonomy = $object_subtype; + /** * Filters the max number of pages before it is generated. * diff --git a/wp-includes/version.php b/wp-includes/version.php index b4a0d52faf..89812b9a99 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-51787'; +$wp_version = '5.9-alpha-51788'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.