mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-06 09:19:04 +00:00
Customize: Add edit shortcuts in customizer preview to visually expose editable elements and focus on the corresponding controls when clicked.
* Edit shortcuts show initially for a moment and then fade away so as to not get in the way of the preview. * Visibility of edit shortcuts is toggled by clicking/touching anywhere inert in the document. * Implements UI for mobile and touch devices which do not support shift-click. * Adds `editShortcutVisibility` state. * Adds new methods to `wp.customize.selectiveRefresh.Partial` for managing edit shortcuts. Incorporates aspects of the Customize Direct Manipulation feature plugin. Props sirbrillig, mattwiebe, celloexpressions, melchoyce, westonruter, afercia. Fixes #27403. git-svn-id: https://develop.svn.wordpress.org/trunk@38967 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -184,6 +184,11 @@ final class WP_Customize_Selective_Refresh {
|
||||
'renderQueryVar' => self::RENDER_QUERY_VAR,
|
||||
'l10n' => array(
|
||||
'shiftClickToEdit' => __( 'Shift-click to edit this element.' ),
|
||||
'clickEditMenu' => __( 'Click to edit this menu.' ),
|
||||
'clickEditWidget' => __( 'Click to edit this widget.' ),
|
||||
'clickEditTitle' => __( 'Click to edit the site title.' ),
|
||||
'clickEditMisc' => __( 'Click to edit this element.' ),
|
||||
'editShortcutVisibilityToggle' => __( 'Toggle edit shortcuts' ),
|
||||
/* translators: %s: document.write() */
|
||||
'badDocumentWrite' => sprintf( __( '%s is forbidden' ), 'document.write()' ),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user