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. git-svn-id: https://develop.svn.wordpress.org/trunk@36890 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
dcbbeffc57
commit
c2c1c3fd3a
@ -10,12 +10,3 @@
|
|||||||
-webkit-box-shadow: none;
|
-webkit-box-shadow: none;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.customize-render-content-error {
|
|
||||||
outline: solid 1px red;
|
|
||||||
}
|
|
||||||
.customize-render-content-error-message {
|
|
||||||
display: block;
|
|
||||||
padding: 1em;
|
|
||||||
background-color: #FFCCCC;
|
|
||||||
}
|
|
||||||
|
@ -182,8 +182,6 @@ final class WP_Customize_Selective_Refresh {
|
|||||||
'renderQueryVar' => self::RENDER_QUERY_VAR,
|
'renderQueryVar' => self::RENDER_QUERY_VAR,
|
||||||
'l10n' => array(
|
'l10n' => array(
|
||||||
'shiftClickToEdit' => __( 'Shift-click to edit this element.' ),
|
'shiftClickToEdit' => __( 'Shift-click to edit this element.' ),
|
||||||
/* translators: %s: message from JS error */
|
|
||||||
'errorMessageTpl' => __( 'Script error: %s' ),
|
|
||||||
/* translators: %s: document.write() */
|
/* translators: %s: document.write() */
|
||||||
'badDocumentWrite' => sprintf( __( '%s is forbidden' ), 'document.write()' ),
|
'badDocumentWrite' => sprintf( __( '%s is forbidden' ), 'document.write()' ),
|
||||||
),
|
),
|
||||||
|
@ -314,13 +314,6 @@ wp.customize.selectiveRefresh = ( function( $, api ) {
|
|||||||
if ( 'undefined' !== typeof console && console.error ) {
|
if ( 'undefined' !== typeof console && console.error ) {
|
||||||
console.error( partial.id, error );
|
console.error( partial.id, error );
|
||||||
}
|
}
|
||||||
placement.container.addClass( 'customize-render-content-error' );
|
|
||||||
errorMessageElement = placement.container.find( '.customize-render-content-error-message:first' );
|
|
||||||
if ( ! errorMessageElement.length ) {
|
|
||||||
errorMessageElement = $( '<span class="customize-render-content-error-message"><span>' );
|
|
||||||
placement.container.append( errorMessageElement );
|
|
||||||
}
|
|
||||||
errorMessageElement.text( self.data.l10n.errorMessageTpl.replace( '%s', error.message ) );
|
|
||||||
}
|
}
|
||||||
/* jshint ignore:start */
|
/* jshint ignore:start */
|
||||||
document.write = self.orginalDocumentWrite;
|
document.write = self.orginalDocumentWrite;
|
||||||
|
Loading…
Reference in New Issue
Block a user