Make WordPress Core


Ignore:
Timestamp:
11/18/2019 07:57:47 AM (7 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-taxonomy.php

    r46586 r46743  
    3131
    3232        /**
    33          * An array of labels for this taxonomy.
     33         * Labels object for this taxonomy.
     34         *
     35         * If not set, tag labels are inherited for non-hierarchical types
     36         * and category labels for hierarchical ones.
     37         *
     38         * @see get_taxonomy_labels()
    3439         *
    3540         * @since 4.7.0
    3641         * @var object
    3742         */
    38         public $labels = array();
     43        public $labels;
    3944
    4045        /**
Note: See TracChangeset for help on using the changeset viewer.