Make WordPress Core

Changeset 36890


Ignore:
Timestamp:
03/09/2016 04:36:51 AM (9 years ago)
Author:
westonruter
Message:

Customize: Remove selective refresh error message from appearing inline within the preview.

The error message will still be available in the developer console.

Removes part of [36586].
See #27355.
Fixes #36164.

Location:
trunk/src/wp-includes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/css/customize-preview.css

    r36586 r36890  
    1111    box-shadow: none;
    1212}
    13 
    14 .customize-render-content-error {
    15     outline: solid 1px red;
    16 }
    17 .customize-render-content-error-message {
    18     display: block;
    19     padding: 1em;
    20     background-color: #FFCCCC;
    21 }
  • trunk/src/wp-includes/customize/class-wp-customize-selective-refresh.php

    r36643 r36890  
    183183            'l10n'           => array(
    184184                'shiftClickToEdit' => __( 'Shift-click to edit this element.' ),
    185                 /* translators: %s: message from JS error */
    186                 'errorMessageTpl'  => __( 'Script error: %s' ),
    187185                /* translators: %s: document.write() */
    188186                'badDocumentWrite' => sprintf( __( '%s is forbidden' ), 'document.write()' ),
  • trunk/src/wp-includes/js/customize-selective-refresh.js

    r36709 r36890  
    315315                    console.error( partial.id, error );
    316316                }
    317                 placement.container.addClass( 'customize-render-content-error' );
    318                 errorMessageElement = placement.container.find( '.customize-render-content-error-message:first' );
    319                 if ( ! errorMessageElement.length ) {
    320                     errorMessageElement = $( '<span class="customize-render-content-error-message"><span>' );
    321                     placement.container.append( errorMessageElement );
    322                 }
    323                 errorMessageElement.text( self.data.l10n.errorMessageTpl.replace( '%s', error.message ) );
    324317            }
    325318            /* jshint ignore:start */
Note: See TracChangeset for help on using the changeset viewer.