Ticket #20350: post.diff
| File post.diff, 669 bytes (added by , 14 years ago) |
|---|
-
wp-includes/post.php
3206 3206 */ 3207 3207 function get_page_by_title($page_title, $output = OBJECT, $post_type = 'page' ) { 3208 3208 global $wpdb; 3209 $page = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_title = %s AND post_type= %s ", $page_title, $post_type ) );3209 $page = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_title = %s AND post_type= %s AND post_status = 'publish'", $page_title, $post_type ) ); 3210 3210 if ( $page ) 3211 3211 return get_page($page, $output); 3212 3212