Files
wordpress-develop/src/wp-includes
Tonya Mork 84467812c8 Editor: Explicitly declare $post_types and $area properties in WP_Block_Template class.
The `$post_types` and `$area` properties are assigned in the `_build_block_template_result_from_file()` and `_build_block_template_result_from_post()` functions. However, neither property was explicitly declared in the `WP_Block_Template` class.

This commit explicitly declares both properties in the class. Why? (1) To make the code more readable and maintainable; (2) to avoid a `Deprecated: Creation of dynamic property WP_Block_Template::$post_types is deprecated` deprecation when PHP 8.2 is released.

Ref:
* PHP 8.2 Deprecate dynamic properties https://wiki.php.net/rfc/deprecate_dynamic_properties

Follow-up to [52062].

Props jrf.
Fixes #54670.

git-svn-id: https://develop.svn.wordpress.org/trunk@52397 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-21 00:26:44 +00:00
..
2021-12-14 01:55:28 +00:00
2021-12-14 01:55:28 +00:00
2021-12-14 01:55:28 +00:00
2021-12-06 21:29:00 +00:00
2021-11-30 00:22:30 +00:00