WordPress.org

Make WordPress Core

Changeset 14655


Ignore:
Timestamp:
05/15/10 05:58:57 (4 years ago)
Author:
nacin
Message:

Validation and some textarea escaping for ms-options. props Utkarsh, see #13383.

File:
1 edited

Legend:

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

    r14494 r14655  
    5656                <th scope="row"><?php _e( 'Global Terms' ) ?></th> 
    5757                <td> 
    58                 <label><input type="radio" id="global_terms_enabled" 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" id="global_terms_enabled" 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' ), 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 /> 
    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.' ); ?> 
     
    154154                    <?php $limited_email_domains = get_site_option( 'limited_email_domains' ); 
    155155                    $limited_email_domains = str_replace( ' ', "\n", $limited_email_domains ); ?> 
    156                     <textarea name="limited_email_domains" id="limited_email_domains" cols="45" rows="5"><?php echo wp_htmledit_pre( $limited_email_domains == '' ? '' : implode( "\n", (array) $limited_email_domains ) ); ?></textarea> 
     156                    <textarea name="limited_email_domains" id="limited_email_domains" cols="45" rows="5"> 
     157<?php echo wp_htmledit_pre( $limited_email_domains == '' ? '' : implode( "\n", (array) $limited_email_domains ) ); ?></textarea> 
    157158                    <br /> 
    158159                    <?php _e( 'If you want to limit site registrations to certain domains. One domain per line.' ) ?> 
     
    163164                <th scope="row"><label for="banned_email_domains"><?php _e('Banned Email Domains') ?></label></th> 
    164165                <td> 
    165                     <textarea name="banned_email_domains" id="banned_email_domains" cols="45" rows="5"><?php echo wp_htmledit_pre( get_site_option( 'banned_email_domains' ) == '' ? '' : implode( "\n", (array) get_site_option( 'banned_email_domains' ) ) ); ?></textarea> 
     166                    <textarea name="banned_email_domains" id="banned_email_domains" cols="45" rows="5"> 
     167<?php echo wp_htmledit_pre( get_site_option( 'banned_email_domains' ) == '' ? '' : implode( "\n", (array) get_site_option( 'banned_email_domains' ) ) ); ?></textarea> 
    166168                    <br /> 
    167169                    <?php _e( 'If you want to ban domains from site registrations. One domain per line.' ) ?> 
     
    176178                <th scope="row"><label for="welcome_email"><?php _e( 'Welcome Email' ) ?></label></th> 
    177179                <td> 
    178                     <textarea name="welcome_email" id="welcome_email" rows="5" cols="45" class="large-text"><?php echo stripslashes( get_site_option( 'welcome_email' ) ) ?></textarea> 
     180                    <textarea name="welcome_email" id="welcome_email" rows="5" cols="45" class="large-text"> 
     181<?php echo wp_htmledit_pre( stripslashes( get_site_option( 'welcome_email' ) ) ) ?></textarea> 
    179182                    <br /> 
    180183                    <?php _e( 'The welcome email sent to new site owners.' ) ?> 
     
    184187                <th scope="row"><label for="welcome_user_email"><?php _e( 'Welcome User Email' ) ?></label></th> 
    185188                <td> 
    186                     <textarea name="welcome_user_email" id="welcome_user_email" rows="5" cols="45" class="large-text"><?php echo stripslashes( get_site_option( 'welcome_user_email' ) ) ?></textarea> 
     189                    <textarea name="welcome_user_email" id="welcome_user_email" rows="5" cols="45" class="large-text"> 
     190<?php echo wp_htmledit_pre( stripslashes( get_site_option( 'welcome_user_email' ) ) ) ?></textarea> 
    187191                    <br /> 
    188192                    <?php _e( 'The welcome email sent to new users.' ) ?> 
     
    192196                <th scope="row"><label for="first_post"><?php _e( 'First Post' ) ?></label></th> 
    193197                <td> 
    194                     <textarea name="first_post" id="first_post" rows="5" cols="45" class="large-text"><?php echo stripslashes( get_site_option( 'first_post' ) ) ?></textarea> 
     198                    <textarea name="first_post" id="first_post" rows="5" cols="45" class="large-text"> 
     199<?php echo wp_htmledit_pre( stripslashes( get_site_option( 'first_post' ) ) ) ?></textarea> 
    195200                    <br /> 
    196201                    <?php _e( 'The first post on a new site.' ) ?> 
     
    200205                <th scope="row"><label for="first_page"><?php _e( 'First Page' ) ?></label></th> 
    201206                <td> 
    202                     <textarea name="first_page" id="first_page" rows="5" cols="45" class="large-text"><?php echo stripslashes( get_site_option('first_page') ) ?></textarea> 
     207                    <textarea name="first_page" id="first_page" rows="5" cols="45" class="large-text"> 
     208<?php echo wp_htmledit_pre( stripslashes( get_site_option('first_page') ) ) ?></textarea> 
    203209                    <br /> 
    204210                    <?php _e( 'The first page on a new site.' ) ?> 
     
    208214                <th scope="row"><label for="first_comment"><?php _e( 'First Comment' ) ?></label></th> 
    209215                <td> 
    210                     <textarea name="first_comment" id="first_comment" rows="5" cols="45" class="large-text"><?php echo stripslashes( get_site_option('first_comment') ) ?></textarea> 
     216                    <textarea name="first_comment" id="first_comment" rows="5" cols="45" class="large-text"> 
     217<?php echo wp_htmledit_pre( stripslashes( get_site_option('first_comment') ) ) ?></textarea> 
    211218                    <br /> 
    212219                    <?php _e( 'The first comment on a new site.' ) ?> 
     
    245252                <td> 
    246253                <label><input type="checkbox" id="upload_space_check_disabled" name="upload_space_check_disabled" value="0"<?php checked( get_site_option( 'upload_space_check_disabled' ), 0 ) ?>/> <?php printf( __( 'Limit total size of files uploaded to %s MB' ), '<input name="blog_upload_space" type="text" id="blog_upload_space" value="' . esc_attr( get_site_option('blog_upload_space', 10) ) . '" size="3" />' ); ?></label><br /> 
     254                </td> 
    247255            </tr> 
    248256 
Note: See TracChangeset for help on using the changeset viewer.