Make WordPress Core

Changeset 14854


Ignore:
Timestamp:
05/24/2010 08:45:59 PM (15 years ago)
Author:
nacin
Message:

Even better, remove all UI for global terms. Add a filter to global_terms_enabled() and also allow the site option to simply be deleted. fixes #12666.

Location:
trunk
Files:
2 edited

Legend:

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

    r14736 r14854  
    5151                    <?php printf( __( 'Registration and support emails will come from this address. An address such as <code>support@%s</code> is recommended.' ), $current_site->domain ); ?>
    5252                </td>
    53             </tr>
    54 
    55             <tr valign="top">
    56                 <th scope="row"><?php _e( 'Global Terms' ) ?></th>
    57                 <td>
    58                 <label><input type="radio" name="global_terms_enabled" value="0"<?php checked( global_terms_enabled(), false ) ?>/> <?php _e( 'Disabled' ); ?></label><br/>
    59                 <label><input type="radio" name="global_terms_enabled" value="1"<?php checked( global_terms_enabled(), true ) ?>/> <?php _e( 'Maintain a global list of terms from all sites across the network.' ); ?></label><br />
    60                 <?php if ( ! get_site_option( 'global_terms_enabled') ) { ?>
    61                 <strong><?php _e( 'Warning!' ); ?></strong> <?php _e( 'Enabling global terms will create a new table and synchronize terms across the network.' ); ?>
    62                 <?php } ?></td>
    6353            </tr>
    6454        </table>
  • trunk/wp-includes/functions.php

    r14777 r14854  
    38303830
    38313831/**
    3832  * are global terms enabled
     3832 * Whether global terms are enabled.
    38333833 *
    38343834 *
     
    38433843
    38443844    static $global_terms = null;
    3845     if ( is_null( $global_terms ) )
    3846         $global_terms = (bool) get_site_option( 'global_terms_enabled' );
     3845    if ( is_null( $global_terms ) ) {
     3846        $filter = apply_filters( 'global_terms_enabled', null );
     3847        if ( ! is_null( $filter ) )
     3848            $global_terms = (bool) $filter;
     3849        else
     3850            $global_terms = (bool) get_site_option( 'global_terms_enabled', false );
     3851    }
    38473852    return $global_terms;
    38483853}
Note: See TracChangeset for help on using the changeset viewer.