Make WordPress Core


Ignore:
Timestamp:
10/07/2016 05:11:02 PM (8 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-admin/includes/ajax-actions.php

    r38733 r38747  
    135135     * @since 4.0.0
    136136     *
    137      * @param int    $characters The minimum number of characters required. Default 2.
    138      * @param object $tax        The taxonomy object.
    139      * @param string $s          The search term.
     137     * @param int         $characters The minimum number of characters required. Default 2.
     138     * @param WP_Taxonomy $tax        The taxonomy object.
     139     * @param string      $s          The search term.
    140140     */
    141141    $term_search_min_chars = (int) apply_filters( 'term_search_min_chars', 2, $tax, $s );
Note: See TracChangeset for help on using the changeset viewer.