wp/wp-admin/options-media.php
changeset 18 be944660c56a
parent 16 a86126ab1dd4
child 19 3d72ae0968f4
equal deleted inserted replaced
17:34716fd837a4 18:be944660c56a
    16 $title       = __( 'Media Settings' );
    16 $title       = __( 'Media Settings' );
    17 $parent_file = 'options-general.php';
    17 $parent_file = 'options-general.php';
    18 
    18 
    19 $media_options_help = '<p>' . __( 'You can set maximum sizes for images inserted into your written content; you can also insert an image as Full Size.' ) . '</p>';
    19 $media_options_help = '<p>' . __( 'You can set maximum sizes for images inserted into your written content; you can also insert an image as Full Size.' ) . '</p>';
    20 
    20 
    21 if ( ! is_multisite() && ( get_option( 'upload_url_path' ) || ( get_option( 'upload_path' ) != 'wp-content/uploads' && get_option( 'upload_path' ) ) ) ) {
    21 if ( ! is_multisite()
       
    22 	&& ( get_option( 'upload_url_path' )
       
    23 		|| get_option( 'upload_path' ) && 'wp-content/uploads' !== get_option( 'upload_path' ) )
       
    24 ) {
    22 	$media_options_help .= '<p>' . __( 'Uploading Files allows you to choose the folder and path for storing your uploaded files.' ) . '</p>';
    25 	$media_options_help .= '<p>' . __( 'Uploading Files allows you to choose the folder and path for storing your uploaded files.' ) . '</p>';
    23 }
    26 }
    24 
    27 
    25 $media_options_help .= '<p>' . __( 'You must click the Save Changes button at the bottom of the screen for new settings to take effect.' ) . '</p>';
    28 $media_options_help .= '<p>' . __( 'You must click the Save Changes button at the bottom of the screen for new settings to take effect.' ) . '</p>';
    26 
    29 
   110 	/*
   113 	/*
   111 	 * If upload_url_path is not the default (empty),
   114 	 * If upload_url_path is not the default (empty),
   112 	 * or upload_path is not the default ('wp-content/uploads' or empty),
   115 	 * or upload_path is not the default ('wp-content/uploads' or empty),
   113 	 * they can be edited, otherwise they're locked.
   116 	 * they can be edited, otherwise they're locked.
   114 	 */
   117 	 */
   115 	if ( get_option( 'upload_url_path' ) || ( get_option( 'upload_path' ) != 'wp-content/uploads' && get_option( 'upload_path' ) ) ) :
   118 	if ( get_option( 'upload_url_path' )
       
   119 		|| get_option( 'upload_path' ) && 'wp-content/uploads' !== get_option( 'upload_path' ) ) :
   116 		?>
   120 		?>
   117 <tr>
   121 <tr>
   118 <th scope="row"><label for="upload_path"><?php _e( 'Store uploads in this folder' ); ?></label></th>
   122 <th scope="row"><label for="upload_path"><?php _e( 'Store uploads in this folder' ); ?></label></th>
   119 <td><input name="upload_path" type="text" id="upload_path" value="<?php echo esc_attr( get_option( 'upload_path' ) ); ?>" class="regular-text code" />
   123 <td><input name="upload_path" type="text" id="upload_path" value="<?php echo esc_attr( get_option( 'upload_path' ) ); ?>" class="regular-text code" />
   120 <p class="description">
   124 <p class="description">