Commit Graph

2263 Commits

Author SHA1 Message Date
Pascal Birchler
685cce51d2 Update/Install: Reject invalid messages in the Shiny Updates postMessage handler.
This prevents conflicts with third-party messages (e.g. sent by browser extensions). The updates script expects a specific JSON-encoded message and now bails early if it's not valid JSON.

Fixes #37125.
Built from https://develop.svn.wordpress.org/trunk@37976


git-svn-id: http://core.svn.wordpress.org/trunk@37917 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 16:16:28 +00:00
Pascal Birchler
f2c4003dde Update/Install: Fix plugin updates from the details modal on the Dashboard.
The plugin details modal has been greatly improved in [37714]. However, Shiny Updates aren't yet implemented on the Dashboard. Therefore, we need to fall back to The Bleak Screen of Sadness. Otherwise nothing happens when trying to install an update from inside the modal.

Fixes #37131. See #37126.
Built from https://develop.svn.wordpress.org/trunk@37974


git-svn-id: http://core.svn.wordpress.org/trunk@37915 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 15:37:28 +00:00
Pascal Birchler
600e511533 Update/Install: Fix plugin updates from the details modal on update-core.php.
The plugin details modal has been greatly improved in [37714]. However, Shiny Updates aren't yet implemented on the WordPress Updates screen. Therefore, we need to fall back to The Bleak Screen of Sadness. Otherwise nothing happens when trying to install an update from inside the modal.

Props Nikschavan.
Fixes #37126.
Built from https://develop.svn.wordpress.org/trunk@37973


git-svn-id: http://core.svn.wordpress.org/trunk@37914 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 15:32:28 +00:00
Pascal Birchler
b55493e3e6 Update/Install: Correctly decrement the update count after translation updates.
After [37714], an error was unnecessarily being displayed in the JavaScript console when updating translations on `wp-admin/update-core.php`. Let's not throw an error in these cases.

Props afercia.
Fixes #37127.
Built from https://develop.svn.wordpress.org/trunk@37971


git-svn-id: http://core.svn.wordpress.org/trunk@37912 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 15:18:27 +00:00
Pascal Birchler
848318aeb1 Update/Install: Trigger a JS event when updating a theme.
For plugins a `'wp-plugin-updating'` event is triggered, for themes there's now the `'wp-theme-updating'` equivalent.

Props DavidAnderson.
Fixes #37216.
Built from https://develop.svn.wordpress.org/trunk@37970


git-svn-id: http://core.svn.wordpress.org/trunk@37911 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 15:09:28 +00:00
Pascal Birchler
066360f569 Update/Install: Trigger the correct event after installing an importer plugin.
This fixes a typo inside `wp.updates.installImporterSuccess()` as it's about installing an importer, not an installer.

Fixes #37273.
Built from https://develop.svn.wordpress.org/trunk@37969


git-svn-id: http://core.svn.wordpress.org/trunk@37910 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 15:05:28 +00:00
Dominik Schilling
bcf027eda1 Themes: Avoid announcing the theme search results too many times.
Props afercia.
Fixes #36848.
Built from https://develop.svn.wordpress.org/trunk@37967


git-svn-id: http://core.svn.wordpress.org/trunk@37908 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 14:38:29 +00:00
Dominik Schilling
de3b2db1e2 Media: Improve form validation errors handling when editing images.
* Use the same check for a numeric value used on the crop fields on all the other fields: don't display "NaN", just empty the field.
* Remove the inline script that runs the initialization of the image editor and call it after the editor UI is fully ready.

Props afercia.
Fixes #36316.
Built from https://develop.svn.wordpress.org/trunk@37966


git-svn-id: http://core.svn.wordpress.org/trunk@37907 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 13:37:29 +00:00
Dominik Schilling
6f33a94487 Customize: Use the correct variable when referring to the media frame.
Props celloexpressions.
Fixes #36236.
Built from https://develop.svn.wordpress.org/trunk@37955


git-svn-id: http://core.svn.wordpress.org/trunk@37896 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-04 20:45:28 +00:00
Peter Wilson
26c07ed8d9 Users: Check zxcvbn is defined before calling.
Prevents JavaScript errors by checking zxcvbn is defined before calling.

Changes `wp.passwordStrength.meter()` to return `-1` if the strength of the password is unknown.

On the user profile screen, `generatePassword()` checks if the user has entered the password before setting the value of the password input box.

Props peterwilsoncc, adamsilverstein.
Fixes #34905.

Built from https://develop.svn.wordpress.org/trunk@37940


git-svn-id: http://core.svn.wordpress.org/trunk@37881 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-01 12:45:29 +00:00
Dominik Schilling
eb3a1bef13 Customize: Improve flow from menu locations to editing a menu.
Adds an Edit button beside the menu location to allow users to switch to the selected menu for further edits.

Props celloexpressions.
Fixes #36795.
Built from https://develop.svn.wordpress.org/trunk@37901


git-svn-id: http://core.svn.wordpress.org/trunk@37842 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-28 23:07:30 +00:00
Jeremy Felt
6f3f00ea97 Multisite: Change WP_Network id property to an integer.
For consistency and developer sanity.

Props flixos90.
Fixes #37050.

Built from https://develop.svn.wordpress.org/trunk@37870


git-svn-id: http://core.svn.wordpress.org/trunk@37811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-26 14:26:29 +00:00
Andrea Fercia
dd5bc0d28e Accessibility: Theme Installer, make the "Upload Theme" button... a button.
UI controls that "do something" on a page shouldn't be links. This link behaves
like a toggle to expand the uploader panel and should be a `button` element with
an aria-expanded attribute. Also:

- improves consistency with the Plugin uploader
- keeps the themes list visible when the uploader is open
- displays a notice when JavaScript is off
- adds some `hide-if-no-js` CSS classes
- removes the `themes.router.navigate()` "upload" route: seems unnecessary and breaks history

Fixes #35457.
Built from https://develop.svn.wordpress.org/trunk@37742


git-svn-id: http://core.svn.wordpress.org/trunk@37707 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-17 20:47:28 +00:00
Konstantin Obenland
8c82515ab6 Update/Install: Shiny Updates v2.
Gone are the days of isolation and feelings of "meh", brought on by The Bleak Screen of Sadness. For a shiny knight has arrived to usher our plugins and themes along their arduous journey of installation, updates, and the inevitable fate of ultimate deletion.

Props swissspidy, adamsilverstein, mapk, afragen, ocean90, ryelle, j-falk, michael-arestad, melchoyce, DrewAPicture, AdamSoucie, ethitter, pento, dd32, kraftbj, Ipstenu, jorbin, afercia, stephdau, paulwilde, jipmoors, khag7, svovaf, jipmoors, obenland.
Fixes #22029, #25828, #31002, #31529, #31530, #31773, #33637, #35032.


Built from https://develop.svn.wordpress.org/trunk@37714


git-svn-id: http://core.svn.wordpress.org/trunk@37680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-15 16:37:29 +00:00
Weston Ruter
c7b8333ece Customize: Ensure MediaControl fetches the necessary attachment data for rendering when dynamically added via JS.
Fixes #36521.
Props TimothyBlynJacobs, westonruter.

Built from https://develop.svn.wordpress.org/trunk@37701


git-svn-id: http://core.svn.wordpress.org/trunk@37667 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-14 19:28:27 +00:00
Weston Ruter
1c2324f834 Customize: Update server-sent setting validation notifications as changes are entered.
Send back setting validities with full refreshes and selective refreshes so that invalid settings can have notifications displayed immediately before attempting save, and so that these notifications can be cleared as soon as the input is corrected.

* Splits out JS logic for listing controls into separate methods  `wp.customize.Setting.prototype.findControls()` and `wp.customize.findControlsForSettings()`.
* Adds a `setting` property to the `data` on notifications added to controls that are synced from their settings.
* Adds `selective-refresh-setting-validities` message sent from preview to pane.
* Changes `WP_Customize_Manager::validate_setting_values()` to return when settings are valid as well as invalid.
* Adds `WP_Customize_Manager::prepare_setting_validity_for_js()`.
* Add setting validities to data exported to JS in Customizer Preview and in selective refresh responses.

Fixes #36944.

Built from https://develop.svn.wordpress.org/trunk@37700


git-svn-id: http://core.svn.wordpress.org/trunk@37666 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-14 19:17:28 +00:00
Andrew Ozz
f78dd6fe2e Editor: prevent jumping when using the backspace button in the Text editor in Firefox and IE.
Fixes #37072.
Built from https://develop.svn.wordpress.org/trunk@37684


git-svn-id: http://core.svn.wordpress.org/trunk@37650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-11 05:15:27 +00:00
Andrea Fercia
708b9dc229 Plugin Install: fix edge-case where the tab=upload page can be accessed directly.
The `?tab=upload` page still exists for no-js support and for users who may
access it directly (e.g. from bookmarks or history) or plugins doing the same.
In this page, the "Browse plugins" link should always behave like a link.

Fixes #35429.
Built from https://develop.svn.wordpress.org/trunk@37681


git-svn-id: http://core.svn.wordpress.org/trunk@37647 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-10 22:39:28 +00:00
Andrea Fercia
e2892857c7 Accessibility: Customizer, make the menu items "clear search results" a button.
For Web standards and accessibility, always prefer native controls instead of
`span` or `div` elements.

Fixes #36903.
Built from https://develop.svn.wordpress.org/trunk@37679


git-svn-id: http://core.svn.wordpress.org/trunk@37645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-10 21:22:28 +00:00
Andrew Ozz
5cdb444009 Editor, editor-expand: adjust the sidebar position when moving a postbox from one column to another.
Fixes #35230.
Built from https://develop.svn.wordpress.org/trunk@37659


git-svn-id: http://core.svn.wordpress.org/trunk@37625 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-08 22:37:29 +00:00
Ella Iseulde Van Dorpe
6b4662ab96 Editor: autoresize fixes for text
* Resize on backspace.
* Don't make it smaller than the minimum height.

Props azaozz, iseulde.

See #36482.


Built from https://develop.svn.wordpress.org/trunk@37603


git-svn-id: http://core.svn.wordpress.org/trunk@37571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-01 10:24:30 +00:00
Ella Iseulde Van Dorpe
5502219779 Editor: better resizing for text editor
* Use `scrollHeight` to resize the text editor.
* Don't scroll the cursor into view when under the text editor's toolbar, it
  involves cloning the content which is quite slow.

Props iseulde, azaozz.

See #36482.


Built from https://develop.svn.wordpress.org/trunk@37596


git-svn-id: http://core.svn.wordpress.org/trunk@37564 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-30 20:32:30 +00:00
Weston Ruter
87b0a1b989 Customize: Add setting validation model and control notifications to augment setting sanitization.
When a setting is invalid, not only will it be blocked from being saved but all other settings will be blocked as well. This ensures that Customizer saves aren't partial but are more transactional. User will be displayed the error in a notification so that they can fix and re-attempt saving.

PHP changes:

* Introduces `WP_Customize_Setting::validate()`, `WP_Customize_Setting::$validate_callback`, and the `customize_validate_{$setting_id}` filter.
* Introduces `WP_Customize_Manager::validate_setting_values()` to do validation (and sanitization) for the setting values supplied, returning a list of `WP_Error` instances for invalid settings.
* Attempting to save settings that are invalid will result in the save being blocked entirely, with the errors being sent in the `customize_save_response`. Modifies `WP_Customize_Manager::save()` to check all settings for validity issues prior to calling their `save` methods.
* Introduces `WP_Customize_Setting::json()` for parity with the other Customizer classes. This includes exporting of the `type`.
* Modifies `WP_Customize_Manager::post_value()` to apply `validate` after `sanitize`, and if validation fails, to return the `$default`.
* Introduces `customize_save_validation_before` action which fires right before the validation checks are made prior to saving.

JS changes:

* Introduces `wp.customize.Notification` in JS which to represent `WP_Error` instances returned from the server when setting validation fails.
* Introduces `wp.customize.Setting.prototype.notifications`.
* Introduces `wp.customize.Control.prototype.notifications`, which are synced with a control's settings' notifications.
* Introduces `wp.customize.Control.prototype.renderNotifications()` to re-render a control's notifications in its notification area. This is called automatically when the notifications collection changes.
* Introduces `wp.customize.settingConstructor`, allowing custom setting types to be used in the same way that custom controls, panels, and sections can be made.
* Injects a notification area into existing controls which is populated in response to the control's `notifications` collection changing. A custom control can customize the placement of the notification area by overriding the new `getNotificationsContainerElement` method.
* When a save fails due to setting invalidity, the invalidity errors will be added to the settings to then populate in the controls' notification areas, and the first such invalid control will be focused.

Props westonruter, celloexpressions, mrahmadawais.
See #35210.
See #30937.
Fixes #34893.

Built from https://develop.svn.wordpress.org/trunk@37476


git-svn-id: http://core.svn.wordpress.org/trunk@37444 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-20 21:10:27 +00:00
Andrea Fercia
ce94f2dfbd Refine the FTP credentials form interaction.
Properly toggle SSH2 Authentication Keys fieldset visibility.
JavaScript and CSS clean-up.

Props Mte90.
Fixes #34376.
Built from https://develop.svn.wordpress.org/trunk@37467


git-svn-id: http://core.svn.wordpress.org/trunk@37435 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-19 22:59:28 +00:00
Andrea Fercia
1ae8891261 Accessibility: make the tab order match the visual order in the Edit terms screens.
Fixes #35664.
Built from https://develop.svn.wordpress.org/trunk@37439


git-svn-id: http://core.svn.wordpress.org/trunk@37405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-16 13:02:29 +00:00
Weston Ruter
dcf6cf3615 Customize: Include shortcut button in Custom Menu widget to edit the selected menu in the Customizer.
Clicking on the Edit Menu button focuses on the corresponding nav menu section. Upon collapsing the nav menu section, the focus is returned to the Custom Menu widget instead of taking the user to the menus root panel. In this way, the back button behavior is modified once to serve as breadcrumb/history navigation. The Edit Menu button with the breadcrumb back button behavior greatly reduce the number of UI interactions needed to edit a menu referenced in a Custom Menu widget.

Props celloexpressions, westonruter.
Fixes #32683.

Built from https://develop.svn.wordpress.org/trunk@37437


git-svn-id: http://core.svn.wordpress.org/trunk@37403 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-16 07:22:30 +00:00
Drew Jaynes
b1804afeaf Docs: Standardize on 'backward compatibility/compatible' nomenclature in core inline docs.
Also use 'back-compat' in some inline comments where backward compatibility is the subject and shorthand feels more natural.

Note: 'backwards compatibility/compatibile' can also be considered correct, though it's primary seen in regular use in British English.

Props ocean90.
Fixes #36835.

Built from https://develop.svn.wordpress.org/trunk@37431


git-svn-id: http://core.svn.wordpress.org/trunk@37397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-13 18:41:31 +00:00
Weston Ruter
3a37220f2a Customize: Allow Esc key to collapse the currently-expanded panel, section (or control).
Pressing Esc collapses any expanded widget or nav menu item controls, or any control that implements the expanding interface. Also improves alignment between `WidgetControl` and `MenuItemControl`, adding the `expanded` state and associated `expand`/`collapse` methods to nav menu items.

Props purcebr, celloexpressions, westonruter.
Fixes #22237.

Built from https://develop.svn.wordpress.org/trunk@37347


git-svn-id: http://core.svn.wordpress.org/trunk@37313 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-02 19:52:28 +00:00
Weston Ruter
a0d7e83beb Customize: Ensure settings modified during an open save request remain dirty when save request completes.
Also disables Save & Publish button while save request is open. After the save request completes, any settings changed during the request can then be saved via an additional click to the button.

Props chandrapatel, westonruter.
Fixes #32941.

Built from https://develop.svn.wordpress.org/trunk@37346


git-svn-id: http://core.svn.wordpress.org/trunk@37312 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-02 19:13:26 +00:00
Dominik Schilling
823ec71cd6 Customize: Don't auto-close the customizer when a new theme is activated.
Props celloexpressions.
Fixes #35320.
Built from https://develop.svn.wordpress.org/trunk@37339


git-svn-id: http://core.svn.wordpress.org/trunk@37305 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-01 19:54:27 +00:00
Rachel Baker
8b0e1859bc Comments: Keep comments safe in the Edit Post screen.
Warns users that have added a new Comment or began editing an existing without saving their changes, before they press the “update” button which would wipe out their comment changes.

Fixes #32818.

Props polevaultweb.
Built from https://develop.svn.wordpress.org/trunk@37303


git-svn-id: http://core.svn.wordpress.org/trunk@37269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-22 21:43:28 +00:00
Scott Taylor
be59d289b7 Dashboard: toggle the "View" link for comments when Approving / Unapproving from the Dashboard widget.
Fixes #35518.

Built from https://develop.svn.wordpress.org/trunk@37302


git-svn-id: http://core.svn.wordpress.org/trunk@37268 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-22 21:30:28 +00:00
Andrea Fercia
e38ab38b1f Accessibility: Customizer, improve UI controls in customize.php
- makes the mobile preview/customize toggle a button
- changes the "Close" link hidden text from 'Cancel' to 'Close the Customizer and go back to the previous page'
- adds a missing `type="button"` attribute
- removes unnecessary `keydown` events and `preventDefault()`: buttons don't need a keydown event and when they have a `type="button"` attribute there's no default action to prevent

Props Cheffheid, afercia.

Fixes #31487.
Built from https://develop.svn.wordpress.org/trunk@37230


git-svn-id: http://core.svn.wordpress.org/trunk@37196 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-17 15:41:27 +00:00
Andrea Fercia
76a6260353 Plugin Install: show the upload form in place rather than sending users to the devoted upload plugin page.
Props Ipstenu, ericlewis, michaelarestad.

Fixes #35429.
Built from https://develop.svn.wordpress.org/trunk@37221


git-svn-id: http://core.svn.wordpress.org/trunk@37187 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-16 16:43:27 +00:00
Aaron Jorbin
262f3f2f7e Update grunt-contrib-uglify from ~0.10.0 to ~1.0.1
This changes every JS file in WordPress, so we need to test everything.

Props netweb.
See #36520.

Built from https://develop.svn.wordpress.org/trunk@37212


git-svn-id: http://core.svn.wordpress.org/trunk@37178 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-15 16:10:37 +00:00
Sergey Biryukov
c55e4194f8 Docs: Fix typo in a comment in wp-admin/js/postbox.js.
Props yoavf.
Fixes #36349.
Built from https://develop.svn.wordpress.org/trunk@37195


git-svn-id: http://core.svn.wordpress.org/trunk@37161 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-13 07:29:27 +00:00
Andrew Ozz
c353544c47 Customizer: fix cropping of small images when setting header image, site icon or logo.
Props obenland.
Fixes #36412.
Built from https://develop.svn.wordpress.org/trunk@37167


git-svn-id: http://core.svn.wordpress.org/trunk@37134 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-08 01:23:29 +00:00
Weston Ruter
1a9fda07a4 Customize: Put focus on change button instead of remove button in media control.
Allow controls to specify the primary element to receive focus by adding a `control-focus` class.

Props adamsilverstein, westonruter.
Fixes #36337.

Built from https://develop.svn.wordpress.org/trunk@37152


git-svn-id: http://core.svn.wordpress.org/trunk@37118 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-30 21:41:26 +00:00
Aaron Jorbin
bd7ffca854 Add Nonce to updating wporg_favorites user meta field
Built from https://develop.svn.wordpress.org/trunk@37145


git-svn-id: http://core.svn.wordpress.org/trunk@37112 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-30 18:36:26 +00:00
Weston Ruter
f3f84d2f21 Customize: Require opt-in for selective refresh of widgets.
* Introduces `customize-selective-refresh-widgets` theme support feature and adds to themes.
* Introduces `customize_selective_refresh` arg for `WP_Widget::$widget_options` and adds to all core widgets.
* Remove `selective_refresh` from being a component that can be removed via `customize_loaded_components` filter.
* Add `WP_Customize_Widgets::get_selective_refreshable_widgets()` and `WP_Customize_Widgets::is_widget_selective_refreshable()`.
* Fix default `selector` for `Partial` instances.
* Implement and improve Masronry sidebar refresh logic in Twenty Thirteen and Twenty Fourteen, including preservation of initial widget position after refresh.
* Re-initialize ME.js when refreshing `Twenty_Fourteen_Ephemera_Widget`.

See #27355.
Fixes #35855.

Built from https://develop.svn.wordpress.org/trunk@37040


git-svn-id: http://core.svn.wordpress.org/trunk@37007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-21 21:59:29 +00:00
Andrew Ozz
d529800cba Editor: fix exiting DFW with the keyboard shortcut on Mac (Opt+Ctrl+W).
Fixes #36222.
Built from https://develop.svn.wordpress.org/trunk@37003


git-svn-id: http://core.svn.wordpress.org/trunk@36970 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-16 02:48:25 +00:00
Eric Lewis
8592072857 Editor: Fix Mac keyboard shortcut for distraction free writing.
Fixes #36214.

Built from https://develop.svn.wordpress.org/trunk@36973


git-svn-id: http://core.svn.wordpress.org/trunk@36941 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-12 17:44:26 +00:00
Andrew Ozz
70ac7ab943 Editor: hide the Move to Trash link for auto-drafts until they are auto-saved.
Props iseulde.
Fixes #16116.
Built from https://develop.svn.wordpress.org/trunk@36972


git-svn-id: http://core.svn.wordpress.org/trunk@36940 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-12 17:22:26 +00:00
Andrea Fercia
0020bcd796 Coding standards after [36510].
Built from https://develop.svn.wordpress.org/trunk@36967


git-svn-id: http://core.svn.wordpress.org/trunk@36935 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-10 23:18:26 +00:00
Andrea Fercia
fd1f45a7cf Accessibility: Improve accessibility for the Plugin details modal.
The plugin details modal can be invoked from several screens. There's now a new
`.open-plugin-details-modal` CSS class to be used in combination with the
`.thickbox` CSS class that adds everything needed for accessibility.

- Adds an ARIA role `dialog` and an `aria-label` attribute to the modal
- Adds a `title` attribute to the iframe inside the modal
- Constrains tabbing within the modal
- Restores focus back in a proper place when closing the modal

Also, improves a bit the native Thickbox implementation: it should probably be
replaced with some more modern tool but at least keyboard focus should be moved
inside the modal.

Fixes #33305.
Built from https://develop.svn.wordpress.org/trunk@36964


git-svn-id: http://core.svn.wordpress.org/trunk@36932 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-10 22:37:26 +00:00
Weston Ruter
7441acafaf Customize: Fix persistence of toggles for displayed nav menu item properties.
* Eliminates need to click more than one checkbox to have preferences saved.
* Adds debouncing to saving user-selected menu item properties.
* Also removes discrepancies between available nav menu item properties on admin page vs Customizer.

Fixes #35273.
Props afercia, westonruter.

Built from https://develop.svn.wordpress.org/trunk@36908


git-svn-id: http://core.svn.wordpress.org/trunk@36876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-09 21:41:28 +00:00
Weston Ruter
40f6779665 Customize: Fix image cropping when doing live preview of theme switches.
Ensure that the Customizer gets bootstrapped with the pre-activated `theme` supplied in the `custom-header-crop` admin ajax requests.

Props faishal, rittesh.patel.
Fixes #32783.

Built from https://develop.svn.wordpress.org/trunk@36866


git-svn-id: http://core.svn.wordpress.org/trunk@36833 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-06 01:45:27 +00:00
Dominik Schilling
30f8c75047 Themes: Bring the device preview from [31195] to the theme install previewer.
Props celloexpressions.
Fixes #36017.
Built from https://develop.svn.wordpress.org/trunk@36858


git-svn-id: http://core.svn.wordpress.org/trunk@36825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-05 22:07:25 +00:00
Weston Ruter
a8ca958d43 Customize: Eliminate unnecessary WP_Customize_Site_Logo_Control in favor of re-using WP_Customize_Image_Control.
* Removes double `margin-bottom` from all the media controls.
* All media controls now send `{settingId}-attachment-data` messages to the preview when a media setting is updated so that the preview has access to the attachment data.
* Fixes receiving of `attachment-data` message for `custom_logo` which resulted in instant JS-applied preview not working. See #36096.

See #33755.
Fixes #35941.

Built from https://develop.svn.wordpress.org/trunk@36851


git-svn-id: http://core.svn.wordpress.org/trunk@36818 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-04 23:47:26 +00:00
Konstantin Obenland
147d6d7d6c Customize: Site logos are custom logos.
Brings the nomenclature closer to custom headers and backgrounds.

See https://wordpress.slack.com/archives/core/p1456955151003150
See #35945. 

Built from https://develop.svn.wordpress.org/trunk@36837


git-svn-id: http://core.svn.wordpress.org/trunk@36804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-03 19:56:26 +00:00