diff -r 34716fd837a4 -r be944660c56a wp/wp-includes/class-wp-taxonomy.php --- a/wp/wp-includes/class-wp-taxonomy.php Tue Dec 15 15:52:01 2020 +0100 +++ b/wp/wp-includes/class-wp-taxonomy.php Wed Sep 21 18:19:35 2022 +0200 @@ -38,7 +38,7 @@ * @see get_taxonomy_labels() * * @since 4.7.0 - * @var object + * @var stdClass */ public $labels; @@ -152,7 +152,7 @@ * Capabilities for this taxonomy. * * @since 4.7.0 - * @var object + * @var stdClass */ public $cap; @@ -210,6 +210,16 @@ public $rest_controller_class; /** + * The controller instance for this taxonomy's REST API endpoints. + * + * Lazily computed. Should be accessed using {@see WP_Taxonomy::get_rest_controller()}. + * + * @since 5.5.0 + * @var WP_REST_Controller $rest_controller + */ + public $rest_controller; + + /** * The default term name for this taxonomy. If you pass an array you have * to set 'name' and optionally 'slug' and 'description'. * @@ -219,14 +229,22 @@ public $default_term; /** - * The controller instance for this taxonomy's REST API endpoints. + * Whether terms in this taxonomy should be sorted in the order they are provided to `wp_set_object_terms()`. * - * Lazily computed. Should be accessed using {@see WP_Taxonomy::get_rest_controller()}. + * Use this in combination with `'orderby' => 'term_order'` when fetching terms. * - * @since 5.5.0 - * @var WP_REST_Controller $rest_controller + * @since 2.5.0 + * @var bool|null */ - public $rest_controller; + public $sort = null; + + /** + * Array of arguments to automatically use inside `wp_get_object_terms()` for this taxonomy. + * + * @since 2.6.0 + * @var array|null + */ + public $args = null; /** * Whether it is a built-in taxonomy. @@ -239,6 +257,8 @@ /** * Constructor. * + * See the register_taxonomy() function for accepted arguments for `$args`. + * * @since 4.7.0 * * @global WP $wp Current WordPress environment instance. @@ -257,6 +277,8 @@ /** * Sets taxonomy properties. * + * See the register_taxonomy() function for accepted arguments for `$args`. + * * @since 4.7.0 * * @param array|string $object_type Name of the object type for the taxonomy object. @@ -271,6 +293,7 @@ * @since 4.4.0 * * @param array $args Array of arguments for registering a taxonomy. + * See the register_taxonomy() function for accepted arguments. * @param string $taxonomy Taxonomy key. * @param string[] $object_type Array of names of object types for the taxonomy. */ @@ -298,6 +321,8 @@ 'rest_base' => false, 'rest_controller_class' => false, 'default_term' => null, + 'sort' => null, + 'args' => null, '_builtin' => false, );