Commit Graph

2622 Commits

Author SHA1 Message Date
Andrea Fercia
8aef143d80 Menus: Fix the posts-categories quick search.
On the Menus screen, events that trigger the posts-categories search need to be
delegated. This "boxes" may get dynamically rebuilt so events directly attached
to the search input field need to be delegated.

Fixes #38324.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38742 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-16 20:03:29 +00:00
Andrew Ozz
d91da52588 Accessible Tags autocomplete:
- Replace suggest.js with UI Autocomplete.
- Use the same settings like in the editor link toolbar.
- Abstract it and add in a new file, tags-suggest.js. Then make it a dependency for the Tags postbox(es) and Quick and Bulk Edit.
- Add `data-wp-taxonomy` on all input elements to improve handling in the UI for custom taxonomies.

Props afercia, azaozz.
See #33902.
Built from https://develop.svn.wordpress.org/trunk@38797


git-svn-id: http://core.svn.wordpress.org/trunk@38740 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-14 22:40:28 +00:00
Andrew Ozz
c69916d57d Editor: do not send the request for releasing the post lock on unload when post_ID or active_post_lock is missing.
Props dlh, adamsilverstein.
Fixes #38271.
Built from https://develop.svn.wordpress.org/trunk@38772


git-svn-id: http://core.svn.wordpress.org/trunk@38715 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-10 22:42:30 +00:00
Andrea Fercia
1905ea030a Accessibility: Improve the UI controls to move the Menu items.
On the Menus screen, the links to move menu items behave like buttons: they
perform an action so they should be real buttons to be correctly reported to
assistive technologies. Since they're logically grouped controls, they should
also be wrapped in a `<fieldset>` element for better semantics and accessibility.

Props Cheffheid.
Fixes #35578.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-10 16:26:12 +00:00
Weston Ruter
2064e34833 Customize: Show Pages section first and pre-expanded in list of available nav menu items.
Props ryankienstra, westonruter.
Fixes #36984.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38710 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-09 23:41:30 +00:00
Dominik Schilling
5fd943f49c Menus: Hide controls in the search tab if no items are found.
Props sayedwp, afercia, tywayne, abrightclearweb.
Fixes #35576.
Built from https://develop.svn.wordpress.org/trunk@38754


git-svn-id: http://core.svn.wordpress.org/trunk@38697 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-07 20:56:29 +00:00
Weston Ruter
2f52e4db9b Customize: Add workaround for Safari bug causing preview frame to be unscrollable via mousewheel after a refresh.
Props westonruter, tristangemus.
Fixes #38149.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-06 20:17:29 +00:00
Andrea Fercia
6a2d446d9c Customize: Improve the widgets and menu items search.
- adds a "search" icon into the search fields
- adds a hidden description for the widget search field, targeted by `aria-describedby`
- adds the "clear-results" button to the widgets search
- removes the `change` and `search` events bound on the widget search, for these "live searches" WordPress should standardize on `input` (+ `keyup` when needed)
- adds property and function to keep track and update the number of the widgets search results
- the widgets search results are now announced via `wp.a11y.speak()`
- adds a visible and audible message when there are no widgets search results
- moves some CSS to `customize-controls.css`

Props ryankienstra, melchoyce, afercia.
Fixes #36908.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38652 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-03 16:28:31 +00:00
Pascal Birchler
555d9f3025 Plugins: Fix odd typo introduced in [38703].
`even` should of course be `event`.

See #37973.
Built from https://develop.svn.wordpress.org/trunk@38706


git-svn-id: http://core.svn.wordpress.org/trunk@38649 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-03 07:07:29 +00:00
Pascal Birchler
bd03add624 Import: Fix plugin activation link after installing an importer on multisite.
When installing the importer via Ajax, the activation link should be the same as if the page were reloaded.

Props joelcj91 for initial patch.
Fixes #37943.
Built from https://develop.svn.wordpress.org/trunk@38704


git-svn-id: http://core.svn.wordpress.org/trunk@38647 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-03 06:42:29 +00:00
Pascal Birchler
b570b4b18c Plugins: Fix checkbox selection when searching for installed plugins.
Since the plugin search works via Ajax, the JavaScript events need to delegated in order for the checkboxes to work properly.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-03 06:37:30 +00:00
Andrea Fercia
eeefec932f Administration: Improve the usage of the button CSS classes.
Introduces some consistency in the usage of the button CSS classes, fixes the
focus style for accessibility and responsiveness of the buttons.

- Adds the `button` class to all primary buttons make them responsive
- Removes all `secondary-button` classes and replaces it with button when needed. `button-secondary` shouldn't be used and exists just for backward compatibility reasons
- Replaces classes inside `submit_button()` with a shorthand for some buttons, and use an empty string for the default `button` class. Passing `button` is unnecessary
- Adjusts `get_submit_button()` to remove empty items

Props iseulde, dimchik, chris_d2d, mhowell, afercia.
Fixes #27314, #37138, #37448.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-28 19:54:28 +00:00
Weston Ruter
9a9af068e5 Customize: Fix focusing on controls for widgets and nav menu items after [38648].
Shift-click on nav menu items was not expanding the nav menu section, and shift-clicking on widgets would not always result in focus being added to an element in the control's container.

See #34391.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38611 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-28 04:20:29 +00:00
Weston Ruter
9fe024cd3f Customize: Re-architect and harden panel/section UI logic.
Removes contents for sections and panels from being logically nested (in the DOM) in order to eliminate many issues related to using `margin-top` hacks. The element containing the link to expand the content element for panels and sections is now a sibling element to its content element: the content is removed from being nested at initialization. The content element is now available in a `contentContainer` property whereas the head element (containing the link to open the construct) is in a `headContainer` property. The existing `container` property is now a jQuery collection that contains both of these elements. Since the head element is no longer in an ancestor element to the `content` element, the `aria-owns` property is now used to maintain the relationship between the `headContainer` and the `contentContainer`. These changes are also accompanied by an improvement to the animation performance for the sliding panes.

Props delawski, celloexpressions.
Fixes #34391.
Fixes #34344.
Fixes #35947.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-23 22:23:30 +00:00
Sergey Biryukov
bb0cec0bfe Docs: Add documentation for wp-admin/js/inline-edit-tax.js.
Props atimmer, boblinthorst.
Fixes #37571.
Built from https://develop.svn.wordpress.org/trunk@38644


git-svn-id: http://core.svn.wordpress.org/trunk@38587 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-22 18:50:28 +00:00
Sergey Biryukov
78138cd2c7 Docs: Add documentation for wp-admin/js/postbox.js.
Props atimmer, andizer.
Fixes #37365.
Built from https://develop.svn.wordpress.org/trunk@38643


git-svn-id: http://core.svn.wordpress.org/trunk@38586 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-22 18:47:31 +00:00
Andrea Fercia
88c7224355 Accessibility: Add Themes Feature Filter form improvements.
- adds "Apply Filters" and "Clear" at the end of the form
- changes the "Feature Filter", "Apply Filters", "Clear", and "Edit" links in `<button>` elements
- removes a leftover from [27963]
- clarifies one button text and adds an `aria-label` attribute
- adds a `wp.a11y.speak()` message when clicking on "Apply Filters" and no features are selected

Fixes #38086.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38583 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-21 17:54:28 +00:00
Sergey Biryukov
fd091e7ced Editor: Improve post.js documentation.
Props jipmoors, boblinthorst.
Fixes #38118.
Built from https://develop.svn.wordpress.org/trunk@38637


git-svn-id: http://core.svn.wordpress.org/trunk@38580 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-21 08:57:30 +00:00
Weston Ruter
d84c343cc6 Customize: Let static_front_page section be contextually active based on whether there are any published pages.
If there are no pages when the customizer is opened, the `static_front_page` section will be hidden. As soon as a page is created in the customizer session, the `static_front_page` section will be revealed. Previously the section would not be registered if there were no pages. Page stubs created via nav menus will appear in the `dropdown-pages` controls for `page_for_posts` and `page_on_front`, and such page stubs will thus cause the `static_front_page` section to appear. Plugins that facilitate page creation in the customizer by filtering `get_pages` will also cause the section to appear.

See #34923.
Fixes #38013.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-20 00:47:30 +00:00
Weston Ruter
037a236e42 Customize: Ensure nav menu items lacking a label use the title from the original object.
Use original title as placeholder for label and in control title. Prevent original title from overriding empty label in initial setting values.

Fixes #38015.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38561 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-17 21:50:30 +00:00
Pascal Birchler
15df6d24eb Menus: Use strict comparison for the condition added in [38612].
See #37846.
Built from https://develop.svn.wordpress.org/trunk@38613


git-svn-id: http://core.svn.wordpress.org/trunk@38556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-15 16:56:29 +00:00
Pascal Birchler
a0ce261a24 Menus: Remove 'sub item' label when removing the sub item's parent.
Props rnoakes3rd, adamsilverstein.
Fixes #37846.
Built from https://develop.svn.wordpress.org/trunk@38612


git-svn-id: http://core.svn.wordpress.org/trunk@38555 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-15 16:10:31 +00:00
Gary Pendergast
3e08cf2b66 Formatting: Update autop() to match wpautop().
[38592] changed the behaviour of `wpautop()` , so it's nice to change `autop()` to match.

Interestingly, this change isn't necessary for the functionality to work - #4857 didn't affect content that had been run through `autop()` at some point, as `autop()` would add a single line break before block elements, then `wpautop()` would later add a second line break, making it work correctly.

Props nacin for finding out about [38592] on Twitter, and DMing me to remind me to review `autop()`.
See #4857.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38537 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-13 06:03:31 +00:00
Andrea Fercia
3c1d571cd7 Accessibility: Improve the Customizer and Theme Installer initial focus.
The Customizer and Theme Installer open in full overlays that need to receive 
focus. Also, keyboard navigation should be constrained within the overlays. Using
CSS `visibility` to hide all the content except the overlays, makes them the only
available and focusable content and allows browsers to handle focus natively.

See #29158.
Fixes #33228, #27705.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38461 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-04 21:51:31 +00:00
Weston Ruter
91f583c9af Customize: Fix php warning due to WP_Customize_Manager::prepare_setting_validity_for_js() incorrectly assuming that WP_Error will only ever have arrays in its $error_data.
* Eliminates the server mutating the a `WP_Error`'s `$error_data` to merge-in a `$from_server` flag (since it may not be an array to begin with). Instead it defers to the client to add a `fromServer` param on any `Notification` instances created from server-sent errors.
* Ensures that notifications will be re-rendered if a notification's `message` changes but the `data` and `type` remain the same.
* Adds explicit support for the `Notification` class to have a `setting` property, ensuring that the property is set whereas previously it was dropped.

Fixes #37890.
Props westonruter, dlh.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38454 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-02 22:35:44 +00:00
Sergey Biryukov
2b5d7555b4 Users: After [33766], don't reset the password when clicking "Show Password" and then "Cancel" on Add New User screen.
Props smerriman for reporting.
Fixes #37902. See #33419.
Built from https://develop.svn.wordpress.org/trunk@38494


git-svn-id: http://core.svn.wordpress.org/trunk@38435 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-01 12:24:29 +00:00
Weston Ruter
94e8a9cfa0 Customize: Introduce paneVisible state and ensure pane is visible when a construct is expanded (or focused).
Fixes issue whereby a user would see nothing happen if the pane is collapsed while they shift-click to edit an element in the preview.

Props curdin, celloexpressions, westonruter.
See #27403.
Fixes #36678.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38433 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-01 05:55:27 +00:00
Weston Ruter
9546303342 Customize: Improve handling of active state for dynamically-created controls/sections/panels.
When a customizer construct (panel, section, control) is not added in PHP, the JS has interpreted this to mean that a given construct should be deactivated (because it is gone). This is problematic for dynamically-created constructs in JS, as it has meant that the construct would also have to be created in PHP to ensure the `active` callback is called, or else a hack would be required to add a `construct.active.validate = function() { return true };` to forcibly prevent the construct from getting deactivated. 

These workarounds can be eliminated by treating constructs differently when they are created dynamically in JS (after page load) as opposed to being created statically in PHP (on the server). Namely, if a construct is dynamically-created then its absence in a preview refresh should not signal that the construct should be deactivated. Rather, a dynamic construct should only have its activation state toggled if it has a corresponding construct created in PHP when the preview refreshes to explicitly indicate its `active` state. Otherwise, the management of the `active` state for a construct created in JS should also be the responsibility of client-side code.

Props westonruter, sayedwp.
Fixes #37270.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 06:22:23 +00:00
Weston Ruter
abd9cdc07b Customize: Allow users to more seamlessly create page-based nav menus during customization.
Introduces the ability to create stubs for the various post types to add to a given menu. This eliminates the need to leave the customizer to first create the post in the admin and then return to managing menus. Only the title of the newly-created post can be supplied; the post content will be blank and will need to be provided in the normal edit post screen outside the customizer, unless a plugin enables a post editing in the customizer experience. When a post is created and added to a nav menu in the customizer, the newly created post that is added to a menu is given the `auto-draft` status, and if the changes are not published, the `auto-draft` post will be automatically deleted within 7 days via `wp_delete_auto_drafts()`. However, if the customizer changes are saved, then these nav menu item `auto-draft` post stubs will be transitioned to `publish`.

Includes portions of code from the Customize Posts <https://github.com/xwp/wp-customize-posts> and Front-end Editor <https://github.com/iseulde/wp-front-end-editor> plugins.

For more information, see https://make.wordpress.org/core/2016/06/16/feature-proposal-content-authorship-in-menus-with-live-preview/

Props celloexpressions, westonruter, valendesigns, afercia, melchoyce, mapk, iseulde, mrahmadawais.
Fixes #34923.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-29 22:59:28 +00:00
Andrew Ozz
bbc12c3dbe Editor: fix jumpiness on pressing backspace and delete in the Text editor.
Fixes #37690 for trunk.
Built from https://develop.svn.wordpress.org/trunk@38426


git-svn-id: http://core.svn.wordpress.org/trunk@38367 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-28 18:40:31 +00:00
Ella Iseulde Van Dorpe
b67367b6f8 Editor: Use Beacon API over sync request
See https://www.w3.org/TR/beacon/ for more information.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38366 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-28 18:29:30 +00:00
Weston Ruter
e6ed174135 Customize: Circumvent the customizer attempting to preview links to static assets (such as uploaded images).
The customizer's preview POST requests to static assets result in 405 Method Not Allowed responses.

Fixes #37828.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38337 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-27 06:05:29 +00:00
Scott Taylor
a9386ea7c1 Editor: improve word-count.js documentation.
Props jipmoors, andizer.
Fixes #37718.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38299 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 09:25:27 +00:00
Weston Ruter
ee44093211 Customize: Ensure a newly-added custom link nav menu item has the appropriate CSS class names.
For nav menu items of the `custom` type, their `object` should also be set to `custom`, so that the `menu-item-custom` class name will be added.

Props vishalkakadiya.
Fixes #37575.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38242 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-22 03:12:32 +00:00
Weston Ruter
57740f3c91 Docs: Update jsdoc in customize-nav-menus.js to remove references to Menu Customizer plugin.
Also fix `@param` for `updateAssignedLocationsInSectionTitle`.

Props gma992, westonruter.
Fixes #37520.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38241 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-22 00:56:27 +00:00
Scott Taylor
d73964aab6 Media: Add some docs to media-gallery.js RIP.
Props jipmoors.
Fixes #37717.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38234 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-20 22:59:29 +00:00
Andrew Ozz
0d4320fcbc Update/Install error messages: do not escape from the template, escape the error message string before inserting it.
Props swissspidy, ocean90.
Fixes #37623 for trunk.
Built from https://develop.svn.wordpress.org/trunk@38240


git-svn-id: http://core.svn.wordpress.org/trunk@38181 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-10 19:03:31 +00:00
Dominik Schilling
cb131d8d5f Updates: Add visual feedback when deleting themes/plugins.
This corrects the selector for the delete link in `wp.updates.deletePlugin()` so the text can be changed to 'Deleting…'. `wp.updates.deleteTheme()` already worked on wp-admin/themes.php but not on wp-admin/network/themes.php because the network screen is similar to the plugins list table, this is now fixed too.
The `credential-modal-cancel` handler has been updated to support canceled delete jobs.

Props swissspidy.
Props jorbin for review.
Fixes #37603.
Built from https://develop.svn.wordpress.org/trunk@38227


git-svn-id: http://core.svn.wordpress.org/trunk@38168 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-09 10:39:32 +00:00
Aaron Jorbin
b3b32f22a1 Updates: Improve experience for Bulk Actions when FTP is dismissed.
Before this change, when a bulk update was canceled due dismissing the FTP credentials modal, part of the actions didn't get canceled.  This meant the "There is a new version of…” notices become blank and the updates you had checked became unchecked.  Now, the notices remain and you are essentially returned to the screen you had before. Strings are also updated to improve ARIA usage.

Fixes #37563.
Props ocean90, swissspidy, obenland, afercia.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38162 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-09 01:14:28 +00:00
Aaron Jorbin
b86f7a832b Updates: Standardize JS Custom Event Names
Custom JS events are triggered on the document in order for plugins to have something to hook into.  The standard began in #31819 is dash separated and begins with `wp` to signify the namespace, followed by the subject of our action ( "theme", "plugin", etc.) followed by the action and an optional indicator of status ( "install-success", "deleting" ).

This brings some of the theme hooks in line with the standard.  As of now, all plugin actions in `src/wp-admin/js/updates.js` have an equal corresponding theme action.

Fixes #37598.
See #37512, #37216, #31819.
Props olarmarius, ocean90.



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


git-svn-id: http://core.svn.wordpress.org/trunk@38159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-08 22:49:28 +00:00
Dominik Schilling
1cef5f60f9 Update/Install: Remove the .notice-error class before adding classes for the update process.
Prevents displaying an update message with error styling.

Props obenland.
Props SergeyBiryukov for review.
Fixes #37550.
Built from https://develop.svn.wordpress.org/trunk@38209


git-svn-id: http://core.svn.wordpress.org/trunk@38150 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-05 22:57:29 +00:00
Dominik Schilling
572a9cb488 Update/Install: Replace "error" and "-1" failure messages with a more meaningful one.
* "-1" is an invalid nonce error, show 'An error has occurred. Please reload the page and try again.'.
* "error" means that the connection to the server was lost, show 'Connection lost or the server is busy. Please try again later.'.
* Escape the message in `wp-updates-admin-notice` because the response may include HTML.
* Remove HTML tags in `wp.updates.isValidResponse()` to make PHP's error messages more readable.

Props azaozz for review.
Fixes #37583.
Built from https://develop.svn.wordpress.org/trunk@38205


git-svn-id: http://core.svn.wordpress.org/trunk@38146 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-05 19:28:30 +00:00
Dominik Schilling
58d772a02f Upgrade/Install: Make some install/update failures more verbose.
An upgrader class is used in conjunction with an upgrader skin class. A skin class handles the logging for an upgrade and informs a user about the progress and failures.
The current Ajax install/update handlers are using the `Automatic_Upgrader_Skin` class because during an Ajax request no output is intended. The difference between Ajax updates and automatic updates is that you will see the full log (usually by email) while Ajax updates focus only on success or failure. For that `Automatic_Upgrader_Skin` has one disadvantage: It doesn't provide a way to retrieve failure messages which were passed through `WP_Upgrader_Skin::error()` by the upgrader.
To solve this issue a new skin `WP_Ajax_Upgrader_Skin` has been introduced. The skin extends `Automatic_Upgrader_Skin` and overrides the `error()` and `feedback()` methods to intercept all errors, which can be a `WP_Error` object or a string.

This updates all four Ajax handler for installing/updating themes/plugins to use the new skin. They now also check the skin for any intercepted errors and pass them on to the user.

Props flixos90, obenland, ocean90.
Props DrewAPicture, pento for review.
Fixes #37531.
Built from https://develop.svn.wordpress.org/trunk@38199


git-svn-id: http://core.svn.wordpress.org/trunk@38140 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-04 22:18:30 +00:00
Dominik Schilling
c9c2377b1d Plugins: Also update aria-labels when a plugin update fails.
Previously the label was stuck at "Updating…".

Props afercia, ocean90.
Props DrewAPicture for review.
Fixes #37556.
Built from https://develop.svn.wordpress.org/trunk@38196


git-svn-id: http://core.svn.wordpress.org/trunk@38137 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-04 21:06:38 +00:00
Aaron Jorbin
4d71eb8423 Updates: Clean up debug statements.
Removing some `console.error` calls leftover from development and wrapping the `console.log` call in a check to ensure `console.log` exists.

Fixes #37514.
Props ocean90, obenland


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


git-svn-id: http://core.svn.wordpress.org/trunk@38127 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-03 22:28:39 +00:00
Aaron Jorbin
94ac1499cf Updates: Improve bulk update failure notice
When doing a bulk update, if there are failures the user needs to know about that. This makes it clearer that you can click on the notification to see more details, especially for screen reader users.

Fixes #37510.
Props  juhise, Ankit K Gupta, afercia, jorbin, ocean90. 


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


git-svn-id: http://core.svn.wordpress.org/trunk@38126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-03 22:24:35 +00:00
Aaron Jorbin
472e0d1978 Upgrade/Install: Trigger additional JS events in shiny updates
Events for updating exist, but they lack context. This adds args so that plugins can detec t what plugin/theme is being installed.  Additionally, events for bulk actions, deleting and that and install is starting didn't exist, so this adds them.

Fixes #37512.
Props DavidAnderson, and ocean90, swissspidy for review.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38116 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-31 18:57:28 +00:00
Dominik Schilling
1abd5f0be7 Plugins: Use install_plugins_upload action to print the upload form.
Since [37221] the upload form is added to every plugin install screen via `install_plugins_upload()`. Previously the form was added through the `install_plugins_upload` (alias of `install_plugins_$tab`) action which allowed plugin authors to replace the form. This restores the previous behaviour.

* Add the form only to non-upload plugin install screens.
* Replace `install_plugins_upload()` with the `install_plugins_upload` and `install_plugins_pre_upload` actions.
* Remove `$upload_tab_class` and add a CSS class for the current tab to `.wrap`
* Adjust CSS selectors and toggle the whole container to support upload without an `upload-plugin` class.

Props DavidAnderson, ocean90.
Fixes #37495.
Built from https://develop.svn.wordpress.org/trunk@38172


git-svn-id: http://core.svn.wordpress.org/trunk@38113 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-31 18:11:29 +00:00
Dominik Schilling
3105764efd Plugins: Move capability checks further up in wp_ajax_update_plugin() and wp_ajax_delete_plugin().
Add tests for both Ajax handlers.

Props Yorick Koster, swissspidy.
Fixes #37490.
Built from https://develop.svn.wordpress.org/trunk@38168


git-svn-id: http://core.svn.wordpress.org/trunk@38109 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-27 17:44:41 +00:00
Dominik Schilling
de5a513027 Plugins: Use history.pushState() to customize the URL during searches.
`history.pushState()` requires an event handler for `popstate` which doesn't exist (yet).

Props rahulsprajapati for initial patch.
Fixes #37233.
Built from https://develop.svn.wordpress.org/trunk@38154


git-svn-id: http://core.svn.wordpress.org/trunk@38095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-26 20:01:28 +00:00
Dominik Schilling
868804db15 Plugins: Improve Ajax search of new plugins.
Fixes a few accessibility issues, restores the "Search Results" tab and the search type selector, and improves compatibility with older browsers.

Props rahulsprajapati, swissspidy, adamsilverstein, ocean90
See #37233.
Built from https://develop.svn.wordpress.org/trunk@38119


git-svn-id: http://core.svn.wordpress.org/trunk@38060 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-20 16:32:31 +00:00
Dominik Schilling
a320320ea0 Plugins: Use the correct admin screen when searching for plugins via Ajax.
Both list tables provide different actions based on where they are loaded, regular admin or network admin. Since there is only one Ajax handler for both screens we have to set the current screen before using the list tables.

Props swissspidy, ocean90.
Fixes #37373.
Built from https://develop.svn.wordpress.org/trunk@38091


git-svn-id: http://core.svn.wordpress.org/trunk@38032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-18 14:00:34 +00:00
Andrea Fercia
bf24773fc6 Accessibility: Improve keyboard navigation on the themes browser modal window.
Improves the `containFocus()` function to always get the correct first and last
focusable elements, even when the theme browser shows the active theme details.
Also, when on the first and last theme, adds a `disabled` attribute on the
previous and next navigation buttons to make them not focusable.

Fixes #37383.
Built from https://develop.svn.wordpress.org/trunk@38084


git-svn-id: http://core.svn.wordpress.org/trunk@38025 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-17 22:19:30 +00:00
Dominik Schilling
d5cb80dd7f Import: Enhance accessibility on the Import screen.
* Remove title attributes.
* Show "Install Now" and "Details" links if the importer isn't installed yet.
* Show a "Run Importer" link if the importer is installed. It also handles activation if the plugin isn't activated.
* Add `aria-label` attributes to each link.
* Unify the importer descriptions to make them independent from the plugin state. The API was changed in [meta3690].
* Adjust JavaScript callbacks for ajaxified importer installs.

Props afercia, swissspidy, ocean90.
See #24766.
Fixes #35191.
Built from https://develop.svn.wordpress.org/trunk@38075


git-svn-id: http://core.svn.wordpress.org/trunk@38016 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-17 15:32:30 +00:00
Dominik Schilling
98d03cb738 Update/Install: Give context to some install/update strings to allow for differentiation between theme and plugin translations.
Props swissspidy, SergeyBiryukov.
Fixes #37290.
Built from https://develop.svn.wordpress.org/trunk@38057


git-svn-id: http://core.svn.wordpress.org/trunk@37998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-13 17:32:29 +00:00
Andrew Ozz
532e8f0204 TinyMCE: preserve <script> and <style> tags inside the editor.
Uses image placeholders for the tags and makes then visible. That way the tags can also be deleted from inside the editor.

Props iseulde, azaozz.
Fixes #32923.
Built from https://develop.svn.wordpress.org/trunk@38039


git-svn-id: http://core.svn.wordpress.org/trunk@37980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-12 22:09:31 +00:00
Pascal Birchler
e4eee7ef5c Plugins: Improve Ajax search of installed plugins.
Fixes a few accessibility issues, tweaks the design of the search form to match other Ajax search fields and improves compatibility with older browsers.

See #37230.
Built from https://develop.svn.wordpress.org/trunk@38033


git-svn-id: http://core.svn.wordpress.org/trunk@37974 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-11 21:50:31 +00:00
Pascal Birchler
aa4334cc50 Upgrade/Install: Do not remove event handlers when trying to update a theme.
Previously, when clicking "Update now" the callbacks were erroneously removed. This prevented opening the filesystem credentials modal for a second time.

Fixes #37285.
Built from https://develop.svn.wordpress.org/trunk@38019


git-svn-id: http://core.svn.wordpress.org/trunk@37960 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-09 11:43:43 +00:00
Gary Pendergast
a37d3051f4 Docs: Fix an incorrect @since comment.
See #36495.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37935 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-06 23:49:30 +00:00
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
Weston Ruter
ee85740365 Customize: Remove gap above section contained in panel when initially focusing on control.
Props mattwiebe.
Fixes #36050.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36772 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-02 18:37:26 +00:00
Weston Ruter
94b59e7f0d Customize: Ensure autofocus deep-linking applies for dynamically-created panels, sections, and controls.
Removes overly-zealous filtering of autofocus panels, sections, and controls which are unrecognized or for which the user doesn't have the capability to focus (in which case it would no-op anyway). Also defers autofocus logic until instances are created, even after initial `ready` event. This ensures that autofocus can apply for any panels, sections, or controls that get created via the loaded preview.

See #28650.
Fixes #36018.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36763 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-01 22:04:27 +00:00
Sergey Biryukov
2099e388bb Comments: Avoid extra AJAX requests when undoing Spam or Trash actions.
Props afercia.
Fixes #35904.
Built from https://develop.svn.wordpress.org/trunk@36774


git-svn-id: http://core.svn.wordpress.org/trunk@36741 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-29 03:20:26 +00:00
Dominik Schilling
e5ea82d81a Spelling: Standardize on "front end"/"back end" (noun) and "front-end"/"back-end" (adjective).
Props obrienlabs, thewanderingbrit.
Fixes #34887.
Built from https://develop.svn.wordpress.org/trunk@36709


git-svn-id: http://core.svn.wordpress.org/trunk@36676 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-25 12:53:27 +00:00
Konstantin Obenland
237f6a0e58 Customize: Introduce Logo support for themes.
Allows a common theme feature to have a common implementation provided by core and available in a consistent location for users.
See https://make.wordpress.org/core/2016/02/24/theme-logo-support/

Props kwight, enejb, jeherve, bhubbard, samhotchkiss, zinigor, eliorivero, adamsilverstein, melchoyce, ryan, mikeschroder, westonruter, pento, karmatosed, celloexpressions, obenland. 
See #33755.


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


git-svn-id: http://core.svn.wordpress.org/trunk@36665 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-24 22:10:26 +00:00
Weston Ruter
2214f69e43 Customize: Allow controls to be registered without any associated settings.
* Improves parity between partials and controls. A partial or control can be settingless if instantiated with `settings` param as empty array (otherwise, if null, then the partial/control ID is used). 
* Eliminate need to create dummy settings that serve no purpose except to place a control in the UI.
* Removes dummy settings for `create_new_menu` and `new_menu_name`.
* Introduces `WP_Customize_Control::$capability` and `WP_Customize_Partial::$capability`, and if set checks them in the respective `check_capabilities()` methods.
* Prevents PHP fatal error from happening when non-existing settings are provided to control: "Call to a member function `check_capabilities()` on a non-object".
* Fixes issue where nav menu items and widgets were no longer working with selective refresh because cap check was failing.

See #27355.
Fixes #35926.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36656 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-24 18:28:28 +00:00
Weston Ruter
5ed6b0d31c Customize: Fix nav menu item search after Backbone update.
Fixes regression introduced in [36546].

See #34350.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36642 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-24 05:38:28 +00:00
Weston Ruter
6b775d4afe Customize: Add selective refresh framework with implementation for widgets and re-implementation for nav menus.
See https://make.wordpress.org/core/2016/02/16/selective-refresh-in-the-customizer/.

Props westonruter, valendesigns, DrewAPicture, ocean90.
Fixes #27355.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36553 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-19 18:41:28 +00:00
Dominik Schilling
6f2a56bf3e Themes: After [36546] restore theme search functionality.
* Correct several incorrect uses of `_.union`. Since Underscore 1.7.0 `_.union` supports only arrays and not variadic args.
* Use a namespaced event `themes:update`. Backbone 1.2 added a built in `update` event that triggers after any amount of models are added or removed from a collection.

Props adamsilverstein.
See #34350.
Built from https://develop.svn.wordpress.org/trunk@36580


git-svn-id: http://core.svn.wordpress.org/trunk@36547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-18 21:21:26 +00:00
Dominik Schilling
658d825ea9 Customizer: In nav menus show the location name instead of slug.
Props ryankienstra.
Fixes #34755.
Built from https://develop.svn.wordpress.org/trunk@36573


git-svn-id: http://core.svn.wordpress.org/trunk@36540 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-18 17:16:27 +00:00
Dominik Schilling
8b781dfaa7 Updates: Prevent further actions if an update button is disabled.
Props adamsilverstein, afercia.
Fixes #35257.
Built from https://develop.svn.wordpress.org/trunk@36558


git-svn-id: http://core.svn.wordpress.org/trunk@36525 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 19:42:26 +00:00
Dominik Schilling
4693b25171 Update Backbone and Underscore to the latest versions.
Backbone, from 1.1.2 to 1.2.3. Underscore, from 1.6.0 to 1.8.3.

The new versions of Backbone and Underscore offer numerous small bug fixes and some optimizations and other improvements. Check the [http://backbonejs.org/#changelog Backbone changelog] and [http://underscorejs.org/#changelog Underscore changelog] for the full details. 

The new versions include some significant changes that may break existing code. Plugins or themes that rely on the bundled Backbone and/or Underscore libraries should carefully check functionality with the latest versions and run any available unit tests to ensure compatibility.

Some changes of note that were addressed in core as part of this upgrade:

* `_.flatten` no longer works with objects since Underscore.js 1.7. `_.flatten()` working with objects was an unintended side-affect of the implementation, see [https://github.com/jashkenas/underscore/issues/1904#issuecomment-60241576 underscore#1904]. Check any `_flatten` usage and only flatten arrays.
* As of Backbone 1.2.0, you can no longer modify the `events` hash or your view's `el` property in `initialize`, so don't try to modify them there. 
* Since Underscore 1.7, Underscore templates no longer accept an initial data object. `_.template` always returns a function now so make sure you use it that way.

Props adamsilverstein.
Fixes #34350.
Built from https://develop.svn.wordpress.org/trunk@36546


git-svn-id: http://core.svn.wordpress.org/trunk@36513 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 15:22:26 +00:00
Weston Ruter
b5e18056e5 Customize: Add a user-friendly way to preview site responsiveness for desktop, tablet, and mobile.
Introduces `WP_Customize_Manager::get_previewable_devices()` with a `customize_previewable_devices` filter to change the default device and which devices are available for previewing. This is a feature that was first pioneered on WordPress.com.

Props celloexpressions, folletto, valendesigns, westonruter, welcher, adamsilverstein, michaelarestad, Fab1en.
Fixes #31195.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36499 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-16 01:57:26 +00:00
Weston Ruter
453ff22d7f Customize: Hide widgets re-order button when no re-ordering is possible.
Hide the re-order button if there are no widgets in the sidebar, or if there is there is only one sidebar and there is only one widget in the sidebar.

Props rabmalin, westonruter.
Fixes #35533.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36489 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-12 23:52:27 +00:00
Eric Lewis
2bfc0f5218 Menus: Allow larger menus to be created in the Edit Menu screen.
In the Edit Menu screen, each menu item creates 11 form input elements. In menus with more than 71 menu items, often items after the 71st weren't saved. This was because PHP's runtime configuration `max_input_vars` default value is 1000. Large menus exceed this, so PHP didn't populate the `$_POST` superglobal for the latter menu items.

The entire form is now JSON-encoded into a single input which populates `$_POST` manually on form submission.

This was attempted previously in [36506] which was reverted in [36507]. Some form fields were not being slurped into the form's JSON representation, and it did not scale for a site with many posts. This approach fixes those problems.

Props ocean90, afercia.
See #14134.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36477 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-11 19:08:27 +00:00
Eric Lewis
a64dbc805b Menus: Revert larger menu support in Edit Menus screen in [36506].
JSON encoding the form as it exists on the page will not scale. 

See #14134.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36474 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-10 14:11:26 +00:00
Eric Lewis
48fdbf96de Menus: Allow larger menus to be created in the Edit Menu screen.
In the Edit Menu screen, each menu item creates 11 form input elements. In menus with more than 71 menu items, often items after the 71st weren't saved. This was because PHP's runtime configuration `max_input_vars` default value is 1000. Large menus exceed this, so PHP didn't populate the `$_POST` superglobal for the latter menu items.

The entire form is now JSON-encoded into a single input which populates `$_POST` manually on form submission.

See #14134.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36473 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-10 03:32:25 +00:00
Weston Ruter
9f7d608a6a Customizer: Fix searching for available nav menu items by updating reference to nonce.
Fixes regression introduced in [36414] where the nonce for listing available nav menu items was updated to use the new centralized location at `wp.customize.settings.nonce`, but the nonce for search did not get updated.

See #35617.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36399 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-01 21:36:28 +00:00
Andrea Fercia
c9e5edd637 Menus: Avoid displaying two spinners when adding selected menu items.
Fixes #35682.
Built from https://develop.svn.wordpress.org/trunk@36427


git-svn-id: http://core.svn.wordpress.org/trunk@36394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-31 18:06:27 +00:00
Andrea Fercia
82f59fc6ef Menus: after [36379] prevent "Quick Search" form submission when pressing Enter.
Fixes #35374.
Built from https://develop.svn.wordpress.org/trunk@36426


git-svn-id: http://core.svn.wordpress.org/trunk@36393 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-31 14:03:27 +00:00
Weston Ruter
c376477265 Customizer: Export nonce, theme, and url app settings in preview as exported in pane.
* Introduce `WP_Customize_Manager::get_nonces()` to consolidate logic for retrieving nonces.
* Export nonces centrally in `wp.customize.settings.nonce` with each request and update nav menus preview to utilize.
* Send updated nonces to preview upon `nonce-refresh`.
* Request full preview refresh if Nav Menu selective refresh request fails (e.g. due to bad nonce).
* Update nav menus and widgets in Customizer to utilize `customize_refresh_nonces` for exporting nonces and keeping them up to date.

See #27355.
Fixes #35617.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36381 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-27 17:55:26 +00:00
Weston Ruter
c7923b2c9d Customizer: Improve parity between JS Setting models in preview with JS Setting models in pane.
* Ensure that Setting `Value` objects in preview get initial `_dirty` flag set if values among POST data.
* Upon `saved` event, send `saved` message to preview with the `response` to trigger `saved` event there.
* Reset `_dirty` flag for all setting `Value` objects in preview upon `saved`.
* Continue to create settings synced from pane even after initial bootstrap, and create them as dirty.
* Ensure that `id` property is set for setting `Value` objects in preview.

See #27355.
Fixes #35616.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36374 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-26 23:52:25 +00:00
Weston Ruter
57c2b5d192 Customizer: Use "(Untitled)" as site title if blogname is empty.
Fixes a layout issue in the Customizer UI. Also de-duplicate title display logic, outputting "Loading..." as site title in PHP with actual title being set upon Customizer `ready`. Also update the site title in response to a `blogname` setting change as opposed to `input` DOM events on the control.

Fixes #35579.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36355 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-23 23:15:27 +00:00
Weston Ruter
fb8544a0ac Customizer: Add shift-click on nav menu items in preview to focus on corresponding nav menu item controls in pane.
Add missing `params.completeCallback` to `MenuItemControl.focus()` for parity with `Control.focus()`. Also adds `params` to `MenuItemControl.expandForm`, `MenuItemControl.collapseForm()`, and `MenuItemControl.toggleForm()`.

Props MattGeri, westonruter.
Fixes #32681.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36350 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-22 21:21:26 +00:00
Andrea Fercia
450cbb3e81 Accessibility: Remove title attributes from the Menus screen.
Also, adds missing labels and improves the existing ones. 
Updates the "custom links" labels and inputs in the Customizer too.
Introduces a generic, reusable, `.wp-initial-focus` CSS class to be used for
the sole purpose of setting the initial focus.
"Quick Search": uniform the attached events and avoids new AJAX requests to
be triggered when the pressed key doesn't change the searched term.

Fixes #35374.
Built from https://develop.svn.wordpress.org/trunk@36379


git-svn-id: http://core.svn.wordpress.org/trunk@36346 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-22 14:26:27 +00:00
Andrea Fercia
496bde4e77 Quick/Bulk Edit: Remove a no more used jQuery loop for unsupported post formats.
See #23426.
See #24096.
Fixes #35564.
Built from https://develop.svn.wordpress.org/trunk@36375


git-svn-id: http://core.svn.wordpress.org/trunk@36342 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-21 22:50:25 +00:00
Andrea Fercia
e41649c325 Accessibility: Improve focus handling on the Taxonomies Quick Edit.
Moves focus back to a proper place when saving or closing the form.

Fixes #35460.
Built from https://develop.svn.wordpress.org/trunk@36304


git-svn-id: http://core.svn.wordpress.org/trunk@36271 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-14 23:03:26 +00:00
Andrea Fercia
c6ec579751 Accessibility: Improve focus handling and audible feedback on the Posts Quick-Bulk Edit.
Avoids a focus loss when saving or closing the form moving focus back to a proper place.
Uses `wp.a11y.speak()` to dispatch successful edits and error messages to screen readers.

Fixes #34756.
Built from https://develop.svn.wordpress.org/trunk@36303


git-svn-id: http://core.svn.wordpress.org/trunk@36270 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-14 22:58:27 +00:00
Pascal Birchler
08693cd206 Administration: After [36295], mark postBoxL10n as a global to please JSHint.
See #26399.
Built from https://develop.svn.wordpress.org/trunk@36296


git-svn-id: http://core.svn.wordpress.org/trunk@36263 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-14 08:40:26 +00:00
John Blackbourn
9ae1736d01 Administration: Add a "Drag boxes here" message to empty dashboard meta boxes so it's clear to users that it's possible to drag meta boxes into empty spaces.
Props xavortm
Fixes #26399

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


git-svn-id: http://core.svn.wordpress.org/trunk@36262 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-14 04:13:26 +00:00
Dominik Schilling
b7df807589 jQuery: Replace use of the .load() method for the "load" event with .on( 'load', handler ).
The shortcut is deprecated since jQuery 1.8.

See http://api.jquery.com/load-event/.
See #35380.
Built from https://develop.svn.wordpress.org/trunk@36287


git-svn-id: http://core.svn.wordpress.org/trunk@36254 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-13 17:22:27 +00:00
Dominik Schilling
b3d8732c17 jQuery: Replace the use of the .size() method with the .length property.
The `.size()` method is deprecated since jQuery 1.8. The `.length` property is preferred because it doesn't have the overhead of a function call.

See https://api.jquery.com/size/.
See #35380.
Built from https://develop.svn.wordpress.org/trunk@36286


git-svn-id: http://core.svn.wordpress.org/trunk@36253 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-13 16:17:27 +00:00
Konstantin Obenland
c0e903a040 Themes: Clear floated theme cards on Themes page.
Also maintains visual separation for Broken Themes table on searches that
return no results.

See [36171] for `.wp-clearfix`.

Props 5um17, obenland, valendesigns, afercia.
Fixes #26646.


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


git-svn-id: http://core.svn.wordpress.org/trunk@36237 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-12 17:13:29 +00:00
Andrea Fercia
9b486acb9b Quick Edit: on the Taxonomies screens, prevent a page reload when pressing Enter on a focused field.
Fixes #35401 for trunk.
Built from https://develop.svn.wordpress.org/trunk@36260


git-svn-id: http://core.svn.wordpress.org/trunk@36227 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-11 13:15:29 +00:00
Boone Gorges
cbb245196c Use a more generous selector when setting up tag suggestion.
This allows taxonomy metaboxes to be registered in a greater variety of
locations on the Dashboard.

Props johnjamesjacoby..
Fixes #35349.
Built from https://develop.svn.wordpress.org/trunk@36227


git-svn-id: http://core.svn.wordpress.org/trunk@36194 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-08 23:18:25 +00:00
Andrea Fercia
ae1575bd80 Media: make the Image Editor usable with a keyboard.
For accessibility, all interactive controls must be operable from the keyboard.
Replaces `<div>`s used as UI controls with buttons. Groups some logically-related
form elements.

Fixes #28864.
Built from https://develop.svn.wordpress.org/trunk@36223


git-svn-id: http://core.svn.wordpress.org/trunk@36190 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-08 19:13:26 +00:00
Konstantin Obenland
c252e77ce3 Plugins: Use plugin file rather than slug as identifier
The plugin file is unique while there can be more than one plugin with the
same slug. This also allows us to simplify the way updates from the plugin
detail iframe are executed.

See [36205].
Fixes #35350.


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


git-svn-id: http://core.svn.wordpress.org/trunk@36188 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-08 17:48:28 +00:00
Konstantin Obenland
d5fd177b96 Themes: Avoid changing the count of themes with updates in network admin.
Makes the count bubble selector a little more specific to avoid interfering
with the admin menu, but not too specific for installed theme searches not to
update the bubble.

See [29786], [31495].
Fixes #35332.


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


git-svn-id: http://core.svn.wordpress.org/trunk@36171 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-06 22:32:28 +00:00
Andrea Fercia
1b3ee7098a Media: set the image editor spinner on the smallest possible area.
When using spinners as background images, the re-painted area should be the smallest
possible one. See similar performance issue in #31196, #33311, #33322, and #34951.

Fixes #35296.
Built from https://develop.svn.wordpress.org/trunk@36162


git-svn-id: http://core.svn.wordpress.org/trunk@36128 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-03 16:49:28 +00:00
Andrea Fercia
f13881d4e3 Admin: Restore the "Show advanced menu properties" checkboxes IDs.
These checkboxes are used on the Menus screen options and the Customizer Menus options.
Their IDs were removed in [34991] but they're needed to get the checkboxes to be saved
via AJAX. Also, avoids a useless AJAX call.

Fixes #35112 for trunk.
Built from https://develop.svn.wordpress.org/trunk@36137


git-svn-id: http://core.svn.wordpress.org/trunk@36103 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-31 11:52:26 +00:00
Andrea Fercia
27e5599bf7 Admin: fix repositioning of notices when the first header is not an immediate children of .wrap.
Props DvanKooten for the initial patch.
Fixes #35047 for trunk.
Built from https://develop.svn.wordpress.org/trunk@36134


git-svn-id: http://core.svn.wordpress.org/trunk@36100 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-31 11:05:31 +00:00
Pascal Birchler
a7e13d0af9 Editor: Correctly indent definition lists when switching from the visual to the text editor.
Props ocean90, katieburch.
Fixes #23299.
Built from https://develop.svn.wordpress.org/trunk@35999


git-svn-id: http://core.svn.wordpress.org/trunk@35964 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-17 23:06:25 +00:00
Andrea Fercia
282e7c36eb Accessibility: Add an ARIA role button to links that behave like buttons when JavaScript is on.
Introduces a simple way to give a proper semantics of `button` to links that behave
like UI controls when JavaScript is on and behave like actual links when JavaScript
is off. First implementation on the Terms list table.

Patch prepared during WordCamp US 2015 Contributor Day.

Props mcapybara, garusky, takayukister.

See #26504.
Fixes #34867.
Built from https://develop.svn.wordpress.org/trunk@35947


git-svn-id: http://core.svn.wordpress.org/trunk@35911 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-15 13:25:28 +00:00
Pascal Birchler
5fa8ea8c6b Passwords: Hide weak password confirmation checkbox when password strength improves.
Props subharanjan for initial patch.
Fixes #34950.
Built from https://develop.svn.wordpress.org/trunk@35870


git-svn-id: http://core.svn.wordpress.org/trunk@35834 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-11 21:54:27 +00:00
Michael Adams
699c377856 Meta Boxes: Preserve radio inputs' state when sorting metaboxes.
When sorting a metabox, a clone of that metabox is created as a drag/drop "helper".
Previously, any checked radio input in the original metabox would become unchecked, when its clone "helper" was inserted into the DOM
(since only one radio within a set of radios of the same name can be checked).

Continued use of the clone helper is important so that the element being dragged isn't subject to the click and other event handlers attached to the real metabox,
so we can't just switch to dragging around the real metabox.  See, for example, comment:10:ticket:16972.

Preserve the radios' state via some name attribute trickery.

Fixes #16972

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


git-svn-id: http://core.svn.wordpress.org/trunk@35773 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-06 22:23:49 +00:00
Gary Pendergast
31f51e2cbb The the Docs: Fix the the dittography
Sometimes, it's easy to to type the the same word twice, especially if if it's a simple word. We probably shouldn't do do do (do do do doo) it, though.

(I've excluded external libs from this change.)

Fixes #34885.


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


git-svn-id: http://core.svn.wordpress.org/trunk@35757 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-06 21:23:25 +00:00
Dominik Schilling
7f3082491d Passwords: Re-enable password fields before submitting the form.
Avoids an PHP undefined notice when creating new users.

Fixes #33699.
Built from https://develop.svn.wordpress.org/trunk@35733


git-svn-id: http://core.svn.wordpress.org/trunk@35697 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-24 21:17:27 +00:00
Andrew Ozz
91759029e9 TinyMCE: fix the regexp used to protect line breaks inside script and pre tags to match <script> that load external scripts.
Fixes #34760.
Built from https://develop.svn.wordpress.org/trunk@35727


git-svn-id: http://core.svn.wordpress.org/trunk@35691 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-22 19:13:28 +00:00
Scott Taylor
8caf5d9759 Plugins: add dismissible notices to update failures.
Adds unit test.

Props afercia, mehulkaklotar.
Fixes #33465.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-18 20:10:26 +00:00
Dominik Schilling
9df7c4edea Passwords: Only disable hidden password fields if they are really hidden.
Makes the password field on install and for password resets editable again. Both fields were accidentally set to disabled in [35603].

Props adamsilverstein, flixos90.
Fixes #33699.
Built from https://develop.svn.wordpress.org/trunk@35649


git-svn-id: http://core.svn.wordpress.org/trunk@35613 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-16 20:49:26 +00:00
Dominik Schilling
a7848ea08b Themes: Hide the favorites form when performing a search.
The search is global and ignores the user setting. Same for filters.

See #34206.
Built from https://develop.svn.wordpress.org/trunk@35647


git-svn-id: http://core.svn.wordpress.org/trunk@35611 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-16 19:50:26 +00:00
Gary Pendergast
6381e168b7 Pinking Shears: Remove some errant non-breaking spaces from a few JavaScript files.
Props francoisb.

Fixes #34658.


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


git-svn-id: http://core.svn.wordpress.org/trunk@35591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-12 12:04:27 +00:00
Dominik Schilling
27e4384e89 Comments: Dynamically update the document title text for all languages, not only English.
See [33821].
Fixes #33414.
Built from https://develop.svn.wordpress.org/trunk@35615


git-svn-id: http://core.svn.wordpress.org/trunk@35579 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-11 21:00:27 +00:00
Andrea Fercia
5f93491286 Accessibility: improvements for the taxonomies Quick Edit form.
Changes the "Cancel" and "Update" controls in buttons for better semantics and
accessibility. On cancel and successful saving, moves focus back to the term title
to avoid a focus loss. Dispatches error and success messages to `wp.a11y.speak`
to give assistive technologies users an audible feedback.

Patch prepared at #wpcdit, first Italian WordPress Contributor Day.

Props garusky, chiara_09.
Fixes #34613.
Built from https://develop.svn.wordpress.org/trunk@35605


git-svn-id: http://core.svn.wordpress.org/trunk@35569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-11 00:24:28 +00:00
Dominik Schilling
66dee42444 Passwords: Disable hidden input fields on profile/user edit page.
Prevents an issue where password helpers would autofill the hidden password fields and inadvertently causing password changes when editing other fields on the profile page.

Props adamsilverstein.
Fixes #33699.
Built from https://develop.svn.wordpress.org/trunk@35603


git-svn-id: http://core.svn.wordpress.org/trunk@35567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-10 20:41:26 +00:00
Weston Ruter
f4659f7ee0 Customize: Fix focus and autofocus on nav_menu_item controls.
Embed the `nav_menu_item` control not only when the contained `nav_menu` section expands, but also if the control was autofocused (via the `autofocus[control]` query param). Also applies change from [33596] to work-around a broken `:focusable` selector in jQuery UI.

See #33258.
Fixes #34629.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35548 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-09 03:14:25 +00:00
Weston Ruter
5411447dd3 Customize: Fix sub-nav menu items from appearing to bump to root level in preview upon saving.
This issue would appear when the parent nav menu item was also newly-inserted. The issue was only apparent in the prevew, as the actual data saved was correct. The `menu_item_parent` properties of the saved sub-nav menu items needed to get updated to refer to the newly-inserted parent `nav_menu_item` post IDs, as opposed to retaining the placeholder IDs.

Fixes #34628.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35545 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-09 01:19:26 +00:00
Scott Taylor
e649fabb6a Accessibility: add missing alt attributes to a gaggle of <img>s.
Props afercia.
Fixes #34583.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-07 16:12:27 +00:00
Gary Pendergast
84c8243514 Themes: Remove an errant comma from theme.js.
Added in [35527].

See #34206.


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


git-svn-id: http://core.svn.wordpress.org/trunk@35497 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-04 23:49:26 +00:00
Sergey Biryukov
a41e5d0270 Themes: Add a Favorites tab to the Add Themes screen.
You can now browse and install your wordpress.org theme favorites from the theme installer, just like with plugins.

Props swissspidy.
Fixes #34206.
Built from https://develop.svn.wordpress.org/trunk@35527


git-svn-id: http://core.svn.wordpress.org/trunk@35491 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-04 21:49:26 +00:00
Andrea Fercia
c443d45708 Admin: Ensure notices with the below-h2 class are not repositioned after [35238].
Keeps the `.below-h2` class for backwards compatibility with plugins that are (incorrectly) using it. Plugins should use `.inline` instead.

Props stephenharris.
Fixes #34570. See #34294.
Built from https://develop.svn.wordpress.org/trunk@35516


git-svn-id: http://core.svn.wordpress.org/trunk@35480 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-04 21:27:26 +00:00
Weston Ruter
2e98e461a2 Customize: Fix auto-expand (and focus) on newly added widgets.
Add widget controls with an initially-true `active` state so that calling `expand()` will not be short-circuited. Previously the `active` state would be set once the preview refreshes, but this happens too late for the `addWidget` call. Fixes regression introduced in [35231].

Fixes #34514.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35450 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-01 22:27:26 +00:00
Andrew Ozz
de881c4a97 Precommit cleanup, see r35313.
Built from https://develop.svn.wordpress.org/trunk@35318


git-svn-id: http://core.svn.wordpress.org/trunk@35284 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-21 05:33:24 +00:00
Andrew Ozz
71ac079074 Widgets: add a button to delete all inactive widgets simultaneously for better UX.
Props cdog.
Fixes #19159.
Built from https://develop.svn.wordpress.org/trunk@35317


git-svn-id: http://core.svn.wordpress.org/trunk@35283 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-21 05:23:26 +00:00
Scott Taylor
e525ab849d Administration: the current admin menu item should have an aria-haspopup attribute when the menu is folded.
Unify the jQuery selector caching for `window`, `document`, and `body`.

Props afercia.
Fixes #32578.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35279 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-21 03:41:24 +00:00
Andrea Fercia
1e1e7a9fc9 Customizer: Make the widgets "Reorder" and "Add a Widget" buttons... buttons.
For accessibility, UI controls should preferably be native controls. Adds
ARIA attributes and labels to improve accessibility and pair these buttons
with the ones in the Menu Customizer.

Props obenland, TomHarrigan, sanket.parmar, metodiew, afercia.

Fixes #33327.
Built from https://develop.svn.wordpress.org/trunk@35304


git-svn-id: http://core.svn.wordpress.org/trunk@35270 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-20 20:15:26 +00:00
Weston Ruter
6d9d18315d Customizer: Implement indicators for invalid nav menu items.
The same indicator on the nav menus admin page is now present for nav menu items in the Customizer. When a menu item is present for a post type that is no longer registered, the menu item will appear with the indicator.

Props kucrut, westonruter.
Fixes #33665.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35268 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-20 19:08:25 +00:00
Sergey Biryukov
e0af554638 Tags: Avoid a double trailing space after tags separator in auto-suggest.
Props afercia.
Fixes #33881.
Built from https://develop.svn.wordpress.org/trunk@35292


git-svn-id: http://core.svn.wordpress.org/trunk@35258 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-20 16:00:30 +00:00
Scott Taylor
f89b90a1c9 Theme Installer: toggle iframe-ready on the overlay to control the spinner animated GIF and high CPU usage.
Props afercia, adamsilverstein.
Fixes #33322.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35247 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-20 05:36:25 +00:00
Scott Taylor
62d8b8c5bc List Tables: revert the majority of [34467]. This was almost universally abhorred (the JS that disabled the bulk dropdowns).
See #31634.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35243 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-20 04:29:24 +00:00
Andrea Fercia
e074209a3d Accessibility: Improve the headings hierarchy in the Add Themes screen.
Fixes #33819.
Built from https://develop.svn.wordpress.org/trunk@35273


git-svn-id: http://core.svn.wordpress.org/trunk@35239 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-19 22:04:25 +00:00
Weston Ruter
f676fdcee3 Customizer: Fix margin-top calculation for Themes section.
Ensure that the Themes section calculates its `margin-top` as a panel, since the section behaves as one. Fixes regression caused by [35231].

See #33567.


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


git-svn-id: http://core.svn.wordpress.org/trunk@35217 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-17 22:41:25 +00:00
Ella Iseulde Van Dorpe
08f71faac3 JSHint after [35238]
Built from https://develop.svn.wordpress.org/trunk@35239


git-svn-id: http://core.svn.wordpress.org/trunk@35205 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-17 07:11:24 +00:00
Ella Iseulde Van Dorpe
47e364de42 Admin: fix repositioning notices
Fixes #34294.
Props afercia.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35204 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-17 07:04:26 +00:00
Weston Ruter
6bcd8ad757 Customizer: Always show Widgets panel initially if sidebars are registered; show notice to users in panel if no widget areas are in current preview.
Widgets panel will not wait to display until the preview loads.

Also fixes problems with `margin-top` in panels where other panels' `active` states change, as well as ensuring sections of deactivated panel collapse before panel is hidden to prevent the pane from becoming empty of controls.

Fixes #33052.
Fixes #33567.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35197 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-16 23:48:25 +00:00
Sergey Biryukov
f98136c1b5 Sample permalink: Improve accessibility of changing the permalink on Edit Post screen.
Props afercia.
Fixes #34255.
Built from https://develop.svn.wordpress.org/trunk@35229


git-svn-id: http://core.svn.wordpress.org/trunk@35195 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-16 23:02:25 +00:00
Ella Iseulde Van Dorpe
3babb1682a Fix close button plugin modal after [18590]
See #18590.


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


git-svn-id: http://core.svn.wordpress.org/trunk@35164 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-15 14:52:26 +00:00
Andrea Fercia
19eb905f58 Accessibility: update a jQuery selector used for the Plugin Cards after [35009].
When updating a plugin from its details modal dialog, focus should be moved back to the plugin title which now is a H3 heading.

Fixes #33818.
Built from https://develop.svn.wordpress.org/trunk@35155


git-svn-id: http://core.svn.wordpress.org/trunk@35121 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-14 15:27:27 +00:00
Scott Taylor
a31d7e37dc Color Picker: when opening and closing, toggle a wp-picker-active class on the wrapper.
Props norcross.
Fixes #29471.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35064 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-13 01:08:25 +00:00
Andrea Fercia
6b449abadc Accessibility: bump headings one level up on the Appearance > Widgets screen for a better headings hierarchy.
Props mrahmadawais, afercia.
Fixes #33659.
Built from https://develop.svn.wordpress.org/trunk@35015


git-svn-id: http://core.svn.wordpress.org/trunk@34980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-10 16:34:25 +00:00
Scott Taylor
5fdf928bcf Admin JS: after [34977], avoid variable names conflicts with e.
Props afercia.
Fixes #18590.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34979 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-10 15:50:24 +00:00
Andrew Ozz
a6cf0b41a6 JS: in event callbacks replace the very outdated return false with preventDefault().
Props adamsilverstein.
Fixes #18590.
Built from https://develop.svn.wordpress.org/trunk@34977


git-svn-id: http://core.svn.wordpress.org/trunk@34942 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-09 01:27:27 +00:00
Scott Taylor
2783773775 Meta Boxes: reboot some of the code in postbox.js to support aria-expanded attribute toggling and to properly reference static class properties.
Props afercia, wonderboymusic.
Fixes #33754.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34858 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-07 01:58:25 +00:00
Weston Ruter
aa044b054e Customizer: Ensure that wp.customize.Widgets.savedWidgetIds is defined up front.
In 4.3 the widget controls were fully initialized up front along with the sidebar controls. The sidebar control depended (unnecessarily) on the widget control to ensure that `wp.customize.Widgets.savedWidgetIds` was defined. So after [34563] there could be a situation where the widgets are added/removed from a sidebar before their controls are initialized (if the sidebar section is never expanded), resulting in an error attempting to get a property off of an undefined value. So this change does the right thing and defines `savedWidgetIds` up front.

Also changes the `savedWidgetIds` variable type from an array to an object, to match how it is used as a dictionary lookup.

See #33901.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34848 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-06 21:59:25 +00:00
Weston Ruter
31a394fcf7 Customizer: Reset horizontal scroll position when finished dragging a nav menu item.
Props karinedo, austinginder, adamsilverstein, tyxla.
Fixes #33367.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34799 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-05 20:46:27 +00:00
Weston Ruter
d9cca27386 Customize: Fix nav_menu_item CSS classes array being incorrectly presented in input field as comma-delimited list.
Instead of using `Array.toString()` to serialize an array with comma delimiters, explicitly `join` the array using spaces instead. Also ensure that `xfn` is handled properly if it ever gets stored as an array. 

Props tyxla, westonruter.
Fixes #34111.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34753 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-03 00:15:24 +00:00
Andrea Fercia
0acededa82 In wp_comment_reply() change the H5 headings in fieldset legends for better accessibility.
Also, add a "Edit Comment" legend before the Quick Edit form to pair it with "Reply to Comment" and "Add new Comment" and move the Name, Email, and URL fields after the Comment textarea.

Props joedolson, afercia.

Fixes #33757.
Built from https://develop.svn.wordpress.org/trunk@34743


git-svn-id: http://core.svn.wordpress.org/trunk@34708 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 14:52:25 +00:00
Helen Hou-Sandí
02703fae19 Sample permalink: Buttons still need the .button class.
Also fixes unit tests post-[34670]. The test methods have been slightly renamed because it is no longer a button. Hopefully this name will be more future-proof.

see #18306.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34635 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-28 22:07:25 +00:00
Helen Hou-Sandí
e976f9b503 Edit: Remove the redundant "View Post" button-link and link the sample permalink.
Previously there were two persistent "View Post" links on an edit screen: next to the permalink and in the toolbar. This would then become three links after a post was published or updated, as a link is also included in the admin notice. This is a lot of redundancy and visual noise for a flow that is not your primary action upon starting to edit a post. The "View Post" link next to the sample permalink was particularly bad because it is styled like a button, but unlike a button, does not keep you on the current screen.

Because the permalink is now linked, there is no highlighted slug that you can click to edit, but rather just the "Edit" button.

props scribu, lessbloat, sabreuse, SergeyBiryukov, DrewAPicture, helen.
see #18306.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-28 20:10:26 +00:00
Weston Ruter
208330f2dc Customizer: Defer embedding widget controls to improve DOM performance and initial load time.
The Menu Customizer feature includes a performance technique whereby the controls for nav menu items are only embedded into the DOM once the containing menu section is expanded. This commit implements the same DOM deferral for widgets but goes a step further than just embedding the controls once the widget area's Customizer section is expanded: it also defers the embedding of the widget control's form until the widget is expanded, at which point the `widget-added` event also fires to allow any additional widget initialization to be done. The deferred DOM embedding can speed up initial load time by 10x or more. This DOM deferral also yields a reduction in overall memory usage in the browser process.

Includes changes to `wp_widget_control()` to facilitate separating out the widget form from the surrounding accordion container; also includes unit tests for this previously-untested function. Also included are initial QUnit tests (finally) for widgets in the Customizer.

Fixes #33901.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34527 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-25 21:02:27 +00:00
Weston Ruter
885944f79f Customizer: Fix usage of jQuery.contains() allowing active state changes to again animate control visibility.
Aligns usage of `jQuery.contains()` in a control's `onChangeActive` method with the existing usage in the corresponding `onChangeActive` method for panels and sections.

Props nikeo.
Fixes #33509.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34521 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-25 19:54:50 +00:00
Scott Taylor
fa58223b49 Profile: when clicking "Generate Password", toggling visibility, then canceling, ensure that the UI resets properly for when the "Generate Password" button is clicked again.
Props umesh.nevase.
Fixes #33897.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34503 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-25 13:54:24 +00:00
Scott Taylor
e87150fc06 Comments List Table: after [34179], scope the <th>s and <td>s as direct descendants of their parent row.
Fixes #33943.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34491 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-25 02:21:26 +00:00
Scott Taylor
44822831fe Comments List Table JS: move the dynamic count functions into closure scope so that setCommentsList AND commentReply can access them. Update counts when replying inline.
Fixes #33403.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34481 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 20:16:49 +00:00
Scott Taylor
4671e03766 Comments List Table: include count for "All". Dynamically update.
Fixes #17275.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34470 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 17:57:25 +00:00
Scott Taylor
5b9af35c4c Comments: update Comment counts dynamically in the Right Now widget based on moderation actions in the Activity widget.
Fixes #10422.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34464 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 15:53:25 +00:00
Scott Taylor
25f206e01f List Tables: add JS code to dynamically toggle the disabled attribute of the Bulk Actions dropdown and Apply button.
Props wonderboymusic, pareshradadiya.
Fixes #31634.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34431 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 01:07:24 +00:00
Scott Taylor
39552b63ca Passwords: fix the markup on the Reset Password Form for user-pass1 so the JavaScript operates properly.
Props ldinclaux.
See #33892.
Fixes #33908.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34335 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-22 03:57:24 +00:00
Scott Taylor
28964445d4 Admin: when toggling select/deselect "all" via JS - :visible needs to be bound to not toggle disabled inputs.
Props tywayne.
Fixes #32309.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34289 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-19 16:41:24 +00:00
Scott Taylor
c43f72fbfb Profile: when clicking "Cancel" after clicking "Generate Password", request and generate a new password to present to the user.
Props adamsilverstein, wonderboymusic.
Fixes #33450.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34276 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-18 20:14:24 +00:00
Scott Taylor
57d2420ae5 Similar to #33386, don't use guid when retrieving URL for a cropped header image in the Customizer.
Props polevaultweb.
Fixes #33319.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34156 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 14:46:32 +00:00
Sergey Biryukov
80165bfc4a Comments: When setting the colspan value for inline edit/reply, make sure it's actually a table and the value is not empty.
Props afercia.
Fixes #33596.
Built from https://develop.svn.wordpress.org/trunk@34179


git-svn-id: http://core.svn.wordpress.org/trunk@34147 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 13:44:34 +00:00
Scott Taylor
ab777c54cc Ensure that widget carets close when dragging an expanded widget.
Props sdavis2702, mindctrl.
Fixes #33578.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34133 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 03:10:24 +00:00
Scott Taylor
387f271ea5 After [34070], account for the new ID in Quick Edit JS.
Props afercia.
Fixes #33770.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34127 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 01:31:26 +00:00
Dominik Schilling
d36ffeb160 Passwords: Trigger a wp-check-valid-field event when the password field is filled with a password by generatePassword().
Updates event handler in `wpAjax.invalidateForm()` to support `wp-check-valid-field`.

See #33406.
Built from https://develop.svn.wordpress.org/trunk@34114


git-svn-id: http://core.svn.wordpress.org/trunk@34082 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 10:39:27 +00:00
Scott Taylor
373d73f781 Turn off autocomplete for the new-post-slug field.
Props johnbillion.
Fixes #32752.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34073 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 02:03:25 +00:00
Helen Hou-Sandí
7f772bdaff Comments: Fix inline edit/reply on small screens.
props ocean90, SergeyBiryukov.
fixes #33596.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34062 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-13 12:47:27 +00:00
Scott Taylor
b453af5718 When clicking "Show More Comments" in the Comments meta box on the Edit Post screen, change the click behavior to call a new class method on commentsBox, ->load(), that resets st (cool name) to the number of visible <tr>s before calling ->get(). This will account for spam'd and trash'd comments when returning comments at the proper offset.
Props utkarshpatel.
Fixes #33829.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34037 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-12 02:28:26 +00:00
Andrea Fercia
5f5ea8c3e2 Quick Edit: fix the Tags auto-suggest tooltip visibility.
Be sure to hide the `jquery.suggest` Tags textarea tooltip also when using the keyboard to Save/Cancel.

Props rommelxcastro for the initial patch.
Fixes #32580.
Built from https://develop.svn.wordpress.org/trunk@34064


git-svn-id: http://core.svn.wordpress.org/trunk@34032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-11 23:34:25 +00:00
Andrew Ozz
e1ccdf760e Settings: properly set the password field label on loading.
See #33778.
Built from https://develop.svn.wordpress.org/trunk@34062


git-svn-id: http://core.svn.wordpress.org/trunk@34030 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-11 23:05:24 +00:00
Andrew Ozz
0406f50cfb Settings: reassign the label when switching password fields so it always highlights the visible field.
Props umesh.nevase.
Fixes #33778 for trunk.
Built from https://develop.svn.wordpress.org/trunk@34061


git-svn-id: http://core.svn.wordpress.org/trunk@34029 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-11 22:52:26 +00:00
Dominik Schilling
efcdeea2f1 Passwords: Refresh password fields when content is pasted into fields.
Use feature detection to determine whether password inputs should use the `keyup` or `input` event.

Props peterwilsoncc, adamsilverstein.
Fixes #33398.
Built from https://develop.svn.wordpress.org/trunk@34060


git-svn-id: http://core.svn.wordpress.org/trunk@34028 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-11 21:52:27 +00:00
Dominik Schilling
d6f26e4c7c Site Icon: For preview fall back to full size URL when thumbnail size doesn't exist.
Prevents a JavaScript error for rare cases when cropping is skipped and the image is smaller than `thumbnail`.

Props tyxla.
Fixes #33417.
Built from https://develop.svn.wordpress.org/trunk@34056


git-svn-id: http://core.svn.wordpress.org/trunk@34024 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-11 20:13:25 +00:00
Scott Taylor
bbbbf11961 After [33821], when dynamically updating the document title text of the Comments List Table page, operate only on the fragment that contains the comment count. This prevents us from including other numbers that may be present in the other title parts (site title, etc).
See #33414.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33951 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 01:03:25 +00:00
Weston Ruter
7c6534fd4c Customize: Fix logic for determining the container element when focusing on a panel, section, or control.
Fixes #33695 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33908 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-07 05:59:24 +00:00
Weston Ruter
274373afc6 Customize: Fix clearing of a color control's setting by using proper empty value.
Props stevehenty.
Fixes #30280.


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


git-svn-id: http://core.svn.wordpress.org/trunk@33907 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-07 05:48:23 +00:00
Scott Taylor
44dace3487 Add Customizer docs.
Props ericlewis.
See #33503.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33880 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-05 19:53:24 +00:00
Sergey Biryukov
f0ce1f06ea Provide more helpful feedback than just "Cheatin' uh?" for permission errors in wp-admin/js/customize-controls.js.
fixes #33685. see #14530.
Built from https://develop.svn.wordpress.org/trunk@33902


git-svn-id: http://core.svn.wordpress.org/trunk@33871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-04 03:40:25 +00:00
Weston Ruter
1413f2edd5 Customizer: Collapse any expanded panel/sections before expanding other panel/sections
Fix removes need for workaround introduced in [33488] for direct link from nav menu widget to the customizer widgets panel. The todo is now implemented.

Props celloexpressions, westonruter.
Fixes #33396 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33805 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-31 23:08:42 +00:00
Andrew Ozz
e3f3f470ea Editor, Press This: force a page reload when the user publishes a post and then clicks the back button.
Fixes #23691.
Built from https://develop.svn.wordpress.org/trunk@33836


git-svn-id: http://core.svn.wordpress.org/trunk@33804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-31 23:08:22 +00:00
Scott Taylor
7808d5d1fa Comments: dynamically update the document title text of the Comments List Table page when dynamically updating the number of comments awaiting moderation.
Fixes #33414. 

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


git-svn-id: http://core.svn.wordpress.org/trunk@33789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-31 17:58:22 +00:00
Sergey Biryukov
5a97ff5206 Bump H3 headings to H2 on Themes screen for better accessibility.
props joehills.
fixes #33560.
Built from https://develop.svn.wordpress.org/trunk@33820


git-svn-id: http://core.svn.wordpress.org/trunk@33788 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-31 03:51:21 +00:00
Sergey Biryukov
be59078ef8 Prevent unintended password change after clicking "Generate Password" and then "Cancel" when editing a user profile.
props peterwilsoncc.
fixes #33419 for trunk.
Built from https://develop.svn.wordpress.org/trunk@33766


git-svn-id: http://core.svn.wordpress.org/trunk@33734 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-27 00:11:21 +00:00
Sergey Biryukov
fc9961ca22 Make post meta box toggles accessible.
props joedolson.
fixes #33544.
Built from https://develop.svn.wordpress.org/trunk@33762


git-svn-id: http://core.svn.wordpress.org/trunk@33730 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-26 15:23:24 +00:00
Weston Ruter
10503cd3af Customizer: Ensure persistence of unchanged active state for controls, sections, and panels.
Props nikeo, westonruter.
Fixes #33428 for trunk.
See also #33494.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33722 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-26 07:26:21 +00:00
Weston Ruter
a2d9547825 Customizer: Prevent JS error during init when nav_menus panel is removed by plugin.
Fixes #33411 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33721 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-26 06:43:22 +00:00
Scott Taylor
fa2d0a2d55 Comment List Tables:
* Toggle visibility of pending bubble when a comment is dynamically moderated
* Add a CSS class to the pending bubble to hide it / remove to show it

See #11200.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-21 17:26:26 +00:00
Scott Taylor
d65112d382 After [33662], remove unused var.
See #11200.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33630 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-20 17:19:25 +00:00
Scott Taylor
20f6db2b18 Comment List Tables:
* Ensure that dynamic bubble counts are in sync by `comment_post_ID`
* Scope `:animated` to `#the-comment-list`

See #11200.


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


git-svn-id: http://core.svn.wordpress.org/trunk@33629 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-20 16:36:25 +00:00
Scott Taylor
0e4606c13e JSHint after [33655].
Built from https://develop.svn.wordpress.org/trunk@33660


git-svn-id: http://core.svn.wordpress.org/trunk@33627 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-20 06:31:25 +00:00
Scott Taylor
2e2223ae74 Comments List Table:
* In a view that initially has comments, but they get removed due to user actions: show the `No Items` row instead of bombing out and showing nothing (which looks broken)
* To accomplish this, in `WP_Comments_List_Table::display()`: call `->display_rows_or_placeholder()` instead of `->display()`
* Listen for the end of row `.fadeOut()`s if necessary using jQuery Promises

Fixes #11200.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-20 05:54:25 +00:00
Scott Taylor
657d0f6918 Comments List Table:
* Properly increment/decrement approved/pending bubbles in `response` column

See #11200.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33623 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-20 04:02:24 +00:00
Scott Taylor
df618f3461 Comments List Table:
* Show count next to "Approved"
* Properly increment/decrement counts when row actions are clicked
* In `_wp_ajax_delete_comment_response()`, return the comment's `status` with the `supplemental` data
* Handle counts properly on each scenario of `undo`

See #11200.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33622 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-20 02:51:25 +00:00
Konstantin Obenland
2849e2c5e9 Themes: Open preview when requesting a single theme in the installer.
Props kraftner, obenland.
Fixes #28735.


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


git-svn-id: http://core.svn.wordpress.org/trunk@33617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-19 18:54:27 +00:00
Scott Taylor
227d38c9cd Correct typo in JSDoc for wp.updates.decrementCount
Props mt8.biz.
Fixes #33363.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-18 21:47:25 +00:00
Konstantin Obenland
69146f6b10 Passwords: Use keyup event to prevent IE8's misinterpretation of propertychange.
Props adamsilverstein, peterwilsoncc.
Fixes #33385.


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


git-svn-id: http://core.svn.wordpress.org/trunk@33592 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-17 18:46:25 +00:00
Andrew Ozz
2de7757124 Fix creating of extra <br /> tags in both PHP and JS variants of wpautop(). Add PHP tests to catch similar problems in the future.
Props valendesigns, azaozz. Fixes #33377.
Built from https://develop.svn.wordpress.org/trunk@33624


git-svn-id: http://core.svn.wordpress.org/trunk@33591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-17 17:36:24 +00:00
Helen Hou-Sandí
1880411a0b Menu customizer: Ensure the search results section is full height.
fixes #33375.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33585 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-14 21:32:25 +00:00
Weston Ruter
9ee7f050e9 Customize: Fix keyboard accessibility for toggling screen options and contextual help.
Also fix layout of search results in mobile.

Props valendesigns, afercia, adamsilverstein.
Fixes #33184.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-14 21:23:27 +00:00
Weston Ruter
7fcc3e50e1 Customize: Fix layout issues in panels and sections when resizing and autofocusing.
Also reverts [33157] which is no longer needed.

Props valendesigns, mattwiebe, westonruter, ocean90.
Fixes #33220.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33577 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-11 23:56:25 +00:00
Helen Hou-Sandí
7e2cec4edb Customizer: Rename WP_New_Menu_Customize_Control to WP_Customize_New_Menu_Control for consistency.
props DrewAPicture.
fixes #33324.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-10 18:06:25 +00:00
Dominik Schilling
45b8634605 Customizer: Remove obsolete .control-panel-back and .customize-overlay-close buttons.
props afercia, ocean90.
see #31336.
fixes #33229.
Built from https://develop.svn.wordpress.org/trunk@33599


git-svn-id: http://core.svn.wordpress.org/trunk@33566 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-09 19:00:24 +00:00
Dominik Schilling
04c21a0e3c Customizer: Restore Shift + Clicking on widgets to open the widgets panel.
Includes an alternative for jQuery UI's `:focusable` selector because it has an ancestor visibility requirement, see https://github.com/jquery/jquery-ui/pull/1583.

props westonruter.
fixes #33258.
Built from https://develop.svn.wordpress.org/trunk@33596


git-svn-id: http://core.svn.wordpress.org/trunk@33563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-08 09:37:26 +00:00
Dominik Schilling
12b0257a60 Nav menus: Adjust redundant titles in accessibility helpers.
Built from https://develop.svn.wordpress.org/trunk@33540


git-svn-id: http://core.svn.wordpress.org/trunk@33507 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-04 04:53:44 +00:00
Helen Hou-Sandí
e7b4ca0630 Remove debug cruft from [33511].
see #32710.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-29 23:53:49 +00:00
Helen Hou-Sandí
ea8f8acc79 Menu customizer: More clearly separate search results from available items.
Available items now fade from view while you're searching, and there is an explicit way to clear search results. No results gives a better message, though still brief this time around.

props valendesigns, designsimply, DH-Shredder, helen.
fixes #32710.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-29 23:40:25 +00:00
Dominik Schilling
a5aa0dc9fd Nav menus: Make the selector for the edit menu item link more specific. Prevents clashing with other elements which have the same class.
fixes #33129.
Built from https://develop.svn.wordpress.org/trunk@33502


git-svn-id: http://core.svn.wordpress.org/trunk@33469 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-29 21:30:25 +00:00
Weston Ruter
a4bc3daa9e Customizer: Update nav_menu_locations[...] controls to remove placeholder menus from the dropdown options upon Save & Publish.
See #32814.
Fixes #33176.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33463 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-29 19:34:25 +00:00
Mark Jaquith
61dd2bfdde Persist (and mask) the password on the install screen if the install does not proceed due to errors.
If you forget or enter an invalid username/e-mail, the password choosing shouldn't start over.

fixes #33162
Built from https://develop.svn.wordpress.org/trunk@33495


git-svn-id: http://core.svn.wordpress.org/trunk@33462 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-29 19:22:26 +00:00
Dominik Schilling
8679a93f16 Themes: Remove legacy theme preview.
The pre-3.4 theme previewer doesn't work when using a static front page.
We kept the old theme preview for no-JS and some browsers that were less capable. But since browsers are doing a better job today we don't need to continue fixing/shipping this legacy code. Bye!

fixes #33178.
Built from https://develop.svn.wordpress.org/trunk@33492


git-svn-id: http://core.svn.wordpress.org/trunk@33459 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-29 18:36:26 +00:00
Weston Ruter
bf9d1485ee Customizer: Ensure that all existing menus are shown in the Custom Menu widget's dropdown.
* Ensure that a Custom Menu widget selecting a newly-inserted menu gets updated to use the new menu ID upon Save & Publish.
* Dynamically update the visibility of the Custom Menu widget's "no menus" message when the number of menus changes between 0 and 1+.
* Send all dirty Customized settings in `update-widget` Ajax request and `preview()` them so that the widget update/form callbacks have access to any data dependencies in the current Customizer session (such as newly created unsaved menus).
* Update link in Custom Menu widget to point to Menus panel as opposed to Menus admin page, when in the Customizer.
* Fix an issue with extra space at top immediately after creating new menu.
* Fix doubled `update-widget` Ajax requests when changing select dropdown; prevent initial from being aborted.
* Add missing `wp_get_nav_menus()` hooks to preview Customizer updates/inserts for `nav_menu` settings; includes tests.
* Update `wp_get_nav_menu_object()` to allow a menu object to be passed in (and thus passed through).

Props westonruter, adamsilverstein.
Fixes #32814.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33455 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-29 16:03:24 +00:00
Dominik Schilling
a5ed94ab62 Customizer: Add an aria-expanded attribute to Edit menu item toggles.
props afercia.
fixes #33129.
Built from https://develop.svn.wordpress.org/trunk@33483


git-svn-id: http://core.svn.wordpress.org/trunk@33450 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-29 09:50:24 +00:00
Mark Jaquith
bca4465edf Do not re-generate the password after pressing "cancel". Persist the state.
Also removes pass2 code not needed since we're generating from one field.

fixes #33164
Built from https://develop.svn.wordpress.org/trunk@33475


git-svn-id: http://core.svn.wordpress.org/trunk@33442 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-29 04:30:24 +00:00
Mark Jaquith
0217951e44 Re-work user-profile.js so the password meter works in IE8 and password managers can fill multiple times.
props adamsilverstein
fixes #32886
Built from https://develop.svn.wordpress.org/trunk@33473


git-svn-id: http://core.svn.wordpress.org/trunk@33440 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-29 03:27:25 +00:00
Andrew Ozz
fa25fe82ef Fix updating of nonces on the Edit Post screen after the log in expires and the user logs in again.
Props iseulde, azaozz. Fixes #33098.
Built from https://develop.svn.wordpress.org/trunk@33468


git-svn-id: http://core.svn.wordpress.org/trunk@33435 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-28 22:07:25 +00:00
Mark Jaquith
959f36699b Lose the clunky setTimeout() code and just track the password value changes.
see #32886
Built from https://develop.svn.wordpress.org/trunk@33465


git-svn-id: http://core.svn.wordpress.org/trunk@33432 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-28 21:11:26 +00:00
Sergey Biryukov
96e340b33a Plugins list table: Make selector for Details links more specific to prevent the Description header from being announced as "clickable".
props afercia.
fixes #32968.
Built from https://develop.svn.wordpress.org/trunk@33462


git-svn-id: http://core.svn.wordpress.org/trunk@33429 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-28 14:50:25 +00:00
Weston Ruter
a48604e32c Customizer: Hide empty space in footer on small screens since it is only populated on larger screens.
Props obenland.
Fixes #33138.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33421 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-28 03:43:24 +00:00
Scott Taylor
d92795db13 Passwords UI: clean up the new JS in wp-admin/js/user-profile.js.
Instead of wrapping `#pass1` in a `<span>` dynamically, add the `<span>` to the HTML in PHP. It currently has no styling.

Fixes #33145.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33417 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-27 21:25:25 +00:00
Konstantin Obenland
94aefe52dc Customizer: Use correct spelling when instantiating CustomizeImageCropper.
Introduced in [33329].

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


git-svn-id: http://core.svn.wordpress.org/trunk@33412 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-27 15:55:24 +00:00
Ella Iseulde Van Dorpe
491c863f35 Editor: word count: better names for types.
Also fix it in wp_trim_words().

Fixes #30966.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33407 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-27 11:19:26 +00:00
Mark Jaquith
5abcb6938c Toggle between dashicons-hidden and dashicons-visibility in the password hide/show button.
fixes #33135
Built from https://develop.svn.wordpress.org/trunk@33438


git-svn-id: http://core.svn.wordpress.org/trunk@33405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-27 03:13:24 +00:00
Sergey Biryukov
93baee020c Comment status box: Move focus back to Edit link when changing the date.
props afercia.
fixes #33062.
Built from https://develop.svn.wordpress.org/trunk@33422


git-svn-id: http://core.svn.wordpress.org/trunk@33390 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-26 02:26:24 +00:00
Dominik Schilling
de86d6b18d Customizer: Add missing text or labels to some nav menu UI controls.
props afercia, celloexpressions, westonruter.
fixes #32715.
Built from https://develop.svn.wordpress.org/trunk@33413


git-svn-id: http://core.svn.wordpress.org/trunk@33381 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-24 20:28:25 +00:00
Dominik Schilling
edf256fa96 Customizer: Hide inactive reorder buttons for menu items from assistive technologies.
props afercia.
fixes #33114.
Built from https://develop.svn.wordpress.org/trunk@33412


git-svn-id: http://core.svn.wordpress.org/trunk@33380 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-24 17:57:24 +00:00
Weston Ruter
3a97d2a7de Customizer: Update JS variable to reference renamed data attribute for available nav menu object.
Fixes regression for a change that was missed in [33366].

Props valendesigns.
Fixes #32708.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-23 06:02:24 +00:00
Mark Jaquith
9682eb0108 Do not propagate empty passwords from the hidden form field.
fixes #32886
Built from https://develop.svn.wordpress.org/trunk@33384


git-svn-id: http://core.svn.wordpress.org/trunk@33353 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-23 05:00:25 +00:00
Weston Ruter
d5ce83c94c Customizer: Introduce customize_nav_menu_available_item_types and customize_nav_menu_available_items filters.
Allows for new available menu item types/objects to be registered in addition to filtering the available items that are returned for each menu item type/object.

Props valendesigns, imath, westonruter.
See #32832.
Fixes #32708.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33338 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-22 20:29:25 +00:00
Mark Jaquith
31ca0cd939 Soothe JSHint's rankled spirits
Built from https://develop.svn.wordpress.org/trunk@33365


git-svn-id: http://core.svn.wordpress.org/trunk@33337 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-22 18:56:26 +00:00
Mark Jaquith
1ef40251b9 Introduce a Cancel button and onUnload warning for password changes.
fixes #33079
props johnjamesjacoby
Built from https://develop.svn.wordpress.org/trunk@33364


git-svn-id: http://core.svn.wordpress.org/trunk@33336 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-22 18:36:24 +00:00
Mark Jaquith
ae03a8a0a2 Make password field toggling work in IE8, and clean up a bunch of password CSS issues.
fixes #32886
props peterwilsoncc, adamsilverstein
Built from https://develop.svn.wordpress.org/trunk@33362


git-svn-id: http://core.svn.wordpress.org/trunk@33334 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-22 16:56:27 +00:00
Konstantin Obenland
0f61e187b6 Site Icon: Create custom sizes for images that don't need cropping.
This will duplicate an image that doesn't need cropping once and will skip
creating new images and custom sizes if the selected image has the `site-icon`
context.

Fixes #33011.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33328 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-22 02:30:25 +00:00
Andrew Ozz
e5340ea63f Widgets screen: while dragging a widget over a closed sidebar refresh only the widgets in the current sidebar instead of all widgets in all sidebars.
Props chriscct7. Fixes #33015.
Built from https://develop.svn.wordpress.org/trunk@33354


git-svn-id: http://core.svn.wordpress.org/trunk@33326 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-22 01:25:26 +00:00
Konstantin Obenland
45bfab3aa8 Passwords: Add password strength meter feedback for screen readers.
Also gives context to the show/hide button.

Props rianrietveld, afercia.
Fixes #33032.


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


git-svn-id: http://core.svn.wordpress.org/trunk@33325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-22 00:15:25 +00:00
Ella Iseulde Van Dorpe
482f174f2e Publish box: move focus when the animation is done
Also move the focus back to 'edit' when saving changes.

Props afercia.
Fixes #33060.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33324 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-21 22:46:24 +00:00
Ella Iseulde Van Dorpe
253d9db831 Publish box: focus first date field on edit
The order of the fields may change depending on the translation.

Props afercia.
Fixes #33059.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33321 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-21 22:23:24 +00:00
Ella Iseulde Van Dorpe
d827a71c7f Publish box: apply changes post.js to comment.js
See [22250], [27035], [24046], [33340] and [33341].
Fixes #33063.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-21 22:09:25 +00:00
Konstantin Obenland
146befe7bf Customizer: Add label for menu names when editing a menu.
Props celloexpressions.
Fixes #32726.


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


git-svn-id: http://core.svn.wordpress.org/trunk@33318 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-21 17:02:24 +00:00
Ella Iseulde Van Dorpe
50159974c9 Editor: word count: exclude HTML comments and entities
Also make sure `type` is one of the three allowed types and remove unnecessary regex flags.

See #30966.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33316 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-21 15:24:24 +00:00
Ella Iseulde Van Dorpe
52f6aebdaa Publish box: fix leading zeros in date format
See #30716.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33313 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-21 14:55:24 +00:00
Ella Iseulde Van Dorpe
262c1a7e54 Publish box: fix strange date format after change
Part props tyxla.
Fixes #30716.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33312 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-21 11:40:25 +00:00
Dominik Schilling
4dcfd3ec83 Customizer: Avoid duplicate IDs and remove role presentation from menu items reorder button. Follow-up to [33074].
props afercia.
fixes #32725.
Built from https://develop.svn.wordpress.org/trunk@33339


git-svn-id: http://core.svn.wordpress.org/trunk@33311 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-21 11:37:26 +00:00
Ella Iseulde Van Dorpe
1d92ed1c79 JSHint: don't redeclare globals listed in .jshintrc
See #33021.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33309 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-20 23:39:24 +00:00
Konstantin Obenland
0ccb9c47cb Site Icon: Center initial crop position.
Starting out at the center of the image makes for a better user experience.

Props iseulde.
Fixes #33050.


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


git-svn-id: http://core.svn.wordpress.org/trunk@33305 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-20 19:02:24 +00:00
Konstantin Obenland
3248497cf3 Site Icon: Add crop preview to the media modal.
* Monkey patches imgAreaSelect library to support touch events.
* Removes Settings version of Site Icon since it would have been the same flow.
* Removes default value for Customizer setting - there is no default favicon.

Fixes #16434.



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


git-svn-id: http://core.svn.wordpress.org/trunk@33301 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-20 15:57:25 +00:00
Andrew Nacin
2166b4a6c1 JSHint: Use 'global' rather than 'globals' for inline configuration.
Don't declare a global already listed in .jshintrc.

props johnjamesjacoby.
fixes #33021.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33296 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-19 17:09:26 +00:00
Weston Ruter
910092531b Customizer: Indicate when there are no nav menu items available for a given type.
Props celloexpressions, valendesigns, rittesh.patel.
Fixes #32810.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33295 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-19 00:06:24 +00:00
Ella Iseulde Van Dorpe
e9b6d25bcd Editor: word count: count astrals as one character
This makes sure an emoji, for example, is counted as one character.

See #30966.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33292 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-18 11:42:25 +00:00
Ella Iseulde Van Dorpe
f00d1e63f1 Editor: word count: exclude shortcodes
Props desaiuditd, adamsilverstein, azaozz and iseulde.
Fixes #27386. See #30966.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33271 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-16 21:09:26 +00:00
Ella Iseulde Van Dorpe
e098c0e9ee Editor: word count: exclude more characters
Also only exclude these characters for the `words` type. They should be counted for other types.
Add the ASCIIOnly option to the uglify config to preserve escaped unicode characters.

See #30966. Fixes #27391.


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


git-svn-id: http://core.svn.wordpress.org/trunk@33264 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-16 09:45:26 +00:00
Ella Iseulde Van Dorpe
bbccb9ca6b Editor: word count: add all type
This type will count all characters including spaces.

See #30966.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33262 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-15 23:48:24 +00:00
Weston Ruter
0f37c66077 Customizer: Defer updating nav menu item tabIndex attributes until pane is reflowed.
Introduces `pane-contents-reflowed` Customizer event.

Props valendesigns, westonruter.
Fixes #32943.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33255 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-15 20:05:25 +00:00
Weston Ruter
4cb73cf347 Customizer: Fix element focus after menu item is deleted for keyboard accessibility.
Also restores box shadow on focus.

Props valendesigns.
Fixes #32740.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33251 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-15 18:44:25 +00:00
Konstantin Obenland
e4305c7b28 Passwords: Make show/hide toggle translatable.
See #32589.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33221 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-13 22:35:24 +00:00
Weston Ruter
ae50d09585 Customizer: Disambiguate a menu's auto-add pages option from preceding menu location checkboxes.
Creates a separate `nav_menu_auto_add` control type following the pattern of the `nav_menu_name` control type.

Props valendesigns.
Fixes #32820.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33161 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-13 08:40:26 +00:00
Dominik Schilling
153511f78f Password UI: The non-breaking space doesn't need to be translatable. Add some context to password strength strings.
see #32589.
Built from https://develop.svn.wordpress.org/trunk@33166


git-svn-id: http://core.svn.wordpress.org/trunk@33138 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-11 20:48:24 +00:00
Konstantin Obenland
f29e5044cd Site Icon: Add Customizer UI.
Second part of the Site Icon feature after [32994] introduced it for Settings.

Props celloexpressions.
See #16434.


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


git-svn-id: http://core.svn.wordpress.org/trunk@33126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-10 21:33:24 +00:00
Dominik Schilling
75d6c10b01 Customizer: Use a <button> for the collapse sidebar … button.
props afercia.
fixes #32819.
Built from https://develop.svn.wordpress.org/trunk@33153


git-svn-id: http://core.svn.wordpress.org/trunk@33125 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-10 21:22:26 +00:00
Helen Hou-Sandí
0b046085ae Show row actions on focus for the dashboard comment list.
see #25408.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33077 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-07 15:26:24 +00:00
Weston Ruter
a62cc940ea Customizer: Register controls and settings for nav_menu_locations even when there are no menus yet.
This change ensures that the first menu created can be assigned to a location without first saving and reloading the Customizer.

Props markoheijnen.
Fixes #32858.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33065 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-06 19:13:25 +00:00
Andrew Ozz
b2e725eb27 Fix opening closed widget areas when dragging a widget over them.
Props polevaultweb. Fixes #13524.
Built from https://develop.svn.wordpress.org/trunk@33088


git-svn-id: http://core.svn.wordpress.org/trunk@33059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-05 18:20:24 +00:00
Dominik Schilling
340f1e121e Customizer: Fix tabindex of reorder buttons for menu items with depth 1 and 10.
props celloexpressions.
fixes #32767.
Built from https://develop.svn.wordpress.org/trunk@33077


git-svn-id: http://core.svn.wordpress.org/trunk@33048 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-03 22:21:24 +00:00
Konstantin Obenland
cf22cd7d72 Site Icon: Remove date dropdown from media modal.
This also allows us to leverage the builtin `suggestedWidth` and
`suggestedHeight` parameters to convey the expected image size.

Props ocean90.
Fixes #32860.


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


git-svn-id: http://core.svn.wordpress.org/trunk@33046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-03 21:28:24 +00:00
Dominik Schilling
200463d781 Customizer: Improve descriptive text and focus for menu items reorder button.
props afercia.
fixes #32725.
Built from https://develop.svn.wordpress.org/trunk@33074


git-svn-id: http://core.svn.wordpress.org/trunk@33045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-03 21:24:25 +00:00
Weston Ruter
912b434198 Customizer: Fix saving menus with empty names or names that are already used.
Adds validation for initially-supplied nav menu name, blocking empty names from being supplied. If later an empty name is supplied and the nav menu is saved, the name "(unnamed)" will be supplied instead and supplied back to the client. If a name is supplied for the menu which is currently used by another menu, then the name conflict is resolved by adding a numerical counter similar to how `post_name` conflicts are resolved. Includes unit tests.

Fixes #32760.


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


git-svn-id: http://core.svn.wordpress.org/trunk@33042 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-03 20:47:25 +00:00
Dominik Schilling
93a334b361 Customizer: Remove some non-functional code.
props afercia.
fixes #32839.
Built from https://develop.svn.wordpress.org/trunk@33070


git-svn-id: http://core.svn.wordpress.org/trunk@33041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-03 20:37:25 +00:00
Dominik Schilling
2ce8d2eea2 Customizer: Accessibility enhancements.
* Move tabindex/focus code into `onChangeExpanded` so that it works for cases where `expand()` is called directly.
* Use `visibility: hidden` to hide hidden elements from keyboard focus and screen readers.

props celloexpressions.
fixes #31336.
Built from https://develop.svn.wordpress.org/trunk@33069


git-svn-id: http://core.svn.wordpress.org/trunk@33040 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-03 20:19:25 +00:00
Konstantin Obenland
2f383536fc Check if commentReply exists before trying to work with it.
Fixes a bug that caused the save/publish flow to be interrupted by an AYS.

Introduced in [33024].
See #29457.


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


git-svn-id: http://core.svn.wordpress.org/trunk@33037 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-03 15:32:25 +00:00
Ella Iseulde Van Dorpe
12fba44414 Editor: refresh word count quicker
2 seconds is a bit slow. Debouncing with 1 second means it can only run maximum once per second. In reality it won't run us much. Even people who type slow will usually type faster than 1 character per second.

See #30966.


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


git-svn-id: http://core.svn.wordpress.org/trunk@33031 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-03 09:15:24 +00:00
Helen Hou-Sandí
f85306c65a Toolbar: Allow submenus to be closed with a second tap on touch devices.
Also closes submenus when the admin menu is toggled open, as it opens below and thus can be obscured.

props stephdau, seanchayes.
see #29906.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33027 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-03 03:29:25 +00:00
Konstantin Obenland
cd7a40bdc7 Site Icon: Improve responsiveness for small screen devices.
Using Jcrop's `trueSize` argument also allows us to get rid of all that behind
the scenes temp image creating and back and forth calculating of image sizes.

Props tyxla for initial patch.
See #16434.


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


git-svn-id: http://core.svn.wordpress.org/trunk@33024 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-02 21:16:24 +00:00
Konstantin Obenland
bcf488fc23 Site Icon: Show correct background preview for transparent images.
iOS will show transparent parts as black, where as the icon itself stays
transparent when used as a favicon.

See #16434.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33020 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-02 17:16:26 +00:00
Mark Jaquith
504101460f Slow down on calling zxcvbn if it isn't loaded.
see #32589
Built from https://develop.svn.wordpress.org/trunk@33033


git-svn-id: http://core.svn.wordpress.org/trunk@33004 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-01 18:13:24 +00:00
Mark Jaquith
cb93e24c62 Add a missing "var". see #32589
Built from https://develop.svn.wordpress.org/trunk@33031


git-svn-id: http://core.svn.wordpress.org/trunk@33002 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-01 17:16:25 +00:00
Dominik Schilling
78167b8a4c Customizer: Make reordering menu items via drag and drop easier.
Introduce `wpNavMenu.options.targetTolerance` to define a tolerance when dragging items where no margins between the sortable items exists.

props adamsilverstein.
fixes #32821.
Built from https://develop.svn.wordpress.org/trunk@33030


git-svn-id: http://core.svn.wordpress.org/trunk@33001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-01 16:44:24 +00:00
Konstantin Obenland
d03ff4b3d9 Close comment quick edit before updating a post.
Fixes a bug where the user gets redirected to the All Posts screen, after
updating a post while quick editing a comment.

Props polevaultweb.
Fixes #29457.


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


git-svn-id: http://core.svn.wordpress.org/trunk@32995 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-01 14:54:24 +00:00
Mark Jaquith
423a1a7ca4 New password change/set UI.
* Generate the password for the user
* More tightly integrate password strength meter
* Warn on weak passwords

see #32589

props MikeHansenMe, adamsilverstein, binarykitten
Built from https://develop.svn.wordpress.org/trunk@33023


git-svn-id: http://core.svn.wordpress.org/trunk@32994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-01 14:48:24 +00:00
Helen Hou-Sandí
8eb7f71e6b List tables: A better responsive view.
Instead of truncating columns, the data that's already in the markup can now be toggled into view. Only seems appropriate to celebrate four years of contributing by finally doing the first thing I ever mocked up.

Known issues / concerns:
* Custom list tables that don't define a primary column will show nothing at all. These are not extremely common, as `WP_List_Table` isn't really recommended for plugin consumption, but it happens. We need to come up with some kind of fallback.
* Some visual elements, particularly whitespace, could use refining.
* Needs a11y review.
* Touch performance on iOS feels sluggish - is there anything we can do about that?
* Would this be better accordion-style (only one expanded at a time)?
* Is `wp_strip_all_tags()` good enough for column titles that have HTML in them? It's essentially a workaround for the fact that core's comments column does that for the icon, which maybe it shouldn't. Perhaps worth another ticket, as a markup change would be fairly independent.
* Visual hierarchy is not great when expanded (also worthy of another ticket).
* Quick edit now becomes noticeably more annoying to cancel out of, as you have to scroll all the way down and you lose your position from before it was opened. Again, worthy of another ticket.

props Michael Arestad, helen.
see #32395.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32987 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-01 01:31:25 +00:00
Helen Hou-Sandí
8f85bb1ac5 Bulk/quick edit: Set the correct colspan.
`thead` can contain `td`s now, too.

props afercia.
fixes #31654.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32986 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-01 01:06:25 +00:00
Konstantin Obenland
e460d37da0 Open closed widget areas when dragging onto them.
Allows dropping Widgets into the correct spot of a given sidebar, no matter
whether that sidebar is open or closed. Removes a step from the setup process
for closed sidebars.

Props polevaultweb.
Fixes #13524.


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


git-svn-id: http://core.svn.wordpress.org/trunk@32985 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-01 00:58:24 +00:00
Andrew Ozz
b092defb17 Press This:
- Add support for the Text editor.
- Add auto-scrolling when the caret moves out of the viewport while the user is typing (similarly to editor-expand).
- Add auto-resize for the textarea.
See #32706.
Built from https://develop.svn.wordpress.org/trunk@32999


git-svn-id: http://core.svn.wordpress.org/trunk@32970 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-30 03:58:27 +00:00
Konstantin Obenland
c56a8ae0f7 Introducing Site Icon, favicon management for WordPress.
This v1 marries Jetpack's Site Icon module with the Media Modal, reusing code
from the Custom Header admin. For now, the core-provided icons will be limited
to a favicon, an iOS app icon, and a Windows tile icon, leaving `.ico` support
and additional icons to plugins to add.

Props obenland, tyxla, flixos90, jancbeck, markjaquith, scruffian.
See #16434.


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


git-svn-id: http://core.svn.wordpress.org/trunk@32965 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-29 12:58:25 +00:00
Aaron Jorbin
c9307fc95a Update Grunt dev-dependencies
grunt-browserify : minor version update
grunt-contrib-cssmin : minor version update
grunt-contrib-imagemin : patch version update
grunt-contrib-jshint : patch version update
grunt-contrib-uglify : minor version update (causes some changes to minified JS)
grunt-includes : minor version update
grunt-sass : major version update ( underlying libsass update ).

Props wonderboymusic
See #31700


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


git-svn-id: http://core.svn.wordpress.org/trunk@32959 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-28 14:51:30 +00:00
Aaron Jorbin
4bbf254375 Add missing semicolon
Introduced in [32983].

see #32757.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32957 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-28 11:41:24 +00:00
Andrew Ozz
275fc220ef Press This:
- Save a draft before opening the standard editor window.
- While saving a post show Saving... instead of Publish for the main visible part of the split button (same as the Save Draft button before).
See #32757.
Built from https://develop.svn.wordpress.org/trunk@32983


git-svn-id: http://core.svn.wordpress.org/trunk@32954 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-28 04:59:24 +00:00
Weston Ruter
e162bb8940 Customizer: Improve previewing setting changes for show_on_front, page_on_front, and page_for_posts.
When changing the `page_on_front` setting (with `show_on_front`), change the previewed URL to be the home URL so that the effect can be seen. When changing `page_for_posts`, change the previewed URL to be the selected page.

Props valendesigns, westonruter.
Fixes #30677.


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


git-svn-id: http://core.svn.wordpress.org/trunk@32947 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-27 19:59:25 +00:00
Konstantin Obenland
7dc1d06e64 Proper heading for admin screens.
First step towards restoring a good heading structure in wp-admin.
The previous `<h1>` contained the site title and a link to the front page and was removed with the toolbar refactoring in 3.2.

Props joedolson, afercia.
Fixes #31650.


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


git-svn-id: http://core.svn.wordpress.org/trunk@32945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-27 15:41:25 +00:00
Dominik Schilling
2ecb586214 Customizer: Add an aria-expanded attribute to the Add Menu button to improve accessibility.
props afercia.
fixes #32791.
Built from https://develop.svn.wordpress.org/trunk@32971


git-svn-id: http://core.svn.wordpress.org/trunk@32942 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-27 10:05:24 +00:00
Andrew Ozz
7715a50c0b Press This: fix iOS bug that prevents closing of the split button when tapping outside of it.
See #32757.
Built from https://develop.svn.wordpress.org/trunk@32966


git-svn-id: http://core.svn.wordpress.org/trunk@32937 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-27 02:15:24 +00:00
Dominik Schilling
a6b7a691be Customizer: Prevent dragging menu items above the main heading.
Improve targeting for the `sortableItems`, resolving an issue where the first `<li>` in the control became a sortable target, allowing the user to drag a single top level menu outside the intended sortable area.

props adamsilverstein.
fixes #32738.
#wceu
Built from https://develop.svn.wordpress.org/trunk@32955


git-svn-id: http://core.svn.wordpress.org/trunk@32926 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-26 17:11:24 +00:00
Andrew Ozz
f4109b0c5d Press This: convert the Preview | Save | Publish buttons to a split button.
See #32757.
Built from https://develop.svn.wordpress.org/trunk@32920


git-svn-id: http://core.svn.wordpress.org/trunk@32891 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-24 02:46:27 +00:00
Andrew Ozz
e4758f42e5 Update the TinyMCE initialization:
- Replace `wp_htmledit_pre()` and `wp_richedit_pre()` with `format_for_editor()`.
- Replace the `'htmledit_pre'` and `'richedit_pre'` filters with `'format_for_editor'`.
- Do not run the post content through `wpautop()` in PHP when the visual editor is default. Run the textarea content through the JS wpautop on initializing TinyMCE.
- Simplify both editors initialization.
- Improve setting of `wpActiveEditor` in Quicktags.
- Improve editor.js, use `tinymce.$` when possible.
See #32425.
Built from https://develop.svn.wordpress.org/trunk@32899


git-svn-id: http://core.svn.wordpress.org/trunk@32870 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-21 22:01:28 +00:00
Dominik Schilling
baeadbb6fb Customizer: Accessibility improvements for menu item searches.
* Add a description and an `aria-describedby` attribute to inform users this is a "live" search.
* Announce the number of search results via `wp.a11y.speak`.
* Use `aria-busy` attribute to stop screen readers announcing content while the "loading more results" is running.
* Increase the search debounce wait interval to 500ms to be consistent with other live searches.
* If a search fails don't call `wp.a11y.speak` with an undefined variable.

props afercia.
see #32720.
Built from https://develop.svn.wordpress.org/trunk@32891


git-svn-id: http://core.svn.wordpress.org/trunk@32862 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-20 19:22:25 +00:00
Dominik Schilling
4a13015c98 Customizer: Don't add a menu item twice when using the keyboard.
Buttons don't need keyboard events, they natively support keyboard interaction and they just need a click event.

fixes #32665.
Built from https://develop.svn.wordpress.org/trunk@32890


git-svn-id: http://core.svn.wordpress.org/trunk@32861 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-20 19:01:25 +00:00
Scott Taylor
86beb35f6d Use <button> instead of <a> for non-link links in Quick Edit.
Props afercia.
Fixes #32213.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-19 21:42:27 +00:00
Konstantin Obenland
4e7c057a5a Check that current changes can be lost before editing another comment.
When replying to or editing a comment, double-clicking another comment will
open it in quick edit and changes to the current comment are lost.

Props pareshradadiya, chriscct7.
Fixes #21845.


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


git-svn-id: http://core.svn.wordpress.org/trunk@32828 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-19 13:48:25 +00:00
Ella Iseulde Van Dorpe
fd95002b2a Editor: restructure word count
* The WordCounter should only do one thing: count words. This makes it also easier to test.
* Add some really basic unit tests.
* Instead of only refreshing the count on enter and delete, refresh the count when the user stops typing. Also look at paste and content changes in TinyMCE.
* Use `match` instead of `replace` when it is appropriate.
* More readable code.

See #30966. Fixes #26620.


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


git-svn-id: http://core.svn.wordpress.org/trunk@32827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-19 10:35:26 +00:00
Dominik Schilling
f5fa907f77 Customizer: Improve accessibility of Add Menu Items button and its panel.
props afercia, ocean90.
fixes #32682.
Built from https://develop.svn.wordpress.org/trunk@32848


git-svn-id: http://core.svn.wordpress.org/trunk@32819 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-18 20:52:24 +00:00
Konstantin Obenland
c1a9c4b7b8 Semanticize Help and Screen Options toggle.
Links used as UI controls that are not real links but act as buttons, should be buttons.

Props afercia.
Fixes #32494.


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


git-svn-id: http://core.svn.wordpress.org/trunk@32815 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-18 16:36:25 +00:00
Andrew Ozz
bc2630e099 Press This: Check the embeds list against all of the oembed providers.
Props stephdau. Fixes #32069.
Built from https://develop.svn.wordpress.org/trunk@32828


git-svn-id: http://core.svn.wordpress.org/trunk@32799 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-18 00:12:26 +00:00
Dominik Schilling
5864a7ad44 Customizer: Fix keyboard events for the menu items search field.
Replace the `change` event with `keyup`, see https://core.trac.wordpress.org/ticket/26600#comment:59 for background.

props tywayne.
fixes #32677.
Built from https://develop.svn.wordpress.org/trunk@32824


git-svn-id: http://core.svn.wordpress.org/trunk@32795 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-17 21:37:27 +00:00