Make WordPress Core

Changeset 30622


Ignore:
Timestamp:
11/28/2014 12:26:00 PM (12 years ago)
Author:
DrewAPicture
Message:

4.1 Docs Audit: Improve inline documentation in DocBlocks for various WP_Tax_Query methods, the pre_delete_term hook, and get_ancestors().

See #30469.

File:
1 edited

Legend:

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

    r30585 r30622  
    675675         *
    676676         * We store this data in a flat array because they are referenced in a
    677          * number of places by WP_Query.
     677         * number of places by {@see WP_Query}.
    678678         *
    679679         * @since 4.1.0
    … …  
    693693
    694694        /**
    695          * Column in primary_table that represents the ID of the object.
     695         * Column in 'primary_table' that represents the ID of the object.
    696696         *
    697697         * @since 4.1.0
    … …  
    705705         *
    706706         * @since 3.1.0
    707          * @since 4.1.0 Added support for $operator 'NOT EXISTS' and 'EXISTS'.
     707         * @since 4.1.0 Added support for `$operator` 'NOT EXISTS' and 'EXISTS' values.
    708708         * @access public
    709709         *
    … …  
    739739
    740740        /**
    741          * Ensure the `tax_query` argument passed to the class constructor is well-formed.
     741         * Ensure the 'tax_query' argument passed to the class constructor is well-formed.
    742742         *
    743743         * Ensures that each query-level clause has a 'relation' key, and that
    744          * each first-order clause contains all the necessary keys from $defaults.
     744         * each first-order clause contains all the necessary keys from `$defaults`.
    745745         *
    746746         * @since 4.1.0
    747747         * @access public
    748748         *
    749          * @param  array $queries Array of queries clauses.
     749         * @param array $queries Array of queries clauses.
    750750         * @return array Sanitized array of query clauses.
    751751         */
    … …  
    842842         * @access protected
    843843         *
    844          * @param  array $query Tax query arguments.
    845          * @return bool  Whether the query clause is a first-order clause.
     844         * @param array $query Tax query arguments.
     845         * @return bool Whether the query clause is a first-order clause.
    846846         */
    847847        protected static function is_first_order_clause( $query ) {
    … …  
    911911         * @access protected
    912912         *
    913          * @param array $query Query to parse.
     913         * @param array $query Query to parse, passed by reference.
    914914         * @param int   $depth Optional. Number of tree levels deep we currently are.
    915          *              Used to calculate indentation.
     915         *                     Used to calculate indentation. Default 0.
    916916         * @return array {
    917917         *     Array containing JOIN and WHERE SQL clauses to append to a single query array.
    … …  
    988988
    989989        /**
    990          * Generate SQL JOIN and WHERE clauses for a first-order query clause.
     990         * Generate SQL JOIN and WHERE clauses for a "first-order" query clause.
    991991
    992992         * @since 4.1.0
    993993         * @access public
    994994         *
    995          * @param  array $clause       Query clause.
    996          * @param  array $parent_query Parent query array.
     995         * @param array $clause       Query clause, passed by reference
     996         * @param array $parent_query Parent query array.
    997997         * @return array {
    998998         *     Array containing JOIN and WHERE SQL clauses to append to a first-order query.
    … …  
    11061106         * We avoid unnecessary table joins by allowing each clause to look for
    11071107         * an existing table alias that is compatible with the query that it
    1108          * needs to perform. An existing alias is compatible if (a) it is a
    1109          * sibling of $clause (ie, it's under the scope of the same relation),
    1110          * and (b) the combination of operator and relation between the clauses
    1111          * allows for a shared table join. In the case of WP_Tax_Query, this
    1112          * only applies to IN clauses that are connected by the relation OR.
     1108         * needs to perform.
     1109         *
     1110         * An existing alias is compatible if (a) it is a sibling of `$clause`
     1111         * (ie, it's under the scope of the same relation), and (b) the combination
     1112         * of operator and relation between the clauses allows for a shared table
     1113         * join. In the case of {@see WP_Tax_Query}, this only applies to 'IN'
     1114         * clauses that are connected by the relation 'OR'.
    11131115         *
    11141116         * @since 4.1.0
    11151117         * @access protected
    11161118         *
    1117          * @param  array       $clause       Query clause.
    1118          * @param  array       $parent_query Parent query of $clause.
     1119         * @param array       $clause       Query clause.
     1120         * @param array       $parent_query Parent query of $clause.
    11191121         * @return string|bool Table alias if found, otherwise false.
    11201122         */
    … …  
    24292431         * @since 4.1.0
    24302432         *
    2431          * @param int $term Term ID
    2432          * @param string $taxonomy Taxonomy Name
     2433         * @param int    $term     Term ID.
     2434         * @param string $taxonomy Taxonomy Name.
    24332435         */
    24342436        do_action( 'pre_delete_term', $term, $taxonomy );
    … …  
    43314333 *
    43324334 * @since 3.1.0
    4333  * @since 4.1.0 Introduced the 'resource_type' parameter.
    4334  *
    4335  * @param int    $object_id     The ID of the object.
    4336  * @param string $object_type   The type of object for which we'll be retrieving ancestors.
    4337  *                              Accepts a post type or a taxonomy name.
    4338  * @param string $resource_type Optional. Type of resource $object_type is. Accepts 'post_type' or 'taxonomy'.
     4335 * @since 4.1.0 Introduced the `$resource_type` argument.
     4336 *
     4337 * @param int    $object_id     Optional. The ID of the object. Default 0.
     4338 * @param string $object_type   Optional. The type of object for which we'll be retrieving
     4339 *                              ancestors. Accepts a post type or a taxonomy name. Default empty.
     4340 * @param string $resource_type Optional. Type of resource $object_type is. Accepts 'post_type'
     4341 *                              or 'taxonomy'. Default empty.
    43394342 * @return array An array of ancestors from lowest to highest in the hierarchy.
    43404343 */
Note: See TracChangeset for help on using the changeset viewer.