From f32831bf6d6fe48c2387f7f9389b717348f2b933 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 18 Nov 2019 07:58:59 +0000 Subject: [PATCH] Taxonomy: Correct the initial value for `WP_Taxonomy::$labels` to match `get_taxonomy_labels()` return type. Improve documentation for consistency with `WP_Post_Type::$labels`. Props alpipego. Fixes #48681. Built from https://develop.svn.wordpress.org/trunk@46743 git-svn-id: http://core.svn.wordpress.org/trunk@46543 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-taxonomy.php | 9 +++++++-- wp-includes/version.php | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/wp-includes/class-wp-taxonomy.php b/wp-includes/class-wp-taxonomy.php index 716da8d384..24cc10187e 100644 --- a/wp-includes/class-wp-taxonomy.php +++ b/wp-includes/class-wp-taxonomy.php @@ -30,12 +30,17 @@ final class WP_Taxonomy { public $label; /** - * An array of labels for this taxonomy. + * Labels object for this taxonomy. + * + * If not set, tag labels are inherited for non-hierarchical types + * and category labels for hierarchical ones. + * + * @see get_taxonomy_labels() * * @since 4.7.0 * @var object */ - public $labels = array(); + public $labels; /** * A short descriptive summary of what the taxonomy is for. diff --git a/wp-includes/version.php b/wp-includes/version.php index eb98129650..8cd4db7e92 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.4-alpha-46742'; +$wp_version = '5.4-alpha-46743'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.