Changeset 30042 for trunk/src/wp-includes/taxonomy.php
- Timestamp:
- 10/28/2014 02:56:33 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/taxonomy.php
r30031 r30042 1595 1595 * term objects), 'ids' or 'names' (returns an array of integers 1596 1596 * or strings, respectively. Default 'all'. 1597 * @type string $slug Slugto return term(s) for. Default empty.1597 * @type string|array $slug Optional. Slug(s) to return term(s) for. Default empty. 1598 1598 * @type bool $hierarchical Whether to include terms that have non-empty descendants (even 1599 1599 * if $hide_empty is set to true). Default true. … … 1805 1805 1806 1806 if ( ! empty( $args['slug'] ) ) { 1807 $slug = sanitize_title( $args['slug'] ); 1808 $where .= " AND t.slug = '$slug'"; 1807 if ( is_array( $args['slug'] ) ) { 1808 $slug = array_map( 'sanitize_title', $args['slug'] ); 1809 $where .= " AND t.slug IN ('" . implode( "', '", $slug ) . "')"; 1810 } else { 1811 $slug = sanitize_title( $args['slug'] ); 1812 $where .= " AND t.slug = '$slug'"; 1813 } 1809 1814 } 1810 1815
Note: See TracChangeset
for help on using the changeset viewer.