Changeset 53026
- Timestamp:
- 03/29/2022 08:16:36 PM (3 years ago)
- Location:
- branches/5.9
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.9
- Property svn:mergeinfo changed
/trunk merged: 53024-53025
- Property svn:mergeinfo changed
-
branches/5.9/src/js/_enqueues/wp/customize/controls.js
r52003 r53026 8336 8336 8337 8337 /** 8338 * Displays a Site Editor notification when a block theme is activated. 8339 * 8340 * @since 4.9.0 8341 * 8342 * @param {string} [notification] - A notification to display. 8343 * @return {void} 8344 */ 8345 function addSiteEditorNotification( notification ) { 8346 api.notifications.add( new api.Notification( 'site_editor_block_theme_notice', { 8347 message: notification, 8348 type: 'info', 8349 dismissible: false, 8350 render: function() { 8351 var notification = api.Notification.prototype.render.call( this ), 8352 button = notification.find( 'button.switch-to-editor' ); 8353 8354 button.on( 'click', function( event ) { 8355 event.preventDefault(); 8356 location.assign( button.data( 'action' ) ); 8357 } ); 8358 8359 return notification; 8360 } 8361 } ) ); 8362 } 8363 8364 /** 8338 8365 * Dismiss autosave. 8339 8366 * … … 8408 8435 if ( api.settings.changeset.latestAutoDraftUuid || api.settings.changeset.hasAutosaveRevision ) { 8409 8436 addAutosaveRestoreNotification(); 8437 } 8438 var shouldDisplayBlockThemeNotification = !! parseInt( $( '#customize-info' ).data( 'block-theme' ), 10 ); 8439 if (shouldDisplayBlockThemeNotification) { 8440 addSiteEditorNotification( api.l10n.blockThemeNotification ); 8410 8441 } 8411 8442 })(); -
branches/5.9/src/wp-admin/css/customize-controls.css
r51996 r53026 1731 1731 top: 50%; 1732 1732 margin-top: -14px; 1733 font-weight: 400; 1734 } 1735 1736 #customize-notifications-area .notification-message button.switch-to-editor { 1737 display: block; 1738 margin-top: 6px; 1733 1739 font-weight: 400; 1734 1740 } -
branches/5.9/src/wp-admin/customize.php
r52053 r53026 223 223 </div> 224 224 <div class="wp-full-overlay-sidebar-content" tabindex="-1"> 225 <div id="customize-info" class="accordion-section customize-info" >225 <div id="customize-info" class="accordion-section customize-info" data-block-theme="<?php echo (int) wp_is_block_theme(); ?>"> 226 226 <div class="accordion-section-title"> 227 227 <span class="preview-notice"> … … 236 236 <p> 237 237 <?php 238 _e( 'The Customizer allows you to preview changes to your site before publishing them. You can navigate to different pages on your site within the preview. Edit shortcuts are shown for some editable elements. ' );238 _e( 'The Customizer allows you to preview changes to your site before publishing them. You can navigate to different pages on your site within the preview. Edit shortcuts are shown for some editable elements. The Customizer is intended for use with non-block themes.' ); 239 239 ?> 240 240 </p> -
branches/5.9/src/wp-includes/script-loader.php
r53017 r53026 1221 1221 'invalidDate' => __( 'Invalid date.' ), 1222 1222 'invalidValue' => __( 'Invalid value.' ), 1223 'blockThemeNotification' => sprintf( 1224 /* translators: 1: Link to Site Editor documentation on HelpHub, 2: HTML button. */ 1225 __( 'Hurray! Your theme supports Full Site Editing with blocks. <a href="%1$s">Tell me more</a>. %2$s' ), 1226 __( 'https://wordpress.org/support/article/site-editor/' ), 1227 sprintf( 1228 '<button type="button" data-action="%1$s" class="button switch-to-editor">%2$s</button>', 1229 esc_url( admin_url( 'site-editor.php' ) ), 1230 __( 'Use Site Editor' ) 1231 ) 1232 ), 1223 1233 ) 1224 1234 );
Note: See TracChangeset
for help on using the changeset viewer.