WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/07/2016 05:11:02 PM (4 years ago)
Author:
swissspidy
Message:

Taxonomy: Introduce WP_Taxonomy and use it in register_taxonomy() and unregister_taxonomy().

This changes the global $wp_taxonomies to an array of WP_Taxonomy objects. WP_Taxonomy includes methods to handle rewrite rules and hooks.
Each taxonomy argument becomes a property of WP_Taxonomy. Introducing such a class makes further improvements in the future much more feasible.

Props boonebgorges for review.
Fixes #36224. See #36217.

File:
1 edited

Legend:

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

    r38698 r38747  
    718718         * @since 3.4.0
    719719         *
    720          * @param array  $_taxonomy An array of taxonomy data.
    721          * @param object $taxonomy  Taxonomy object.
    722          * @param array  $fields    The subset of taxonomy fields to return.
     720         * @param array       $_taxonomy An array of taxonomy data.
     721         * @param WP_Taxonomy $taxonomy  Taxonomy object.
     722         * @param array       $fields    The subset of taxonomy fields to return.
    723723         */
    724724        return apply_filters( 'xmlrpc_prepare_taxonomy', $_taxonomy, $taxonomy, $fields );
Note: See TracChangeset for help on using the changeset viewer.