Automattic / Co-Authors-Plus

Multiple bylines and Guest Authors for WordPress
https://wordpress.org/plugins/co-authors-plus/
GNU General Public License v2.0
290 stars 205 forks source link

Guest Authors: Add labels property #942

Closed GaryJones closed 1 year ago

GaryJones commented 1 year ago

Description

Dynamically created class properties are deprecated in PHP 8.2, so this change explicitly defines the property in the class.

The $labels property is assigned to in the constructor of this Guest Authors class.

The property needs to be public, as it is used by the list table class when defining the search box label.

Steps to Test

Note that running on PHP 8.2 generates a PHP deprecation message like:

PHP message: Deprecated: Creation of dynamic property CoAuthors_Guest_Authors::$labels is deprecated in /var/www/wp-content/plugins/co-authors-plus/php/class-coauthors-guest-authors.php on line 85

After merging, this deprecation message will stop.