From 65da089d96f162b5b04cc9f6b5939b19c4c36b21 Mon Sep 17 00:00:00 2001 From: hellofromTonya Date: Thu, 3 Aug 2023 19:52:22 +0000 Subject: [PATCH] Code Modernization: Use "declare" in WP_List_Table magic methods deprecation message Changes "define" to "declare" in the deprecation message in `WP_List_Table` magic methods. Why is "declare" better? It aligns well to: * the topic of and published information about dynamic properties. * the act of explicitly listing the variable as a property on the class. The goal of this message is guide developers to change their code. Changing the term to "declare" hopefully will aid in the understanding of what is being asked of developers when this deprecation is thrown. Follow-up [56349]. Props hellofromTonya, antonvlasenko. Fixes #58896. Built from https://develop.svn.wordpress.org/trunk@56356 git-svn-id: http://core.svn.wordpress.org/trunk@55868 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-list-table.php | 16 ++++++++-------- wp-includes/version.php | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/wp-admin/includes/class-wp-list-table.php b/wp-admin/includes/class-wp-list-table.php index c7c38a3561..03fe097538 100644 --- a/wp-admin/includes/class-wp-list-table.php +++ b/wp-admin/includes/class-wp-list-table.php @@ -187,8 +187,8 @@ class WP_List_Table { } trigger_error( - "The property `{$name}` is not defined. Getting a dynamic (undefined) property is " . - 'deprecated since version 6.4.0! Instead, define the property on the class.', + "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 ); return null; @@ -210,8 +210,8 @@ class WP_List_Table { } trigger_error( - "The property `{$name}` is not defined. Setting a dynamic (undefined) property is " . - 'deprecated since version 6.4.0! Instead, define the property on the class.', + "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 ); } @@ -231,8 +231,8 @@ class WP_List_Table { } trigger_error( - "The property `{$name}` is not defined. Checking `isset()` on a dynamic (undefined) property " . - 'is deprecated since version 6.4.0! Instead, define the property on the class.', + "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 ); return false; @@ -253,8 +253,8 @@ class WP_List_Table { } trigger_error( - "A property `{$name}` is not defined. Unsetting a dynamic (undefined) property is " . - 'deprecated since version 6.4.0! Instead, define the property on the class.', + "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 1b8cedbaf0..ada65c247e 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.4-alpha-56355'; +$wp_version = '6.4-alpha-56356'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.