Commit Graph

37505 Commits

Author SHA1 Message Date
Weston Ruter 97cde4e4e9 Media: Add MediaElement.js 2.2 back-compat for MediaElement.js 4.2
* Introduces `mediaelement-migrate.js`.
* Upgrades ME.js from 4.2.5-74e01a40 to 4.2.6-78496d1.

Props rafa8626, bradyvercher.
See #39686.
Fixes #42189.


git-svn-id: https://develop.svn.wordpress.org/trunk@41877 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-16 18:06:11 +00:00
Andrea Fercia 9dfb758afc Accessibility: Improve the File Editors interstitial warning.
The warning displayed upon first visit on the File Editors introduced in [41774]
needs to be the only perceivable content in the page for users of assistive
technologies. It looks like a modal but it's not exactly an ARIA dialog, not an
ARIA alert either, and needs some special treatment.

- constrains tabbing within the modal
- uses `wp.a11y.speak()` to make screen readers announce the modal message
- hides all the other page content from assistive technologies using `aria-hidden="true"`

This way, even if users miss the speak message, the warning is actually the only
perceivable content in the page.

Fixes #42110.


git-svn-id: https://develop.svn.wordpress.org/trunk@41876 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-16 17:58:07 +00:00
Jeremy Felt 0bfa2d7468 Multisite: Explicitly globalize global variables in `ms-settings.php`.
Explicitly globalize and document `$domain`, `$path`, `$site_id`, and `$public` in `ms-settings.php.

Props csloisel, danielbachhuber.
Fixes #39419.


git-svn-id: https://develop.svn.wordpress.org/trunk@41875 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-16 17:05:25 +00:00
Sergey Biryukov b0400815a5 Administration: Remove punctuation from the link text in "Site Address" option description.
Props Presskopp.
Fixes #42190.

git-svn-id: https://develop.svn.wordpress.org/trunk@41874 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-16 14:01:41 +00:00
Weston Ruter 8661837eb9 Customize: Use `keydown` instead of `keyup` for listening for enter key to add page stub via dropdown-pages control.
Fixes issue with Japanese input.

Props miyauchi.
Amends [38906].
See #34923.
Fixes #42233.


git-svn-id: https://develop.svn.wordpress.org/trunk@41873 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-16 07:56:28 +00:00
Weston Ruter 850db3c6a0 Widgets: Update preview for Gallery widget when one of its attachments is modified in the media modal, outside the customized state.
* Ensure that changes to captions are shown in preview when modified in media modal.
* Also keep `wp.customize.widgetsPreview.renderedWidgets` updated when widgets are added or removed.

See #41914, #37887, #40403.
Fixes #41979.


git-svn-id: https://develop.svn.wordpress.org/trunk@41872 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-16 06:45:09 +00:00
Weston Ruter 75034a401f Customize: Prevent theme details modal from being clipped in Safari.
Props afercia.
See #42052, #37661.


git-svn-id: https://develop.svn.wordpress.org/trunk@41871 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-16 04:40:13 +00:00
Sergey Biryukov a722bac3ed Build/Test Tools: Pass correct `$message` argument to `WP_UnitTestCase::setExpectedException()` in `Tests_Ajax_CompressionTest::test_logged_out()` and `Tests_Ajax_TagSearch::test_no_results()`.
PHPUnit 6.4.1 and earlier versions ignored the `'0'` value, causing the issue to go unnoticed.

Fixes #42232.

git-svn-id: https://develop.svn.wordpress.org/trunk@41870 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-16 04:05:29 +00:00
Weston Ruter 97c5985748 Customize: Add `'save-request-params'` event on `wp.customize` for plugins to inject/modify params in `save` requests.
Allows feature plugins, for example, to supply a `customize_changeset_title` param instead of having to wrap `wp.customize.previewer.query`.

Props dlh.
Fixes #42206.


git-svn-id: https://develop.svn.wordpress.org/trunk@41869 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-15 22:42:00 +00:00
Weston Ruter 0e8b17dd64 Widgets: Rename "Custom Menu" widget to "Navigation Menu".
Props gk.loveweb, ChrisHardie, ajayghaghretiya1, melchoyce.
Fixes #40442.


git-svn-id: https://develop.svn.wordpress.org/trunk@41868 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-15 22:22:59 +00:00
Sergey Biryukov e0598057c8 Widgets: Move empty title checks out of the `apply_filters( 'widget_title' )` calls for clarity.
See #42226.

git-svn-id: https://develop.svn.wordpress.org/trunk@41867 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-15 21:42:52 +00:00
Sergey Biryukov 2885001d30 Widgets: In `WP_Widget_Media`, apply `widget_title` filter regardless of whether the title is empty, same as other widgets do.
Props Bsop.
Fixes #42226.

git-svn-id: https://develop.svn.wordpress.org/trunk@41866 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-15 21:28:13 +00:00
Weston Ruter cabd02a137 File Editor: Move inline to external style to fix extra padding in RTL page direction.
Props afercia.
Fixes #42221.


git-svn-id: https://develop.svn.wordpress.org/trunk@41865 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-15 05:50:43 +00:00
Weston Ruter 93bb527725 File Editor: Prevent the scrolling of current-file into view to also change initially-focused element in Chrome.
Props afercia.
Fixes #24048.


git-svn-id: https://develop.svn.wordpress.org/trunk@41864 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-15 05:36:10 +00:00
Weston Ruter c8889350e7 Customize: Fix visibility of theme browser header in Safari.
Props benoitchantre, afercia.
See #42052, #37661.


git-svn-id: https://develop.svn.wordpress.org/trunk@41863 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-15 04:57:46 +00:00
Felix Arntz dd43699344 Multisite: Return `get_current_blog_id()` value instead of hard-coded 1 in `get_main_site_id()` for non-multisite environments.
See #41936.


git-svn-id: https://develop.svn.wordpress.org/trunk@41862 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-14 22:45:28 +00:00
Felix Arntz 4d6c257cf9 Multisite: Take `WP_Network::$blog_id` into account in `get_main_site_id()`.
When the `WP_Network::$blog_id` property is set manually, for example in the multisite bootstrap process, `get_main_site_id()` should use that value instead of running its own logic. The main logic for the function was therefore moved into the internal `WP_Network::get_main_site_id()` method, which is now being accessed by the function through the magic property handling for `WP_Network::$blog_id` (and its equivalent `WP_Network::$site_id`).

Props spacedmonkey, jeremyfelt.
Fixes #41936.


git-svn-id: https://develop.svn.wordpress.org/trunk@41861 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-14 22:41:15 +00:00
Weston Ruter a626ef6c81 Customize: Fix positioning of device-previewed window when publish settings are open.
* Update date control padding.
* Collapse publish settings section when opening panes for available widgets or nav menus.
* Remove save and cog buttons in mobile preview only mode.
* Move definition of `wp.customize.previewedDevice` to `wp.customize.state('previewedDevice')` for centralization, maintaining old alias.
* Remove unused CSS because the section is inside form now.

Props sayedwp, westonruter.
See #39896.
Fixes #42027, #42199.


git-svn-id: https://develop.svn.wordpress.org/trunk@41860 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-13 21:20:42 +00:00
Helen Hou-Sandi 99cff48f61 File editor warning: Add a "Go back" button.
see #42100, #31779.


git-svn-id: https://develop.svn.wordpress.org/trunk@41859 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-13 20:55:50 +00:00
Weston Ruter b822b04f7e Code Editor: Fix syntax error in PHP 5.2 and PHP 5.3 after [41855].
See #41871.


git-svn-id: https://develop.svn.wordpress.org/trunk@41858 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-13 19:42:40 +00:00
Mel Choyce e6908acb82 Settings: Widen time/day input fields on General Settings page, and move the preview onto the next line.
Props desrosj, afercia.
Fixes #41603.


git-svn-id: https://develop.svn.wordpress.org/trunk@41857 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-13 18:38:03 +00:00
Adam Silverstein b0cfcbb567 Media Grid: Fix escape key sometimes failing to close details modal.
Fix an issue where the escape key would no longer close the attachment details modal after attempting to navigate over the navigation boundaries (by clicking the left arrow key on the first media item or clicking the right arrow key on the last media item). Remove a focus blur which caused the underlying Backbone View to not receive the 'keydown' event.

Props subrataemfluence, afercia.
Fixes #42180.


git-svn-id: https://develop.svn.wordpress.org/trunk@41856 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-13 18:20:37 +00:00
Weston Ruter faeac43629 Code Editor: Add unit tests for `wp_enqueue_code_editor()` and `WP_Widget_Custom_HTML`.
Props ryotsun.
See #12423.
Fixes #41871.


git-svn-id: https://develop.svn.wordpress.org/trunk@41855 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-13 17:57:38 +00:00
Mel Choyce 99e6a95331 Improve File Credentials / Code Editor modal responsive styles.
Makes the modal full-width and height. 

Props sami.keijonen, Mirucon, helen.
Fixes #42111.


git-svn-id: https://develop.svn.wordpress.org/trunk@41854 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-13 14:39:00 +00:00
Weston Ruter 5ea6f41597 Customize: Fix positioning of Preview button in mobile.
Props Mahvash-Fatima.
Fixes #42172.


git-svn-id: https://develop.svn.wordpress.org/trunk@41853 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-13 08:22:56 +00:00
Weston Ruter 27a33509fb Code Editor: Remove keeping track of `wp.codeEditor` instances since unused and no removal of instances upon deletion, leading to memory leak.
See #12423.


git-svn-id: https://develop.svn.wordpress.org/trunk@41852 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-13 04:33:26 +00:00
Weston Ruter 8bf9afb4f4 File Editors: Display list of theme/plugin files in scrollable directory tree.
Props WraithKenny, afercia, melchoyce, westonruter.
Amends [41721].
Fixes #24048.


git-svn-id: https://develop.svn.wordpress.org/trunk@41851 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-13 02:38:19 +00:00
Gary Pendergast 1eda9654da Login: Swap `bloginfo()` usage for `get_bloginfo()`.
[41843] introduced a use of `bloginfo()`, where it should be using `get_bloginfo()`.

Props dlh.
Fixes #34625.



git-svn-id: https://develop.svn.wordpress.org/trunk@41850 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-13 02:09:42 +00:00
Boone Gorges 5c8c480d22 Bump 'posts' query cache incrementor when modifying postmeta.
This ensures that the `get_pages()` query cache doesn't go stale when
postmeta is modified.

Props spacedmonkey.
Fixes #40669.

git-svn-id: https://develop.svn.wordpress.org/trunk@41849 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-12 15:19:30 +00:00
Boone Gorges 6ce4e413ce Invalidate comment query cache when modifying comment meta.
Comment queries are sensitive to comment meta due to the `meta_query`
parameter, so the cache must be invalidated when comment meta is changed,
added, or deleted.

Props spacedmonkey.
See #40669.

git-svn-id: https://develop.svn.wordpress.org/trunk@41848 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-12 14:58:58 +00:00
Weston Ruter ee44859ee4 Post WordPress 4.9 Beta 2 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@41847 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-12 06:24:55 +00:00
Weston Ruter 6c23cbeb94 WordPress 4.9 Beta 2.
git-svn-id: https://develop.svn.wordpress.org/trunk@41846 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-12 05:42:43 +00:00
Weston Ruter 88c2d8ba25 Customize: Prevent showing confirmation dialog when leaving Customizer after previewing theme switch without making any changes.
Fixes #42173.


git-svn-id: https://develop.svn.wordpress.org/trunk@41845 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-12 05:16:40 +00:00
Gary Pendergast 5e9991f7e4 Editor: Improve the accuracy of the list of shortcodes that the word count ignores.
Previously, shortcodes were being counted when the `init` action fired, even though it's possible for shortcodes to be registered later than that.

By leaving the counting until just before the script is printed, we get a more accurate list of shortcodes.

Props ocean90.
Fixes #41917.



git-svn-id: https://develop.svn.wordpress.org/trunk@41844 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-12 05:09:10 +00:00
pento a0a05744a9 Login: On the single site login screen, match the logo link text with the title.
Previously, the (W) logo on the single site login screen linked to wordpress.org, with an appropriate `title` attribute, but the link text was the blog name.

To fix this discrepency, the link text is now the same as the `title` attribute.

Props pento, obrienlabs, afercia, flixos90, lukecavanagh, and the infinite stack of bikesheds that WordPress is balanced upon.
Fixes #34625.



git-svn-id: https://develop.svn.wordpress.org/trunk@41843 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-12 04:56:05 +00:00
Weston Ruter 8e9f37dde1 Twenty Seventeen: Fix positioning of edit shortcuts when partials are nested inside a frontpage panel.
Fixes #41557.


git-svn-id: https://develop.svn.wordpress.org/trunk@41842 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-12 04:43:27 +00:00
Gary Pendergast 5fac6cc075 Build/Test Tools: Revert [41784].
[41784] was a workaround for a bug in PHPUnit 6.4. PHPUnit 6.4.1 has since been released, which includes a fix for this.

Fixes #42124.



git-svn-id: https://develop.svn.wordpress.org/trunk@41841 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-12 04:27:22 +00:00
Weston Ruter bd5eb9f8cd Widgets: Update default `link_type` for Gallery widget from `none` to `post` for consistency with `wp.media.galleryDefaults`.
Props bor0.
See #41914.
Fixes #41985.


git-svn-id: https://develop.svn.wordpress.org/trunk@41840 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-12 04:20:32 +00:00
Weston Ruter bb63758be8 Customize: Add changeset locking in Customizer to prevent users from overriding each other's changes.
* Customization locking is checked when changesets are saved and when heartbeat ticks.
* Lock is lifted immediately upon a user closing the Customizer.
* Heartbeat is introduced into Customizer.
* Changes made to user after it was locked by another user are stored as an autosave revision for restoration.
* Lock notification displays link to preview the other user's changes on the frontend.
* A user loading a locked Customizer changeset will be presented with an option to take over.
* Autosave revisions attached to a published changeset are converted into auto-drafts so that they will be presented to users for restoration.
* Focus constraining is improved in overlay notifications.
* Escape key is stopped from propagating in overlay notifications, and it dismisses dismissible overlay notifications.
* Introduces `changesetLocked` state which is used to disable the Save button and suppress the AYS dialog when leaving the Customizer.
* Fixes bug where users could be presented with each other's autosave revisions.

Props sayedwp, westonruter, melchoyce.
See #31436, #31897, #39896.
Fixes #42024.


git-svn-id: https://develop.svn.wordpress.org/trunk@41839 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-12 04:00:15 +00:00
Mel Choyce baa8937d58 Media: Fix an issue where audio players overflow playlist containers.
Props celloexpressions.
Fixes #41844.


git-svn-id: https://develop.svn.wordpress.org/trunk@41838 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-12 03:54:59 +00:00
Mel Choyce 4e13eb54c2 Customizer: Improve specificity of small-screen styles in Widgets panel.
Props mrasharirfan, celloexpressions.
Fixes #41614.


git-svn-id: https://develop.svn.wordpress.org/trunk@41837 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-12 03:52:42 +00:00
Mel Choyce cf7cba3194 Settings: Widen image size input fields on Media Settings page.
On narrower devices, input fields are too short to fit the number of default digits they contain. This widens the fields and also breaks each height and width attribute onto a new line for better usability, using some terrible CSS trickery. My apologies.

Props: Toru, Presskopp, desrosj, xkon, ryelle, melchoyce.
Fixes #34539.


git-svn-id: https://develop.svn.wordpress.org/trunk@41836 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-12 03:47:29 +00:00
Gary Pendergast b57742018a General: Remove `.jshintrc` and `*.json` from the 2-space-indent `.editorconfig` group.
JSON files don't need a particular indent style, this was just inherited from the jQuery `.editorconfig`, that we based ours on.

`package.json` is staying in the 2-space-indent group for now, due to npm 3 and 4 having issues. Upgrading to npm 5 will allow us to remove `package.json`, too.

Props netweb.
Fixes #40946.



git-svn-id: https://develop.svn.wordpress.org/trunk@41835 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-12 01:57:45 +00:00
Mel Choyce 9f7e06e855 Gallery Widget: Fix row spacing across major browsers.
Props petertoi .
Fixes #42188.


git-svn-id: https://develop.svn.wordpress.org/trunk@41834 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-11 21:13:33 +00:00
Mel Choyce f6d84dbe31 Gallery Widget: Remove grey background behind gallery, and align images to the edge of the container.
Props Presskopp, benoitchantre, mrasharirfan.
Fixes #42101.


git-svn-id: https://develop.svn.wordpress.org/trunk@41833 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-11 19:44:18 +00:00
Weston Ruter 725a161456 Customize: Vary description for nav menu locations control based on whether it is shown during menu creation.
Also fix issue with initial visibility of notice when there are no menus.

Amends [41823].
Props bpayton, melchoyce, westonruter.
See #42116.
Fixes #42113.


git-svn-id: https://develop.svn.wordpress.org/trunk@41832 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-11 19:37:10 +00:00
Mel Choyce dfd140a7ba TinyMCE: Remove "Unlink" icon from toolbar
Because "unlink" now appears contextually when editing a link, let's remove it from the toolbar.

Props azaozz, ahortin, swissspidy, afercia.
Fixes #36569.


git-svn-id: https://develop.svn.wordpress.org/trunk@41831 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-11 19:13:09 +00:00
Mel Choyce e700ea5afe Code Editors: Improve cursor interactions on warning notices.
Fixes an issue where hovering over the warning icon didn't work if there were multiple warnings on the same line of code. Also updates the cursor from "pointer" to "help" when hovering over warnings and errors.

Props joyously, obenland.
Fixes #42129.


git-svn-id: https://develop.svn.wordpress.org/trunk@41830 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-11 18:24:10 +00:00
Gary Pendergast 3b734f0e65 Editor: Add the `replace_editor` filter.
This filter allows the Core editor to be replaced by an entirely different editor (coughcoughGUTENBERGcough).

Props azaozz, who is supposed to be on sabbatical right now.
Fixes #42119.



git-svn-id: https://develop.svn.wordpress.org/trunk@41829 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-11 12:05:21 +00:00
Pascal Birchler 4a23f58215 Database: Add translators comment for error message in `wpdb::prepare()`.
Props felipeelia.
Fixes #42142.


git-svn-id: https://develop.svn.wordpress.org/trunk@41828 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-11 08:34:34 +00:00