Changeset 10254
- Timestamp:
- 12/26/2008 02:59:04 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r10226 r10254 742 742 $custom = get_post_custom($post_id); 743 743 744 return $custom[$key];744 return isset($custom[$key]) ? $custom[$key] : null; 745 745 } 746 746 … … 2590 2590 if ( 0 === strpos($file, $uploads['basedir']) ) //Check that the upload base exists in the file location 2591 2591 $url = str_replace($uploads['basedir'], $uploads['baseurl'], $file); //replace file location with url location 2592 elseif ( false !== strpos($file, 'wp-content/uploads') ) 2593 $url = $uploads['baseurl'] . substr( $file, strpos($file, 'wp-content/uploads') + 18 ); 2594 else 2595 $url = $uploads['baseurl'] . "/$file"; //Its a newly uploaded file, therefor $file is relative to the basedir. 2592 2596 } 2593 2597 }
Note: See TracChangeset
for help on using the changeset viewer.