Make WordPress Core

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

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

Improved version of patch 2 / implementation of the function

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

    From 4b0f8654c988514903e1168402cd386909a64715 Mon Sep 17 00:00:00 2001
    From: jrfnl <jrfnl@users.noreply.github.com>
    Date: Thu, 22 Jun 2017 16:46:08 +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..4458af5 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_constructor( 'WP_User_Query', '3.1.0', get_class( $this ) );
    506507                self::__construct( $search_term, $page, $role );
    507508        }
    508509