Customize: Improve usability of Customize JS API.
* Eliminate need to pass both ID and instance in calls to `Values#add()` for panels, sections, controls, settings, partials, and notifications. * Eliminate need to supply `content` param when constructing a `Control`. * Unwrap the `options.params` object passed in constructors to just pass a flat `options`. (Back-compat is maintained.) * Add support for `templateId` param for `Control` to override which template is used for the content. * Remove unused `previewer` being supplied in `Control` instances. * Rename `classes` to `containerClasses` on `Notification`. * Automatically supply `instanceNumber` to improve stable sorting. * Use `api.Notifications` for notifications in settings instead of `api.Value`. See #30741. Fixes #42083. Built from https://develop.svn.wordpress.org/trunk@41726 git-svn-id: http://core.svn.wordpress.org/trunk@41560 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -3604,7 +3604,7 @@ final class WP_Customize_Manager {
|
||||
|
||||
?>
|
||||
<script type="text/html" id="tmpl-customize-notification">
|
||||
<li class="notice notice-{{ data.type || 'info' }} {{ data.alt ? 'notice-alt' : '' }} {{ data.dismissible ? 'is-dismissible' : '' }} {{ data.classes || '' }}" data-code="{{ data.code }}" data-type="{{ data.type }}">
|
||||
<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 }}">
|
||||
<div class="notification-message">{{{ data.message || data.code }}}</div>
|
||||
<# if ( data.dismissible ) { #>
|
||||
<button type="button" class="notice-dismiss"><span class="screen-reader-text"><?php _e( 'Dismiss' ); ?></span></button>
|
||||
|
||||
Reference in New Issue
Block a user