Changeset 31024 for trunk/src/wp-includes/taxonomy.php
- Timestamp:
- 01/02/2015 09:33:33 PM (12 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/taxonomy.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/taxonomy.php
r31012 r31024 1549 1549 * 1550 1550 * @since 2.3.0 1551 * @since 4.2.0 Introduced 'name' parameter. 1551 1552 * 1552 1553 * @global wpdb $wpdb WordPress database abstraction object. … … 1579 1580 * term objects), 'ids' or 'names' (returns an array of integers 1580 1581 * or strings, respectively. Default 'all'. 1582 * @type string|array $name Optional. Name or array of names to return term(s) for. Default empty. 1581 1583 * @type string|array $slug Optional. Slug or array of slugs to return term(s) for. Default empty. 1582 1584 * @type bool $hierarchical Whether to include terms that have non-empty descendants (even … … 1619 1621 $defaults = array('orderby' => 'name', 'order' => 'ASC', 1620 1622 'hide_empty' => true, 'exclude' => array(), 'exclude_tree' => array(), 'include' => array(), 1621 'number' => '', 'fields' => 'all', ' slug' => '', 'parent' => '',1623 'number' => '', 'fields' => 'all', 'name' => '', 'slug' => '', 'parent' => '', 1622 1624 'hierarchical' => true, 'child_of' => 0, 'get' => '', 'name__like' => '', 'description__like' => '', 1623 1625 'pad_counts' => false, 'offset' => '', 'search' => '', 'cache_domain' => 'core' ); … … 1794 1796 if ( ! empty( $exclusions ) ) { 1795 1797 $where .= $exclusions; 1798 } 1799 1800 if ( ! empty( $args['name'] ) ) { 1801 if ( is_array( $args['name'] ) ) { 1802 $name = array_map( 'sanitize_text_field', $args['name'] ); 1803 $where .= " AND t.name IN ('" . implode( "', '", $name ) . "')"; 1804 } else { 1805 $name = sanitize_text_field( $args['name'] ); 1806 $where .= $wpdb->prepare( " AND t.name = %s", $name ); 1807 } 1796 1808 } 1797 1809
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)