From d2b2957bcbbc60a8844fc99888661c735db5ddd9 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Fri, 25 Aug 2023 03:37:12 +0000 Subject: [PATCH] Properly deprecate both constructors in `WP_User_Search`. - `__construct()` gets the new `_deprecated_class()` function - `WP_User_Search` PHP4 style constructor is changed from `_deprecated_function()` to `_deprecated_constructor()` Adds a test to confirm `WP_User_Search` class is testable as deprecated. Props jrf, DrewAPicture. Fixes #41125. Built from https://develop.svn.wordpress.org/trunk@56469 git-svn-id: http://core.svn.wordpress.org/trunk@55981 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/deprecated.php | 3 ++- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/deprecated.php b/wp-admin/includes/deprecated.php index 91d47446f5..d588ad4f54 100644 --- a/wp-admin/includes/deprecated.php +++ b/wp-admin/includes/deprecated.php @@ -493,7 +493,7 @@ class WP_User_Search { * @return WP_User_Search */ function __construct( $search_term = '', $page = '', $role = '' ) { - _deprecated_function( __FUNCTION__, '3.1.0', 'WP_User_Query' ); + _deprecated_class( 'WP_User_Search', '3.1.0', 'WP_User_Query' ); $this->search_term = wp_unslash( $search_term ); $this->raw_page = ( '' == $page ) ? false : (int) $page; @@ -516,6 +516,7 @@ class WP_User_Search { * @return WP_User_Search */ public function WP_User_Search( $search_term = '', $page = '', $role = '' ) { + _deprecated_constructor( 'WP_User_Search', '3.1.0', get_class( $this ) ); self::__construct( $search_term, $page, $role ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index c7c5e56b39..4fba68e9d4 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.4-alpha-56468'; +$wp_version = '6.4-alpha-56469'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.