Docs: Correct and clarify an inline comment about the upload_url_path and upload_path options in wp-admin/options-media.php.

Synchronize it with a similar comment in `wp-admin/options.php`.

See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@47874 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2020-06-01 11:20:16 +00:00
parent bec349c649
commit e0ede89881
2 changed files with 10 additions and 2 deletions

View File

@ -107,7 +107,11 @@ if ( isset( $GLOBALS['wp_settings']['media']['embeds'] ) ) :
<h2 class="title"><?php _e( 'Uploading Files' ); ?></h2>
<table class="form-table" role="presentation">
<?php
// If upload_url_path is not the default (empty), and upload_path is not the default ('wp-content/uploads' or empty).
/*
* If upload_url_path is not the default (empty),
* or upload_path is not the default ('wp-content/uploads' or empty),
* they can be edited, otherwise they're locked.
*/
if ( get_option( 'upload_url_path' ) || ( get_option( 'upload_path' ) != 'wp-content/uploads' && get_option( 'upload_path' ) ) ) :
?>
<tr>

View File

@ -177,7 +177,11 @@ if ( ! is_multisite() ) {
$whitelist_options['media'][] = 'uploads_use_yearmonth_folders';
// If upload_url_path and upload_path are both default values, they're locked.
/*
* If upload_url_path is not the default (empty),
* or upload_path is not the default ('wp-content/uploads' or empty),
* they can be edited, otherwise they're locked.
*/
if ( get_option( 'upload_url_path' ) || ( get_option( 'upload_path' ) != 'wp-content/uploads' && get_option( 'upload_path' ) ) ) {
$whitelist_options['media'][] = 'upload_path';
$whitelist_options['media'][] = 'upload_url_path';