Make WordPress Core

Ticket #41125: 0002-Implement-usage-of-the-new-_deprecated_class-functio.patch

File 0002-Implement-usage-of-the-new-_deprecated_class-functio.patch, 1.2 KB (added by jrf, 7 years ago)

Patch to start using the new function in the one instance it is needed ATM

  • src/wp-admin/includes/deprecated.php

    From f3f0b7272e1936e5823b29a0367d3920a43a68bc Mon Sep 17 00:00:00 2001
    From: jrfnl <jrfnl@users.noreply.github.com>
    Date: Wed, 21 Jun 2017 23:17:15 +0200
    Subject: [PATCH] Implement usage of the new `_deprecated_class()` function
     where appropriate.
    
    ---
     src/wp-admin/includes/deprecated.php | 3 ++-
     1 file changed, 2 insertions(+), 1 deletion(-)
    
    diff --git a/src/wp-admin/includes/deprecated.php b/src/wp-admin/includes/deprecated.php
    index a9e0e6f..8ff75bb 100644
    a b class WP_User_Search { 
    480480         * @return WP_User_Search
    481481         */
    482482        function __construct( $search_term = '', $page = '', $role = '' ) {
    483                 _deprecated_function( __FUNCTION__, '3.1.0', 'WP_User_Query' );
     483                _deprecated_class( __CLASS__, '3.1.0', 'WP_User_Query' );
    484484
    485485                $this->search_term = wp_unslash( $search_term );
    486486                $this->raw_page = ( '' == $page ) ? false : (int) $page;
    class WP_User_Search { 
    503503         * @return WP_User_Search
    504504         */
    505505        public function WP_User_Search( $search_term = '', $page = '', $role = '' ) {
     506                _deprecated_class( __CLASS__, '3.1.0', 'WP_User_Query' );
    506507                self::__construct( $search_term, $page, $role );
    507508        }
    508509