Ticket #25157: post.php.diff
File post.php.diff, 818 bytes (added by , 11 years ago) |
---|
-
wp-page-title/wp-includes/post.php
3505 3505 */ 3506 3506 function get_page_by_title($page_title, $output = OBJECT, $post_type = 'page' ) { 3507 3507 global $wpdb; 3508 $page = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_title = %s AND post_type= %s", $page_title, $post_type ) ); 3508 $page_title = array_shift( apply_filters( 'wp_insert_post_data', array( $page_title ), array( 'post_title' => $page_title ) ) ); 3509 $page = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_title = %s AND post_type= %s", $page_title, $post_type ) ); 3509 3510 if ( $page ) 3510 3511 return get_post( $page, $output ); 3511 3512