]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/network/site-settings.php
WordPress 3.6.1-scripts
[autoinstalls/wordpress.git] / wp-admin / network / site-settings.php
index 35bcb4365c0f47785dc2bbf4b70cb277a646d2c0..c3aec75dee6605c26ab1fcea1cf7fc300412ad11 100644 (file)
@@ -16,14 +16,20 @@ if ( ! is_multisite() )
 if ( ! current_user_can( 'manage_sites' ) )
        wp_die( __( 'You do not have sufficient permissions to edit this site.' ) );
 
-add_contextual_help($current_screen,
-       '<p>' . __('The menu is for editing information specific to individual sites, particularly if the admin area of a site is unavailable.') . '</p>' .
-       '<p>' . __('<strong>Info</strong> - The domain and path are rarely edited as this can cause the site to not work properly. The Registered date and Last Updated date are displayed. Network admins can mark a site as archived, spam, deleted and mature, to remove from public listings or disable.') . '</p>' .
-       '<p>' . __('<strong>Users</strong> - This displays the users associated with this site. You can also change their role, reset their password, or remove them from the site. Removing the user from the site does not remove the user from the network.') . '</p>' .
-       '<p>' . sprintf( __('<strong>Themes</strong> - This area shows themes that are not already enabled across the network. Enabling a theme in this menu makes it accessible to this site. It does not activate the theme, but allows it to show in the site&#8217;s Appearance menu. To enable a theme for the entire network, see the <a href="%s">Network Themes</a> screen.' ), network_admin_url( 'themes.php' ) ) . '</p>' .
-       '<p>' . __('<strong>Settings</strong> - This page shows a list of all settings associated with this site. Some are created by WordPress and others are created by plugins you activate. Note that some fields are grayed out and say Serialized Data. You cannot modify these values due to the way the setting is stored in the database.') . '</p>' .
+get_current_screen()->add_help_tab( array(
+       'id'      => 'overview',
+       'title'   => __('Overview'),
+       'content' =>
+               '<p>' . __('The menu is for editing information specific to individual sites, particularly if the admin area of a site is unavailable.') . '</p>' .
+               '<p>' . __('<strong>Info</strong> - The domain and path are rarely edited as this can cause the site to not work properly. The Registered date and Last Updated date are displayed. Network admins can mark a site as archived, spam, deleted and mature, to remove from public listings or disable.') . '</p>' .
+               '<p>' . __('<strong>Users</strong> - This displays the users associated with this site. You can also change their role, reset their password, or remove them from the site. Removing the user from the site does not remove the user from the network.') . '</p>' .
+               '<p>' . sprintf( __('<strong>Themes</strong> - This area shows themes that are not already enabled across the network. Enabling a theme in this menu makes it accessible to this site. It does not activate the theme, but allows it to show in the site&#8217;s Appearance menu. To enable a theme for the entire network, see the <a href="%s">Network Themes</a> screen.' ), network_admin_url( 'themes.php' ) ) . '</p>' .
+               '<p>' . __('<strong>Settings</strong> - This page shows a list of all settings associated with this site. Some are created by WordPress and others are created by plugins you activate. Note that some fields are grayed out and say Serialized Data. You cannot modify these values due to the way the setting is stored in the database.') . '</p>'
+) );
+
+get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="http://codex.wordpress.org/Network_Admin_Sites_Screens" target="_blank">Documentation on Site Management</a>') . '</p>' .
+       '<p>' . __('<a href="http://codex.wordpress.org/Network_Admin_Sites_Screen" target="_blank">Documentation on Site Management</a>') . '</p>' .
        '<p>' . __('<a href="http://wordpress.org/support/forum/multisite/" target="_blank">Support Forums</a>') . '</p>'
 );
 
@@ -43,17 +49,13 @@ if ( isset($_REQUEST['action']) && 'update-site' == $_REQUEST['action'] && is_ar
 
        switch_to_blog( $id );
 
-       $c = 1;
-       $count = count( $_POST['option'] );
        $skip_options = array( 'allowedthemes' ); // Don't update these options since they are handled elsewhere in the form.
        foreach ( (array) $_POST['option'] as $key => $val ) {
+               $key = wp_unslash( $key );
+               $val = wp_unslash( $val );
                if ( $key === 0 || is_array( $val ) || in_array($key, $skip_options) )
                        continue; // Avoids "0 is a protected WP option and may not be modified" error when edit blog options
-               if ( $c == $count )
-                       update_option( $key, stripslashes( $val ) );
-               else
-                       update_option( $key, stripslashes( $val ), false ); // no need to refresh blog details yet
-               $c++;
+               update_option( $key, $val );
        }
 
        do_action( 'wpmu_update_blog_options' );
@@ -92,7 +94,7 @@ $tabs = array(
 );
 foreach ( $tabs as $tab_id => $tab ) {
        $class = ( $tab['url'] == $pagenow ) ? ' nav-tab-active' : '';
-       echo '<a href="' . $tab['url'] . '?id=' . $id .'" class="nav-tab' . $class . '">' .  esc_html( $tab['label'] ) . '</a>';
+       echo '<a href="' . $tab['url'] . '?id=' . $id .'" class="nav-tab' . $class . '">' . esc_html( $tab['label'] ) . '</a>';
 }
 ?>
 </h3>
@@ -115,7 +117,7 @@ if ( ! empty( $messages ) ) {
                        $class = 'all-options';
                        if ( is_serialized( $option->option_value ) ) {
                                if ( is_serialized_string( $option->option_value ) ) {
-                                       $option->option_value = esc_html( maybe_unserialize( $option->option_value ), 'single' );
+                                       $option->option_value = esc_html( maybe_unserialize( $option->option_value ) );
                                } else {
                                        $option->option_value = 'SERIALIZED DATA';
                                        $disabled = true;