Make WordPress Core


Ignore:
Timestamp:
09/14/2012 09:00:39 PM (11 years ago)
Author:
nacin
Message:

Hide upload_path and upload_url_path from the Media Settings screen, assuming they are both set to their default values.

These can be set on options.php, or the UPLOADS constant or the filters in wp_upload_dir() should be used. WordPress should aim to avoid UI options that require filesystem changes as well, not to mention requiring the user to convert between paths and URLs.

fixes #21720.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/options-media.php

    r20605 r21852  
    122122<h3><?php _e('Uploading Files'); ?></h3>
    123123<table class="form-table">
     124<?php
     125// If upload_url_path is not the default (empty), and upload_path is not the default ('wp-content/uploads' or empty)
     126if ( get_option('upload_url_path') || ( get_option('upload_path') != 'wp-content/uploads' && get_option('upload_path') ) ) :
     127?>
    124128<tr valign="top">
    125129<th scope="row"><label for="upload_path"><?php _e('Store uploads in this folder'); ?></label></th>
     
    135139</td>
    136140</tr>
    137 
     141<?php endif; ?>
    138142<tr>
    139143<th scope="row" colspan="2" class="th-full">
Note: See TracChangeset for help on using the changeset viewer.