Make WordPress Core


Ignore:
Timestamp:
09/07/2023 08:43:48 PM (17 months ago)
Author:
hellofromTonya
Message:

Code Modernization: Use wp_trigger_error() in WP_User_Query magic methods.

Replaces trigger_error() with wp_trigger_error() in each of the WP_User_Query magic methods.

[56353] added the dynamic properties deprecation messages to the __get(), __set(), __isset(), __unset() magic methods. Since that commit, wp_trigger_error() was introduced (see [56530]) as a wrapper for trigger_error().

Follow-up to [56353], [56530].

See #58897, #57686.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-user-query.php

    r56381 r56543  
    11231123        }
    11241124
    1125         trigger_error(
     1125        wp_trigger_error(
     1126            __METHOD__,
    11261127            "The property `{$name}` is not declared. Getting a dynamic property is " .
    11271128            'deprecated since version 6.4.0! Instead, declare the property on the class.',
     
    11461147        }
    11471148
    1148         trigger_error(
     1149        wp_trigger_error(
     1150            __METHOD__,
    11491151            "The property `{$name}` is not declared. Setting a dynamic property is " .
    11501152            'deprecated since version 6.4.0! Instead, declare the property on the class.',
     
    11671169        }
    11681170
    1169         trigger_error(
     1171        wp_trigger_error(
     1172            __METHOD__,
    11701173            "The property `{$name}` is not declared. Checking `isset()` on a dynamic property " .
    11711174            'is deprecated since version 6.4.0! Instead, declare the property on the class.',
     
    11891192        }
    11901193
    1191         trigger_error(
     1194        wp_trigger_error(
     1195            __METHOD__,
    11921196            "A property `{$name}` is not declared. Unsetting a dynamic property is " .
    11931197            'deprecated since version 6.4.0! Instead, declare the property on the class.',
Note: See TracChangeset for help on using the changeset viewer.