Make WordPress Core

Ticket #38668: 38668.0.diff

File 38668.0.diff, 2.8 KB (added by westonruter, 9 years ago)

Deprecate WP_Customize_Manager::customize_preview_loading_style(), moving styles to customize-preview.css. Add screen-reader-text rule.

  • src/wp-includes/class-wp-customize-manager.php

    diff --git src/wp-includes/class-wp-customize-manager.php src/wp-includes/class-wp-customize-manager.php
    index a67ccfb..bd21b1c 100644
    final class WP_Customize_Manager { 
    12301230                add_filter( 'wp_redirect', array( $this, 'add_state_query_params' ) );
    12311231
    12321232                wp_enqueue_script( 'customize-preview' );
    1233                 add_action( 'wp_head', array( $this, 'customize_preview_loading_style' ) );
    12341233                add_action( 'wp_footer', array( $this, 'customize_preview_settings' ), 20 );
    12351234                add_filter( 'get_edit_post_link', '__return_empty_string' );
    12361235
    final class WP_Customize_Manager { 
    13411340         * Print CSS for loading indicators for the Customizer preview.
    13421341         *
    13431342         * @since 4.2.0
    1344          * @access public
     1343         * @deprecated 4.7.0 Moved to `customize-preview.css`.
    13451344         */
    13461345        public function customize_preview_loading_style() {
    1347                 ?><style>
    1348                         body.wp-customizer-unloading {
    1349                                 opacity: 0.25;
    1350                                 cursor: progress !important;
    1351                                 -webkit-transition: opacity 0.5s;
    1352                                 transition: opacity 0.5s;
    1353                         }
    1354                         body.wp-customizer-unloading * {
    1355                                 pointer-events: none !important;
    1356                         }
    1357                         form.customize-unpreviewable,
    1358                         form.customize-unpreviewable input,
    1359                         form.customize-unpreviewable select,
    1360                         form.customize-unpreviewable button,
    1361                         a.customize-unpreviewable,
    1362                         area.customize-unpreviewable {
    1363                                 cursor: not-allowed !important;
    1364                         }
    1365                 </style><?php
     1346                _deprecated_function( __FUNCTION__, '4.7.0' );
    13661347        }
    13671348
    13681349        /**
  • src/wp-includes/css/customize-preview.css

    diff --git src/wp-includes/css/customize-preview.css src/wp-includes/css/customize-preview.css
    index ad219e4..bde8fd5 100644
     
     1body.wp-customizer-unloading {
     2        opacity: 0.25;
     3        cursor: progress !important;
     4        -webkit-transition: opacity 0.5s;
     5        transition: opacity 0.5s;
     6}
     7body.wp-customizer-unloading * {
     8        pointer-events: none !important;
     9}
     10form.customize-unpreviewable,
     11form.customize-unpreviewable input,
     12form.customize-unpreviewable select,
     13form.customize-unpreviewable button,
     14a.customize-unpreviewable,
     15area.customize-unpreviewable {
     16        cursor: not-allowed !important;
     17}
     18
     19.screen-reader-text {
     20        position: absolute !important;
     21        clip: rect(1px, 1px, 1px, 1px);
     22        overflow: hidden;
     23        height: 1px;
     24        width: 1px;
     25}
     26.screen-reader-text:hover,
     27.screen-reader-text:active,
     28.screen-reader-text:focus {
     29        background: #fff;
     30        border: 2px solid #333;
     31        border-radius: 3px;
     32        clip: auto !important;
     33        color: #000;
     34        display: block;
     35        font-size: 12px;
     36        height: auto;
     37        padding: 12px;
     38        position: absolute;
     39        top: 5px;
     40        left: 5px;
     41        width: auto;
     42        z-index: 100000; /* Above WP toolbar */
     43}
     44
    145.customize-partial-refreshing {
    246        opacity: 0.25;
    347        -webkit-transition: opacity 0.25s;