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.
Built from https://develop.svn.wordpress.org/trunk@56542


git-svn-id: http://core.svn.wordpress.org/trunk@56054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
hellofromTonya 2023-09-07 20:41:11 +00:00
parent eb635e4796
commit 3356628935
2 changed files with 9 additions and 5 deletions

View File

@ -186,7 +186,8 @@ class WP_List_Table {
return $this->$name;
}
trigger_error(
wp_trigger_error(
__METHOD__,
"The property `{$name}` is not declared. Getting a dynamic property is " .
'deprecated since version 6.4.0! Instead, declare the property on the class.',
E_USER_DEPRECATED
@ -209,7 +210,8 @@ class WP_List_Table {
return;
}
trigger_error(
wp_trigger_error(
__METHOD__,
"The property `{$name}` is not declared. Setting a dynamic property is " .
'deprecated since version 6.4.0! Instead, declare the property on the class.',
E_USER_DEPRECATED
@ -230,7 +232,8 @@ class WP_List_Table {
return isset( $this->$name );
}
trigger_error(
wp_trigger_error(
__METHOD__,
"The property `{$name}` is not declared. Checking `isset()` on a dynamic property " .
'is deprecated since version 6.4.0! Instead, declare the property on the class.',
E_USER_DEPRECATED
@ -252,7 +255,8 @@ class WP_List_Table {
return;
}
trigger_error(
wp_trigger_error(
__METHOD__,
"A property `{$name}` is not declared. Unsetting a dynamic property is " .
'deprecated since version 6.4.0! Instead, declare the property on the class.',
E_USER_DEPRECATED

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.4-alpha-56541';
$wp_version = '6.4-alpha-56542';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.