Make WordPress Core


Ignore:
Timestamp:
09/07/2023 08:39:07 PM (3 years ago)
Author:
hellofromTonya
Message:

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

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

[56349] 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 [56349], [56356], [56530].

See #58896, #57686.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-list-table.php

    r56450 r56542  
    187187                }
    188188
    189                 trigger_error(
     189                wp_trigger_error(
     190                        __METHOD__,
    190191                        "The property `{$name}` is not declared. Getting a dynamic property is " .
    191192                        'deprecated since version 6.4.0! Instead, declare the property on the class.',
     
    210211                }
    211212
    212                 trigger_error(
     213                wp_trigger_error(
     214                        __METHOD__,
    213215                        "The property `{$name}` is not declared. Setting a dynamic property is " .
    214216                        'deprecated since version 6.4.0! Instead, declare the property on the class.',
     
    231233                }
    232234
    233                 trigger_error(
     235                wp_trigger_error(
     236                        __METHOD__,
    234237                        "The property `{$name}` is not declared. Checking `isset()` on a dynamic property " .
    235238                        'is deprecated since version 6.4.0! Instead, declare the property on the class.',
     
    253256                }
    254257
    255                 trigger_error(
     258                wp_trigger_error(
     259                        __METHOD__,
    256260                        "A property `{$name}` is not declared. Unsetting a dynamic property is " .
    257261                        'deprecated since version 6.4.0! Instead, declare the property on the class.',
Note: See TracChangeset for help on using the changeset viewer.