Make WordPress Core


Ignore:
Timestamp:
05/19/2010 05:12:01 AM (16 years ago)
Author:
markjaquith
Message:

Cast global_terms_enabled to bool before doing checked() so that FALSE matches as well as 0.

File:
1 edited

Legend:

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

    r14669 r14734  
    5656                <th scope="row"><?php _e( 'Global Terms' ) ?></th>
    5757                <td>
    58                 <label><input type="radio" name="global_terms_enabled" value="0"<?php checked( get_site_option( 'global_terms_enabled' ), 0 ) ?>/> <?php _e( 'Disabled' ); ?></label><br/>
    59                 <label><input type="radio" name="global_terms_enabled" value="1"<?php checked( get_site_option( 'global_terms_enabled' ), 1 ) ?>/> <?php _e( 'Maintain a global list of terms from all sites across the network.' ); ?></label><br />
     58                <label><input type="radio" name="global_terms_enabled" value="0"<?php checked( !! get_site_option( 'global_terms_enabled' ), false ) ?>/> <?php _e( 'Disabled' ); ?></label><br/>
     59                <label><input type="radio" name="global_terms_enabled" value="1"<?php checked( !! get_site_option( 'global_terms_enabled' ), true ) ?>/> <?php _e( 'Maintain a global list of terms from all sites across the network.' ); ?></label><br />
    6060                <?php if ( ! get_site_option( 'global_terms_enabled') ) { ?>
    6161                <strong><?php _e( 'Warning!' ); ?></strong> <?php _e( 'Enabling global terms will create a new table and synchronize terms across the network.' ); ?>
Note: See TracChangeset for help on using the changeset viewer.