mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 08:11:52 +01:00
git-svn-id: http://core.svn.wordpress.org/trunk@22464 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4a6d2bbc00
commit
c67a081816
@ -3692,7 +3692,7 @@ function get_pages($args = '') {
|
||||
|
||||
$join = '';
|
||||
$where = "$exclusions $inclusions ";
|
||||
if ( ! empty( $meta_key ) || isset( $meta_value ) ) {
|
||||
if ( ! empty( $meta_key ) || ! empty( $meta_value ) ) {
|
||||
$join = " LEFT JOIN $wpdb->postmeta ON ( $wpdb->posts.ID = $wpdb->postmeta.post_id )";
|
||||
|
||||
// meta_key and meta_value might be slashed
|
||||
@ -3700,7 +3700,7 @@ function get_pages($args = '') {
|
||||
$meta_value = stripslashes($meta_value);
|
||||
if ( ! empty( $meta_key ) )
|
||||
$where .= $wpdb->prepare(" AND $wpdb->postmeta.meta_key = %s", $meta_key);
|
||||
if ( isset( $meta_value ) )
|
||||
if ( ! empty( $meta_value ) )
|
||||
$where .= $wpdb->prepare(" AND $wpdb->postmeta.meta_value = %s", $meta_value);
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user