Changeset 12303
- Timestamp:
- 12/01/2009 08:14:42 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
wp-includes/query.php (modified) (1 diff)
-
xmlrpc.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/query.php
r12146 r12303 2109 2109 $r_status = array(); 2110 2110 $p_status = array(); 2111 if ( in_array( 'draft' , $q_status ) ) 2112 $r_status[] = "$wpdb->posts.post_status = 'draft'"; 2113 if ( in_array( 'pending', $q_status ) ) 2114 $r_status[] = "$wpdb->posts.post_status = 'pending'"; 2115 if ( in_array( 'future' , $q_status ) ) 2116 $r_status[] = "$wpdb->posts.post_status = 'future'"; 2117 if ( in_array( 'inherit' , $q_status ) ) 2118 $r_status[] = "$wpdb->posts.post_status = 'inherit'"; 2119 if ( in_array( 'private', $q_status ) ) 2120 $p_status[] = "$wpdb->posts.post_status = 'private'"; 2121 if ( in_array( 'publish', $q_status ) ) 2122 $r_status[] = "$wpdb->posts.post_status = 'publish'"; 2123 if ( in_array( 'trash', $q_status ) ) 2124 $r_status[] = "$wpdb->posts.post_status = 'trash'"; 2111 if ( $q['post_status'] == 'any' ) { 2112 // @todo Use register_post_status() data to determine which states should be excluded. 2113 $r_status[] = "$wpdb->posts.post_status <> 'trash'"; 2114 } else { 2115 if ( in_array( 'draft' , $q_status ) ) 2116 $r_status[] = "$wpdb->posts.post_status = 'draft'"; 2117 if ( in_array( 'pending', $q_status ) ) 2118 $r_status[] = "$wpdb->posts.post_status = 'pending'"; 2119 if ( in_array( 'future' , $q_status ) ) 2120 $r_status[] = "$wpdb->posts.post_status = 'future'"; 2121 if ( in_array( 'inherit' , $q_status ) ) 2122 $r_status[] = "$wpdb->posts.post_status = 'inherit'"; 2123 if ( in_array( 'private', $q_status ) ) 2124 $p_status[] = "$wpdb->posts.post_status = 'private'"; 2125 if ( in_array( 'publish', $q_status ) ) 2126 $r_status[] = "$wpdb->posts.post_status = 'publish'"; 2127 if ( in_array( 'trash', $q_status ) ) 2128 $r_status[] = "$wpdb->posts.post_status = 'trash'"; 2129 } 2125 2130 2126 2131 if ( empty($q['perm'] ) || 'readable' != $q['perm'] ) { -
trunk/xmlrpc.php
r11969 r12303 613 613 do_action('xmlrpc_call', 'wp.getPages'); 614 614 615 $pages = get_posts( array('post_type' => 'page', 'post_status' => 'a ll', 'numberposts' => $num_pages) );615 $pages = get_posts( array('post_type' => 'page', 'post_status' => 'any', 'numberposts' => $num_pages) ); 616 616 $num_pages = count($pages); 617 617
Note: See TracChangeset
for help on using the changeset viewer.