Make WordPress Core


Ignore:
Timestamp:
10/26/2016 08:02:51 PM (8 years ago)
Author:
westonruter
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/customize/class-wp-customize-selective-refresh.php

    r38810 r38967  
    185185            'l10n'           => array(
    186186                'shiftClickToEdit' => __( 'Shift-click to edit this element.' ),
     187                'clickEditMenu' => __( 'Click to edit this menu.' ),
     188                'clickEditWidget' => __( 'Click to edit this widget.' ),
     189                'clickEditTitle' => __( 'Click to edit the site title.' ),
     190                'clickEditMisc' => __( 'Click to edit this element.' ),
     191                'editShortcutVisibilityToggle'  => __( 'Toggle edit shortcuts' ),
    187192                /* translators: %s: document.write() */
    188193                'badDocumentWrite' => sprintf( __( '%s is forbidden' ), 'document.write()' ),
Note: See TracChangeset for help on using the changeset viewer.