Changeset 10253
- Timestamp:
- 12/26/2008 02:57:35 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.7/wp-includes/post.php
r10214 r10253 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 … … 2541 2541 if ( 0 === strpos($file, $uploads['basedir']) ) //Check that the upload base exists in the file location 2542 2542 $url = str_replace($uploads['basedir'], $uploads['baseurl'], $file); //replace file location with url location 2543 elseif ( false !== strpos($file, 'wp-content/uploads') ) 2544 $url = $uploads['baseurl'] . substr( $file, strpos($file, 'wp-content/uploads') + 18 ); 2545 else 2546 $url = $uploads['baseurl'] . "/$file"; //Its a newly uploaded file, therefor $file is relative to the basedir. 2543 2547 } 2544 2548 }
Note: See TracChangeset
for help on using the changeset viewer.