Commit Graph

37446 Commits

Author SHA1 Message Date
Gary Pendergast 6411029d0d Database: Fix a test failing on MySQL 5.7 and MariaDB 10.2.
On newer versions of MySQL, an error was being thrown when creating a table with an index that we wanted to be silently truncated.

To avoid this, the test now tries to use a newer InnoDB file format where available, and skips the test when that happens.

Props pento, danielbachhuber, straussd.
Fixes #41716.



git-svn-id: https://develop.svn.wordpress.org/trunk@41818 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-10 23:45:35 +00:00
Weston Ruter 77c6dc7fd8 Customize: Fix vertical alignment of radio and checkbox inputs after [41740].
Props Shital Patel, subrataemfluence, sayedwp.
Amends [41740].
See #33085.
Fixes #42157.


git-svn-id: https://develop.svn.wordpress.org/trunk@41817 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-10 23:44:35 +00:00
Weston Ruter 32224a5c2a Customize: Fix string translations for singular vs plural after [41812].
Props felipeelia, tobifjellner, SergeyBiryukov.
See #42112.
Fixes #42170.


git-svn-id: https://develop.svn.wordpress.org/trunk@41816 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-10 21:03:38 +00:00
Weston Ruter 23a18572b0 Customize: Improve and clarify help text for Themes panel.
Props michelleweber, melchoyce, celloexpressions.
See #37661.
Fixes #42047.


git-svn-id: https://develop.svn.wordpress.org/trunk@41815 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-10 20:52:50 +00:00
Weston Ruter 89aef850c2 Widgets: Clear dirty flag on widgets admin screen when widget is deleted to prevent irrelevant confirmation prompt when leaving.
Props hazimayesh, felipeelia.
Amends [41352], [41813].
See #23120, #42127.
Fixes #41894.


git-svn-id: https://develop.svn.wordpress.org/trunk@41814 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-10 20:38:22 +00:00
Weston Ruter 6bbf13852b Widgets: Allow deletion even when widget form fails validity checks.
Props felipeelia.
Amends [41352].
See #23120.
Fixes #42127.


git-svn-id: https://develop.svn.wordpress.org/trunk@41813 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-10 18:06:24 +00:00
Weston Ruter cdba279149 Customize: Adjust "Menu Locations" labels for singular/plural.
Props felipeelia.
Fixes #42112.


git-svn-id: https://develop.svn.wordpress.org/trunk@41812 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-10 17:56:46 +00:00
Konstantin Obenland b02beaf298 Menus: Limit mapping to registered locations
Weeds out orphaned locations, so their information will not continue to be mapped to future themes.

Fixes #42121.


git-svn-id: https://develop.svn.wordpress.org/trunk@41811 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-10 17:07:31 +00:00
Konstantin Obenland 828dff99e9 Customizer: Account for legacy menu data
Checks for menu location data from when a previewed theme was previously active.

See #39692.


git-svn-id: https://develop.svn.wordpress.org/trunk@41810 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-10 17:05:01 +00:00
Boone Gorges 911c380a83 Taxonomy: Don't discard keys when merging queried terms from different taxonomies.
For values of `fields` like `id=>parent`, the keys of the array must be
maintained as part of the query results.

Introduced as part of #40496. See [38667], [40513].

Props miyauchi, dany2217, pcarvalho.
Fixes #41293.

git-svn-id: https://develop.svn.wordpress.org/trunk@41809 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-10 16:45:01 +00:00
Mel Choyce 0bf42bf3b7 Customizer: Vertically center section arrows.
Props dualcube_subrata.
Fixes #42123.


git-svn-id: https://develop.svn.wordpress.org/trunk@41808 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-10 16:22:34 +00:00
Weston Ruter f2f3a883d7 Customize: Improve behavior and extensibility of theme loading and searching.
* Introduce `WP_Customize_Themes_Section::$filter_type`, which has built-in functionality for `local` and `remote` filtering. When this set to `local`, all themes are assumed to be loaded from Ajax when the section is first loaded, and subsequent searching/filtering is applied to the loaded collection of themes within the section. This is how the core "Installed" section behaves - third-party sources with limited numbers of themes may consider leveraging this implementation. When this is set to `remote`, searching and filtering always triggers a new remote query via Ajax. The core "WordPress.org" section uses this approach, as it has over 5000 themes to search.
* Refactor `filterSearch()` to accept a raw term string as input. This enables a feature filter to be used on a section where `filter_type` is `local`.
* Refactor `filter()` on a theme control to check for an array of terms. Also sort the results by the number of matches. Rather than searching for an exact match, this will now search for each word in a search distinctly, allowing things like tags to rank in search results more accurately.
* Split `loadControls()` into two functions for themes section JS: `loadThemes()` to initiate and manage an Ajax request and `loadControls()` to create theme controls based on the results of the Ajax call. If third-party sections need to change the way controls are loaded, such as by using a custom control subclass of `WP_Customize_Theme_Control`, this allows them to use the core logic for managing the Ajax call and only override the actual control-creation process.
* Introduce `customize_load_themes` filter to facilitate loading themes from third-party sources (or modifying the results of the core sections).
* Bring significant improvements to the installed themes search filter.

Props celloexpressions.
Amends [41648].
See #37661.
Fixes #42049.


git-svn-id: https://develop.svn.wordpress.org/trunk@41807 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-10 07:08:51 +00:00
Gary Pendergast 33a0ff50b7 File Editor: Add support for more than one sub-directory level.
The theme and plugin editors now list all files in the selected theme or plugin, recursing through subdirectories as necessary.

Props WraithKenny, schlessera, chsxf, MikeHansenMe, Daedalon, valendesigns, westonruter, pento.
Fixes #6531.



git-svn-id: https://develop.svn.wordpress.org/trunk@41806 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-10 05:33:57 +00:00
Weston Ruter 5deddd9c62 File Editor: Increase robustness of fatal error checking when saving PHP file edits.
* Increase PHP execution time limit prior to issuing loopback requests where are themselves given timeouts to ensure PHP file can be reverted.
* Output scrape messages on success and failure so that absence of either can also be flagged as an error condition.
* Forward browser's HTTP Basic Auth credentials in loopback requests to admin and home URL.
* Display more helpful message when loopback request fails.

Amends [41721].
See #21622.
Fixes #42102.


git-svn-id: https://develop.svn.wordpress.org/trunk@41805 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-10 05:26:53 +00:00
Weston Ruter 55f2dac880 Customize: Ensure `customized` changes pending to be written into changeset are successfully injected into Ajax requests in preview.
Amends [40704].
See #42162.


git-svn-id: https://develop.svn.wordpress.org/trunk@41804 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-10 04:50:37 +00:00
Weston Ruter 52ef606823 Customize: Constrain focus when overlay notification is displayed.
* Restore previously-focused element when overlay notifications are dismissed.
* Allow notifications to be dismissed via keyboard.

Amends [41667].
See #42110, #35210, #39896.


git-svn-id: https://develop.svn.wordpress.org/trunk@41803 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-10 03:33:57 +00:00
Weston Ruter a4dab604fb Customize: Improve keyboard accessibility for publish settings section.
Props sayedwp.
See #39896.
Fixes #42027.


git-svn-id: https://develop.svn.wordpress.org/trunk@41802 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-09 23:00:39 +00:00
Konstantin Obenland 2ab27649f6 Menus: Add `social` as tertiary mapping group
Allows mapping of all social menus that include the term `social` in their slug.

See #39692.


git-svn-id: https://develop.svn.wordpress.org/trunk@41801 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-09 21:22:57 +00:00
Adam Silverstein 35fffc77e1 Docs: add docs for meta authorization filters.
Add filter documentation for `auth_{$object_type}_meta_{$meta_key}` and `auth_{$object_type}_{$sub_type}_meta_{$meta_key}`.

Props ericlewis, johneckman, DrewAPicture.
Fixes #36319.


git-svn-id: https://develop.svn.wordpress.org/trunk@41800 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-09 19:13:43 +00:00
Weston Ruter 0e91bb3610 Customize: Add jsdoc for `api.panel`, `api.section`, `api.control`, and `api.notifications` collections.
Props shramee, westonruter.
Fixes #39930.


git-svn-id: https://develop.svn.wordpress.org/trunk@41799 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-09 18:55:44 +00:00
Konstantin Obenland ab160e3b24 Widgets: Update globals documentation.
It doesn't look like `wp_register_sidebar_widget()` ever used a global named `$wp_register_widget_defaults`. It does however make use of `$wp_registered_widget_controls` now.

See [8960], [30776].

Props upadalavipul.
Fixes #41592.



git-svn-id: https://develop.svn.wordpress.org/trunk@41798 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-09 16:34:50 +00:00
Weston Ruter 153dd26c1f Customize: Eliminate use of customize-loader in core so Customizer is opened consistently in `top` window.
* Open the door for future browser history feature in #28536, which is currently not feasible when customize-loader is used.
* Remove customizer-loader from being used on admin screens for Dashboard, Themes, non-shiny theme install/update.
* Keep the customize-loader functionality available for plugins, for the time being. It may become deprecated.
* Ensure `return` param in customizer links in Themes screen update to reflect `search` updated by `pushState`.
* Persist `return` when reloading Customizer due to theme switch, autosave restoration, or changeset trashing.
* Use `location.replace()` instead of changing `location.href` when trashing.
* Hide theme browser while Themes screen is loading when there is a `search` to prevent flash of unfiltered themes.
* Use throttling instead of debouncing when searching themes to ensure that screen is updated immediately on page load.
* Fix encoding and decoding of `search` param between URL and search field.
* Add support for dismissing autosaves when closing customize-loader, when it is used by plugins.
* Skip sending changeset UUID to customize-loader for population in browser location if changeset branching is not enabled.

See #28536.
Fixes #40254.


git-svn-id: https://develop.svn.wordpress.org/trunk@41797 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-09 16:03:35 +00:00
John Blackbourn 6c1ec3088a Users: Remove some links to the dashboard from My Sites for users who cannot access it.
See #41453


git-svn-id: https://develop.svn.wordpress.org/trunk@41796 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-09 15:21:51 +00:00
John Blackbourn a98e73f94f Networks and Sites: Correct the documentation for the `update_site_cache` parameter of `WP_Site_Query`.
Props welcher, sudar
Fixes #42155


git-svn-id: https://develop.svn.wordpress.org/trunk@41795 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-09 14:25:52 +00:00
John Blackbourn c8a0c7f7d8 Press This: Use "installation" when referring to the act of installing Press This.
Props Presskopp
Fixes #41620


git-svn-id: https://develop.svn.wordpress.org/trunk@41794 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-09 14:07:42 +00:00
John Blackbourn 5fb2e03781 Customize: Don't use an abbreviation in screen reader help text.
Props pixolin
Fixes 42153


git-svn-id: https://develop.svn.wordpress.org/trunk@41793 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-09 13:48:37 +00:00
Dominik Schilling (ocean90) fe5832ebdf Customize: Add context to "View All Locations" string.
This is about navigation menu locations. Also updates the array alignment to use spaces.

See #40104.

git-svn-id: https://develop.svn.wordpress.org/trunk@41792 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-08 16:33:52 +00:00
ocean90 3a938bb9e9 Customize: Use a consistent translator comment for the same strings.
See #21492.

git-svn-id: https://develop.svn.wordpress.org/trunk@41791 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-08 16:22:15 +00:00
Pascal Birchler 17e5b0f5b8 Customize: Add missing word in error message about already published changesets.
Introduced in [41626].

Fixes #42144.


git-svn-id: https://develop.svn.wordpress.org/trunk@41790 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-08 09:24:21 +00:00
Pascal Birchler 938d225f96 Database: Use numbered placeholders in error message in `wpdb::prepare()`.
Props tobifjellner.
Fixes #42142.


git-svn-id: https://develop.svn.wordpress.org/trunk@41789 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-08 09:17:57 +00:00
Weston Ruter 6f4866bada Customize: Fix confusion related to visibility of Themes panel with drafted/scheduled changesets.
* Prevent autoloading an existing draft/future changeset when theme not active.
* Add missing notifications container to Themes panel.
* Remove deactivation of themes panel when selected status is not publish.
* Show notification in Themes panel when themes cannot be previewed and disable preview buttons.
* Reject installTheme call when theme preview not available.
* Return promise from installTheme and eliminate use of global events in favor of promises.

Props westonruter, melchoyce, zoonini.
See #37661, #39896.
Fixes #42126.



git-svn-id: https://develop.svn.wordpress.org/trunk@41788 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-07 05:59:45 +00:00
Sergey Biryukov 0d283b1f34 General: Correct `_deprecated_function()` calls in `debug_fopen()`, `debug_fwrite()`, and `debug_fclose()`.
The second parameter is supposed to be the version number, the replacement function should be the third parameter.

Props milindmore22, jdgrimes.
Fixes #41094.

git-svn-id: https://develop.svn.wordpress.org/trunk@41787 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-07 00:39:41 +00:00
Sergey Biryukov c02645bf13 Rewrite: In `url_to_postid()`, bail early if the URL does not belong to the site.
Props ivankristianto, swissspidy, jkhongusc, SergeyBiryukov.
Fixes #39373.

git-svn-id: https://develop.svn.wordpress.org/trunk@41786 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-06 23:28:38 +00:00
Sergey Biryukov 944d28b6e4 Editor: Fix JSHint errors after [41783].
See #42059.

git-svn-id: https://develop.svn.wordpress.org/trunk@41785 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-06 19:11:35 +00:00
Sergey Biryukov 3c72ff101f Build/Test Tools: In `Tests_Image_Functions::test_load_directory()`, check the expected internal type instead of using `assertNotInternalType()`, which causes an error with PHPUnit 6.4.0.
Props joemcgill.
Fixes #42124.

git-svn-id: https://develop.svn.wordpress.org/trunk@41784 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-06 18:21:16 +00:00
Andrew Ozz ef701b01e9 Editor:
- Fix keeping text selection and scroll position when there are embeds from URL.
- Add editor setting to disable keeping selection and scroll position.
- Remove dependency on Underscore.js.
- Fix error in the Text widget editor.

Props biskobe.
Fixes #42059, see #40854.

git-svn-id: https://develop.svn.wordpress.org/trunk@41783 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-06 17:43:11 +00:00
Sergey Biryukov 59bd66aeec Login and Registration: Prevent PHP warnings when POSTing to `wp-login.php` with an array as a `user_login` or `user_email` field.
Props menakas, johnjamesjacoby.
Fixes #40888.

git-svn-id: https://develop.svn.wordpress.org/trunk@41782 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-06 17:36:12 +00:00
Joe McGill ea0481afdb Media: Fix MEJS error when removing a media player.
This fixes a bug introduced by the upgrade to MediaElement.js, where code 
calling `wp.media.mixin.removePlayer()` would result in a JS error.

Props rafa8626, afercia.
Fixes #41787.


git-svn-id: https://develop.svn.wordpress.org/trunk@41781 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-06 16:31:01 +00:00
SergeyBiryukov b85fd6892c Twenty Seventeen: Add missing `@return` tag for `twentyseventeen_video_controls()`.
Props ndoublehwp, audrasjb.
Fixes #41927.

git-svn-id: https://develop.svn.wordpress.org/trunk@41780 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-06 01:34:02 +00:00
Weston Ruter 7c4d77bd04 Widgets: Apply the same container-constraining embed resizing logic from the Video widget to embeds in the Text widget.
See #40854, #39994.


git-svn-id: https://develop.svn.wordpress.org/trunk@41779 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-06 00:38:57 +00:00
Weston Ruter b7eac77fde Customize: Prevent `color` default control type from overriding template for `ColorControl`.
Amends [41771].
See #30738.


git-svn-id: https://develop.svn.wordpress.org/trunk@41778 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-05 14:35:30 +00:00
Weston Ruter 770834cc4c Post WordPress 4.9 Beta 1 version bump
git-svn-id: https://develop.svn.wordpress.org/trunk@41777 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-05 05:53:54 +00:00
Weston Ruter f17fcad6e1 WordPress 4.9 Beta 1.
git-svn-id: https://develop.svn.wordpress.org/trunk@41776 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-05 05:05:47 +00:00
Weston Ruter 92a4302940 File Editors: Fix JSHint error after [41774].
See #31779.


git-svn-id: https://develop.svn.wordpress.org/trunk@41775 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-05 04:42:58 +00:00
Helen Hou-Sandi fcf8dfd376 File Editors: Introduce an interstitial warning upon first visit.
This is an effort to provide a speed bump before heading into something potentially destructive and some education for users on better alternatives, even as we make the file editors safer to use. Each user, including existing users, will be shown a one-time dismissible modal warning on their first visit to each of the theme and plugin file editors.

Copy tweaks to come.

props michelleweber, Ipstenu, melchoyce, adamsilverstein, westonruter, toddnestor, aryamaaru, ZaneMatthew, cliffseal, helen.
fixes #31779.


git-svn-id: https://develop.svn.wordpress.org/trunk@41774 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-05 04:24:52 +00:00
Weston Ruter a0b6749534 Customize: Fix QUnit tests after failures introduced in [41768].
Props bpayton.
Fixes #40104.


git-svn-id: https://develop.svn.wordpress.org/trunk@41773 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-05 04:22:09 +00:00
Weston Ruter 6e25b4bb6d Widgets: Remove "Replace Gallery" button from Gallery widget since redundant with "Edit Gallery".
Props Presskopp, juhise, melchoyce.
See #41914.
Fixes #41994.


git-svn-id: https://develop.svn.wordpress.org/trunk@41772 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-05 03:12:59 +00:00
Weston Ruter f23be16bd2 Customize: Add default control template for standard input types.
Re-use default template instead of introducing custom one for the Discard Changes button.

See #30738.


git-svn-id: https://develop.svn.wordpress.org/trunk@41771 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-05 02:55:11 +00:00
Sergey Biryukov eb4f4bc87e Administration: Add `.protected-post-excerpt` class to password-protected post excerpts in the posts list.
Props Soean, mp518, slaFFik, SergeyBiryukov.
Fixes #41426.

git-svn-id: https://develop.svn.wordpress.org/trunk@41770 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-05 02:49:15 +00:00
Sergey Biryukov 86125a6a2d REST API: After [41760], use correct query variable in `WP_Term_Query::parse_orderby()` when `'include_slugs' => 'slug__in'` is passed.
See #40826.

git-svn-id: https://develop.svn.wordpress.org/trunk@41769 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-05 02:27:02 +00:00