Changeset 14478 for trunk/wp-includes/post.php
- Timestamp:
- 05/06/2010 06:03:05 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r14448 r14478 1574 1574 * 1575 1575 * @param string|array $mime_types List of mime types or comma separated string of mime types. 1576 * @param string $table_alias Optional. Specify a table alias, if needed. 1576 1577 * @return string The SQL AND clause for mime searching. 1577 1578 */ 1578 function wp_post_mime_type_where($post_mime_types ) {1579 function wp_post_mime_type_where($post_mime_types, $table_alias = '') { 1579 1580 $where = ''; 1580 1581 $wildcards = array('', '%', '%/%'); … … 1604 1605 1605 1606 if ( false !== strpos($mime_pattern, '%') ) 1606 $wheres[] = "post_mime_type LIKE '$mime_pattern'";1607 $wheres[] = empty($table_alias) ? "post_mime_type LIKE '$mime_pattern'" : "$table_alias.post_mime_type LIKE '$mime_pattern'"; 1607 1608 else 1608 $wheres[] = "post_mime_type = '$mime_pattern'";1609 $wheres[] = empty($table_alias) ? "post_mime_type = '$mime_pattern'" : "$table_alias.post_mime_type = '$mime_pattern'"; 1609 1610 } 1610 1611 if ( !empty($wheres) )
Note: See TracChangeset
for help on using the changeset viewer.