diff --git src/wp-includes/class-wp-customize-manager.php src/wp-includes/class-wp-customize-manager.php
index 5ee3b6d..7a11e7e 100644
|
|
|
final class WP_Customize_Manager { |
| 1535 | 1535 | <script type="text/html" id="tmpl-customize-control-notifications"> |
| 1536 | 1536 | <ul> |
| 1537 | 1537 | <# _.each( data.notifications, function( notification ) { #> |
| 1538 | | <li class="notice notice-{{ notification.type || 'info' }} {{ data.altNotice ? 'notice-alt' : '' }}" data-code="{{ notification.code }}" data-type="{{ notification.type }}">{{ notification.message || notification.code }}</li> |
| | 1538 | <li class="notice notice-{{ notification.type || 'info' }} {{ data.altNotice ? 'notice-alt' : '' }}" data-code="{{ notification.code }}" data-type="{{ notification.type }}"> |
| | 1539 | <# if ( notification.template ) { #> |
| | 1540 | {{{ notification.template( notification ) }}} |
| | 1541 | <# } else { #> |
| | 1542 | {{ notification.message || notification.code }} |
| | 1543 | <# } #> |
| | 1544 | </li> |
| 1539 | 1545 | <# } ); #> |
| 1540 | 1546 | </ul> |
| 1541 | 1547 | </script> |
diff --git src/wp-includes/js/customize-base.js src/wp-includes/js/customize-base.js
index e59f926..779a2cc 100644
|
|
|
window.wp = window.wp || {}; |
| 766 | 766 | * @param {object} params Params. |
| 767 | 767 | * @param {string} params.message The error message. |
| 768 | 768 | * @param {string} [params.type=error] The notification type. |
| 769 | | * @param {*} [params.data] Any additional data. |
| | 769 | * @param {*} [params.data] Any additional data. |
| | 770 | * @param {function} [params.template] Template for rendering the notification content. |
| 770 | 771 | */ |
| 771 | 772 | api.Notification = api.Class.extend({ |
| 772 | 773 | initialize: function( code, params ) { |
| … |
… |
window.wp = window.wp || {}; |
| 774 | 775 | this.message = params.message; |
| 775 | 776 | this.type = params.type || 'error'; |
| 776 | 777 | this.data = params.data || null; |
| | 778 | this.template = params.template || null; |
| 777 | 779 | } |
| 778 | 780 | }); |
| 779 | 781 | |