Changeset 6780
- Timestamp:
- 02/11/2008 06:35:24 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/schema.php
r6748 r6780 239 239 add_option('show_avatars', '1'); 240 240 add_option('avatar_rating', 'G'); 241 add_option('upload_url_path', ''); 241 242 242 243 // Delete unused options -
trunk/wp-admin/options-misc.php
r6475 r6780 24 24 </td> 25 25 </tr> 26 27 <tr valign="top"> 28 <th scope="row"><?php _e('Full URL path to files (optional)'); ?>:</th> 29 <td><input name="upload_url_path" type="text" id="upload_url_path" class="code" value="<?php echo attribute_escape( get_option('upload_url_path')); ?>" size="40" /> 30 </td> 31 </tr> 32 26 33 <tr> 27 34 <td></td> … … 44 51 <p class="submit"> 45 52 <input type="hidden" name="action" value="update" /> 46 <input type="hidden" name="page_options" value="hack_file,use_linksupdate,uploads_use_yearmonth_folders,upload_path " />53 <input type="hidden" name="page_options" value="hack_file,use_linksupdate,uploads_use_yearmonth_folders,upload_path,upload_url_path" /> 47 54 <input type="submit" name="Submit" value="<?php _e('Update Options »') ?>" /> 48 55 </p> -
trunk/wp-includes/functions.php
r6777 r6780 1027 1027 function wp_upload_dir( $time = NULL ) { 1028 1028 $siteurl = get_option( 'siteurl' ); 1029 //prepend ABSPATH to $dir and $siteurl to $url if they're not already there 1030 $path = str_replace( ABSPATH, '', trim( get_option( 'upload_path' ) ) ); 1031 $dir = ABSPATH . $path; 1032 $url = trailingslashit( $siteurl ) . $path; 1029 $upload_path = $dir = get_option( 'upload_path' ); 1030 1031 if ( $upload_path != realpath( $upload_path ) ) { // not an absolute path 1032 //prepend ABSPATH to $dir and $siteurl to $url if they're not already there 1033 $path = str_replace( ABSPATH, '', trim( $upload_path ) ); 1034 $dir = ABSPATH . $path; 1035 } 1036 1037 if ( !$url = get_option( 'upload_url_path' ) ) 1038 $url = trailingslashit( $siteurl ) . $path; 1033 1039 1034 1040 if ( $dir == ABSPATH ) // the option was empty
Note: See TracChangeset
for help on using the changeset viewer.