From 3730196f785e86ed1653ca5cebd0111d0e7a9fc2 Mon Sep 17 00:00:00 2001 From: Jose Lazo Date: Tue, 3 Jun 2025 13:06:09 +0200 Subject: [PATCH] fix: avoid deprecated warnings on PHP8.2 --- src/wp-includes/class-wp-term.php | 57 ++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/class-wp-term.php b/src/wp-includes/class-wp-term.php index 0f5631353e876..f50fbfaecb0d4 100644 --- a/src/wp-includes/class-wp-term.php +++ b/src/wp-includes/class-wp-term.php @@ -14,7 +14,6 @@ * * @property-read object $data Sanitized term data. */ -#[AllowDynamicProperties] final class WP_Term { /** @@ -89,6 +88,62 @@ final class WP_Term { */ public $count = 0; + /** + * Object ID (for compatibility with the old taxonomy API). + * + * @var int|null + */ + public $object_id = null; + + /** + * Compatibility fields (for compatibility with the old taxonomy API). + * + * @var array + */ + public $compat_fields = array(); + + /** + * Category ID (for compatibility with the old taxonomy API). + * + * @var int|null + */ + public $cat_ID = null; + + /** + * Category count (for compatibility with the old taxonomy API). + * + * @var int|null + */ + public $category_count = null; + + /** + * Category description (for compatibility with the old taxonomy API). + * + * @var string|null + */ + public $category_description = null; + + /** + * Category name (for compatibility with the old taxonomy API). + * + * @var string|null + */ + public $cat_name = null; + + /** + * Category slug (for compatibility with the old taxonomy API). + * + * @var string|null + */ + public $category_nicename = null; + + /** + * Category parent ID (for compatibility with the old taxonomy API). + * + * @var int|null + */ + public $category_parent = null; + /** * Stores the term object's sanitization level. *