- Timestamp:
- 11/13/2017 09:18:49 PM (7 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/customize-controls.js
r42144 r42171 5281 5281 } ); 5282 5282 api.Control.prototype.initialize.call( control, id, options ); 5283 5284 // Note that rendering is debounced so the props will be used when rendering happens after add event. 5285 control.notifications.bind( 'add', function( notification ) { 5286 5287 // Skip if control notification is not from setting csslint_error notification. 5288 if ( notification.code !== control.setting.id + ':csslint_error' ) { 5289 return; 5290 } 5291 5292 // Customize the template and behavior of csslint_error notifications. 5293 notification.templateId = 'customize-code-editor-lint-error-notification'; 5294 notification.render = (function( render ) { 5295 return function() { 5296 var li = render.call( this ); 5297 li.find( 'input[type=checkbox]' ).on( 'click', function() { 5298 control.setting.notifications.remove( 'csslint_error' ); 5299 } ); 5300 return li; 5301 }; 5302 })( notification.render ); 5303 } ); 5283 5304 }, 5284 5305 -
trunk/src/wp-includes/class-wp-customize-manager.php
r42122 r42171 4126 4126 </script> 4127 4127 4128 <script type="text/html" id="tmpl-customize-code-editor-lint-error-notification"> 4129 <li class="notice notice-{{ data.type || 'info' }} {{ data.alt ? 'notice-alt' : '' }} {{ data.dismissible ? 'is-dismissible' : '' }} {{ data.containerClasses || '' }}" data-code="{{ data.code }}" data-type="{{ data.type }}"> 4130 <div class="notification-message">{{{ data.message || data.code }}}</div> 4131 4132 <p> 4133 <# var elementId = 'el-' + String( Math.random() ); #> 4134 <input id="{{ elementId }}" type="checkbox"> 4135 <label for="{{ elementId }}"><?php _e( 'Update anyway, even though it might break your site?' ); ?></label> 4136 </p> 4137 </li> 4138 </script> 4139 4128 4140 <?php 4129 4141 /* The following template is obsolete in core but retained for plugins. */
Note: See TracChangeset
for help on using the changeset viewer.