Make WordPress Core


Ignore:
Timestamp:
03/22/2010 06:02:04 AM (16 years ago)
Author:
nacin
Message:

More ms-options cleanup. Add label elements, and transition to checkboxes from radios where we can. Also fix notice in global_terms_enabled post handling.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/ms-edit.php

    r13733 r13796  
    109109        update_site_option( "dashboard_blog", $dashboard_blog_id );
    110110        // global terms
    111         if ( !global_terms_enabled() && '1' == $_POST[ 'global_terms_enabled' ] ) {
     111        if ( !global_terms_enabled() && ! empty( $_POST[ 'global_terms_enabled' ] ) ) {
    112112            require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
    113113            // create global terms table
     
    115115        }
    116116        $options = array( 'registrationnotification', 'registration', 'add_new_users', 'menu_items', 'mu_media_buttons', 'upload_space_check_disabled', 'blog_upload_space', 'upload_filetypes', 'site_name', 'first_post', 'first_page', 'first_comment', 'first_comment_url', 'first_comment_author', 'welcome_email', 'welcome_user_email', 'fileupload_maxk', 'admin_notice_feed', 'global_terms_enabled' );
    117         $checked_options = array('mu_media_buttons', 'menu_items');
    118         foreach ( $checked_options as $option_name ) {
     117        $checked_options = array('mu_media_buttons' => array(), 'menu_items' => array(), 'registrationnotification' => 'no', 'upload_space_check_disabled' => 1 );
     118        foreach ( $checked_options as $option_name => $option_unchecked_value ) {
    119119            if ( ! isset($_POST[ $option_name ]) )
    120                 $_POST[ $option_name ] = array();
     120                $_POST[ $option_name ] = $option_unchecked_value;
    121121        }
    122122        foreach ( $options as $option_name ) {
Note: See TracChangeset for help on using the changeset viewer.