From e0ede8988163d46b53feb66c3fe61bfac7768439 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 1 Jun 2020 11:20:16 +0000 Subject: [PATCH] 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 --- src/wp-admin/options-media.php | 6 +++++- src/wp-admin/options.php | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/wp-admin/options-media.php b/src/wp-admin/options-media.php index eabf64db91..6236b20f6d 100644 --- a/src/wp-admin/options-media.php +++ b/src/wp-admin/options-media.php @@ -107,7 +107,11 @@ if ( isset( $GLOBALS['wp_settings']['media']['embeds'] ) ) :

diff --git a/src/wp-admin/options.php b/src/wp-admin/options.php index fcbb960209..4b02b673c3 100644 --- a/src/wp-admin/options.php +++ b/src/wp-admin/options.php @@ -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';