Changeset 21597 for trunk/wp-includes/post.php
- Timestamp:
- 08/23/2012 08:01:10 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/post.php (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r21572 r21597 587 587 */ 588 588 function get_post_mime_type($ID = '') { 589 $post = &get_post($ID);589 $post = get_post($ID); 590 590 591 591 if ( is_object($post) ) … … 3349 3349 3350 3350 if ( $foundid ) 3351 return get_p age( $foundid, $output );3351 return get_post( $foundid, $output ); 3352 3352 3353 3353 return null; … … 3369 3369 $page = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_title = %s AND post_type= %s", $page_title, $post_type ) ); 3370 3370 if ( $page ) 3371 return get_p age($page, $output);3371 return get_post( $page, $output ); 3372 3372 3373 3373 return null; … … 3456 3456 function get_page_uri($page) { 3457 3457 if ( ! is_object($page) ) 3458 $page = get_p age($page);3458 $page = get_post( $page ); 3459 3459 $uri = $page->post_name; 3460 3460 3461 3461 foreach ( $page->ancestors as $parent ) { 3462 $uri = get_p age($parent)->post_name . "/" . $uri;3462 $uri = get_post( $parent )->post_name . "/" . $uri; 3463 3463 } 3464 3464 … … 3717 3717 return true; 3718 3718 if ( $id = url_to_postid($url) ) { 3719 $post = &get_post($id);3719 $post = get_post($id); 3720 3720 if ( 'attachment' == $post->post_type ) 3721 3721 return true; … … 4013 4013 function wp_get_attachment_metadata( $post_id = 0, $unfiltered = false ) { 4014 4014 $post_id = (int) $post_id; 4015 if ( !$post = &get_post( $post_id ) )4015 if ( !$post = get_post( $post_id ) ) 4016 4016 return false; 4017 4017 … … 4035 4035 function wp_update_attachment_metadata( $post_id, $data ) { 4036 4036 $post_id = (int) $post_id; 4037 if ( !$post = &get_post( $post_id ) )4037 if ( !$post = get_post( $post_id ) ) 4038 4038 return false; 4039 4039 … … 4053 4053 function wp_get_attachment_url( $post_id = 0 ) { 4054 4054 $post_id = (int) $post_id; 4055 if ( !$post = &get_post( $post_id ) )4055 if ( !$post = get_post( $post_id ) ) 4056 4056 return false; 4057 4057 … … 4092 4092 function wp_get_attachment_thumb_file( $post_id = 0 ) { 4093 4093 $post_id = (int) $post_id; 4094 if ( !$post = &get_post( $post_id ) )4094 if ( !$post = get_post( $post_id ) ) 4095 4095 return false; 4096 4096 if ( !is_array( $imagedata = wp_get_attachment_metadata( $post->ID ) ) ) … … 4114 4114 function wp_get_attachment_thumb_url( $post_id = 0 ) { 4115 4115 $post_id = (int) $post_id; 4116 if ( !$post = &get_post( $post_id ) )4116 if ( !$post = get_post( $post_id ) ) 4117 4117 return false; 4118 4118 if ( !$url = wp_get_attachment_url( $post->ID ) ) … … 4141 4141 function wp_attachment_is_image( $post_id = 0 ) { 4142 4142 $post_id = (int) $post_id; 4143 if ( !$post = &get_post( $post_id ) )4143 if ( !$post = get_post( $post_id ) ) 4144 4144 return false; 4145 4145 … … 4172 4172 if ( is_numeric($mime) ) { 4173 4173 $mime = (int) $mime; 4174 if ( $post = &get_post( $mime ) ) {4174 if ( $post = get_post( $mime ) ) { 4175 4175 $post_id = (int) $post->ID; 4176 4176 $ext = preg_replace('/^.+?\.([^.]+)$/', '$1', $post->guid);
Note: See TracChangeset
for help on using the changeset viewer.