Make WordPress Core

Ticket #31800: 31800.diff

File 31800.diff, 5.4 KB (added by ChaseWiseman, 11 years ago)
  • src/wp-includes/taxonomy.php

    diff --git src/wp-includes/taxonomy.php src/wp-includes/taxonomy.php
    index 42b236a..d6f0150 100644
     
    22/**
    33 * Taxonomy API
    44 *
     5 * @since 2.3.0
     6 *
    57 * @package WordPress
    68 * @subpackage Taxonomy
    7  * @since 2.3.0
    89 */
    910
    1011//
     
    1516 * Creates the initial taxonomies.
    1617 *
    1718 * This function fires twice: in wp-settings.php before plugins are loaded (for
    18  * backwards compatibility reasons), and again on the 'init' action. We must avoid
    19  * registering rewrite rules before the 'init' action.
     19 * backwards compatibility reasons), and again on the `init` action. We must avoid
     20 * registering rewrite rules before the `init` action.
     21 *
     22 * @since 2.8.0
     23 *
     24 * @global object $wp_rewrite The WordPress rewrite class.
    2025 */
    2126function create_initial_taxonomies() {
    2227        global $wp_rewrite;
    function create_initial_taxonomies() { 
    129134}
    130135
    131136/**
    132  * Get a list of registered taxonomy objects.
     137 * Get a list of registered taxonomy names or objects.
    133138 *
    134139 * @since 3.0.0
    135  * @uses $wp_taxonomies
     140 *
     141 * @global array $wp_taxonomies The registered taxonomies.
    136142 *
    137143 * @param array $args An array of key => value arguments to match against the taxonomy objects.
    138144 * @param string $output The type of output to return, either taxonomy 'names' or 'objects'. 'names' is the default.
    function get_taxonomies( $args = array(), $output = 'names', $operator = 'and' ) 
    159165 *
    160166 * @since 2.3.0
    161167 *
    162  * @uses $wp_taxonomies
     168 * @global array $wp_taxonomies The registered taxonomies.
    163169 *
    164170 * @param array|string|object $object Name of the type of taxonomy object, or an object (row from posts)
    165171 * @param string $output The type of output to return, either taxonomy 'names' or 'objects'. 'names' is the default.
    function get_object_taxonomies($object, $output = 'names') { 
    197203 *
    198204 * @since 2.3.0
    199205 *
    200  * @uses $wp_taxonomies
     206 * @global array $wp_taxonomies The registered taxonomies.
    201207 *
    202208 * @param string $taxonomy Name of taxonomy object to return
    203209 * @return object|bool The Taxonomy Object or false if $taxonomy doesn't exist
    function get_taxonomy( $taxonomy ) { 
    218224 *
    219225 * @since 3.0.0
    220226 *
    221  * @uses $wp_taxonomies
     227 * @global array $wp_taxonomies The registered taxonomies.
    222228 *
    223229 * @param string $taxonomy Name of taxonomy object
    224230 * @return bool Whether the taxonomy exists.
    function is_taxonomy_hierarchical($taxonomy) { 
    311317 *
    312318 * @since 2.3.0
    313319 * @since 4.2.0 Introduced 'show_in_quick_edit' parameter.
    314  * @uses $wp_taxonomies Inserts new taxonomy object into the list
    315  * @uses $wp Adds query vars
     320 *
     321 * @global array  $wp_taxonomies The registered taxonomies.
     322 * @global object $wp The WordPress environment class.
    316323 *
    317324 * @param string $taxonomy Taxonomy key, must not exceed 32 characters.
    318325 * @param array|string $object_type Name of the object type for the taxonomy object.
    function register_taxonomy( $taxonomy, $object_type, $args = array() ) { 
    463470 * Above, the first default value is for non-hierarchical taxonomies (like tags) and the second one is for hierarchical taxonomies (like categories).
    464471 *
    465472 * @since 3.0.0
     473 *
    466474 * @param object $tax Taxonomy object
    467475 * @return object object with all the labels as member variables
    468476 */
    function get_taxonomy_labels( $tax ) { 
    503511 * Add an already registered taxonomy to an object type.
    504512 *
    505513 * @since 3.0.0
    506  * @uses $wp_taxonomies Modifies taxonomy object
     514 *
     515 * @global array $wp_taxonomies The registered taxonomies.
    507516 *
    508517 * @param string $taxonomy Name of taxonomy object
    509518 * @param string $object_type Name of the object type
    function register_taxonomy_for_object_type( $taxonomy, $object_type) { 
    529538 *
    530539 * @since 3.7.0
    531540 *
     541 * @global array $wp_taxonomies The registered taxonomies.
     542 *
    532543 * @param string $taxonomy    Name of taxonomy object.
    533544 * @param string $object_type Name of the object type.
    534545 * @return bool True if successful, false if not.
    class WP_Tax_Query { 
    10001011         * @since 4.1.0
    10011012         * @access public
    10021013         *
     1014         * @global object $wpdb The WordPress database abstraction object.
     1015         *
    10031016         * @param array $clause       Query clause, passed by reference
    10041017         * @param array $parent_query Parent query array.
    10051018         * @return array {
    class WP_Tax_Query { 
    12081221         *
    12091222         * @since 3.2.0
    12101223         *
     1224         * @global object $wpdb The WordPress database abstraction object.
     1225         *
    12111226         * @param array  &$query          The single query.
    12121227         * @param string $resulting_field The resulting field. Accepts 'slug', 'name', 'term_taxonomy_id',
    12131228         *                                or 'term_id'. Default: 'term_id'.
    function get_term_by($field, $value, $taxonomy, $output = OBJECT, $filter = 'raw 
    14601475 *
    14611476 * @since 2.3.0
    14621477 *
    1463  * @global wpdb $wpdb WordPress database abstraction object.
    1464  *
    14651478 * @param string $term_id ID of Term to get children
    14661479 * @param string $taxonomy Taxonomy Name
    14671480 * @return array|WP_Error List of Term IDs. WP_Error returned if $taxonomy does not exist
    function wp_insert_term( $term, $taxonomy, $args = array() ) { 
    30513064 *
    30523065 * @since 2.3.0
    30533066 *
     3067 * @global object $wpdb The WordPress database abstraction object.
     3068 *
    30543069 * @param int              $object_id The object to relate to.
    30553070 * @param array|int|string $terms     A single term slug, single term id, or array of either term slugs or ids.
    30563071 *                                    Will replace all existing related terms in this taxonomy.