From 33566289357c3ac564c064a535f8a67db57f0865 Mon Sep 17 00:00:00 2001 From: hellofromTonya Date: Thu, 7 Sep 2023 20:41:11 +0000 Subject: [PATCH] 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 --- wp-admin/includes/class-wp-list-table.php | 12 ++++++++---- wp-includes/version.php | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/wp-admin/includes/class-wp-list-table.php b/wp-admin/includes/class-wp-list-table.php index 03fe097538..3fa6f54dd4 100644 --- a/wp-admin/includes/class-wp-list-table.php +++ b/wp-admin/includes/class-wp-list-table.php @@ -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 diff --git a/wp-includes/version.php b/wp-includes/version.php index 078f30ac13..be39296887 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.