Make WordPress Core


Ignore:
Timestamp:
10/12/2015 12:00:28 AM (10 years ago)
Author:
jeremyfelt
Message:

MS: Reflect falsy values for upload_space_check_disabled in UI.

If the network option for upload_space_check_disabled is missing or an empty string, we should reflect how it will be treated elsewhere in the UI.

Props stephenharris.
Fixes #33986.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/network/settings.php

    r34912 r35026  
    274274                <th scope="row"><?php _e( 'Site upload space' ) ?></th>
    275275                <td>
    276                     <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' ), '</label><label><input name="blog_upload_space" type="number" min="0" style="width: 100px" id="blog_upload_space" aria-describedby="blog-upload-space-desc" value="' . esc_attr( get_site_option('blog_upload_space', 100) ) . '" />' ); ?></label><br />
     276                    <label><input type="checkbox" id="upload_space_check_disabled" name="upload_space_check_disabled" value="0"<?php checked( (bool) get_site_option( 'upload_space_check_disabled' ), false ) ?>/> <?php printf( __( 'Limit total size of files uploaded to %s MB' ), '</label><label><input name="blog_upload_space" type="number" min="0" style="width: 100px" id="blog_upload_space" aria-describedby="blog-upload-space-desc" value="' . esc_attr( get_site_option('blog_upload_space', 100) ) . '" />' ); ?></label><br />
    277277                    <p class="screen-reader-text" id="blog-upload-space-desc">
    278278                        <?php _e( 'Size in megabytes' ) ?>
Note: See TracChangeset for help on using the changeset viewer.