Changeset 4425
- Timestamp:
- 10/26/2006 07:55:10 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r4419 r4425 943 943 return get_page($page->ID, $output); 944 944 } 945 946 return NULL; 947 } 948 949 function get_page_by_title($page_title, $output = OBJECT) { 950 global $wpdb; 951 $page_title = $wpdb->escape($page_title); 952 $page = $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE post_title = '$page_title' AND post_type='page'"); 953 if ( $page ) 954 return get_page($page, $output); 945 955 946 956 return NULL;
Note: See TracChangeset
for help on using the changeset viewer.