Restore MultiSite checks on Upload settings, Add proper whitelisting. Props Denis-de-Bernardy. Fixes #11687
git-svn-id: http://svn.automattic.com/wordpress/trunk@13545 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4b45b18c1d
commit
44308debbe
|
@ -90,6 +90,7 @@ include('admin-header.php');
|
||||||
<?php do_settings_fields('media', 'embeds'); ?>
|
<?php do_settings_fields('media', 'embeds'); ?>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<?php if ( !is_multisite() ) : ?>
|
||||||
<h3><?php _e('Uploading Files'); ?></h3>
|
<h3><?php _e('Uploading Files'); ?></h3>
|
||||||
<table class="form-table">
|
<table class="form-table">
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
|
@ -117,6 +118,7 @@ include('admin-header.php');
|
||||||
|
|
||||||
<?php do_settings_fields('media', 'uploads'); ?>
|
<?php do_settings_fields('media', 'uploads'); ?>
|
||||||
</table>
|
</table>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php do_settings_sections('media'); ?>
|
<?php do_settings_sections('media'); ?>
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@ $whitelist_options = array(
|
||||||
'options' => array( '' ) );
|
'options' => array( '' ) );
|
||||||
|
|
||||||
$mail_options = array('mailserver_url', 'mailserver_port', 'mailserver_login', 'mailserver_pass');
|
$mail_options = array('mailserver_url', 'mailserver_port', 'mailserver_login', 'mailserver_pass');
|
||||||
|
$uploads_options = array('uploads_use_yearmonth_folders', 'upload_path', 'upload_url_path');
|
||||||
|
|
||||||
if ( !is_multisite() ) {
|
if ( !is_multisite() ) {
|
||||||
if ( !defined( 'WP_SITEURL' ) ) $whitelist_options['general'][] = 'siteurl';
|
if ( !defined( 'WP_SITEURL' ) ) $whitelist_options['general'][] = 'siteurl';
|
||||||
|
@ -45,6 +46,8 @@ if ( !is_multisite() ) {
|
||||||
|
|
||||||
$whitelist_options['writing'] = array_merge($whitelist_options['writing'], $mail_options);
|
$whitelist_options['writing'] = array_merge($whitelist_options['writing'], $mail_options);
|
||||||
$whitelist_options['writing'][] = 'ping_sites';
|
$whitelist_options['writing'][] = 'ping_sites';
|
||||||
|
|
||||||
|
$whitelist_options['media'] = array_merge($whitelist_options['media'], $uploads_options);
|
||||||
} else {
|
} else {
|
||||||
$whitelist_options['general'][] = 'new_admin_email';
|
$whitelist_options['general'][] = 'new_admin_email';
|
||||||
$whitelist_options['general'][] = 'WPLANG';
|
$whitelist_options['general'][] = 'WPLANG';
|
||||||
|
|
Loading…
Reference in New Issue