Commit Graph

37433 Commits

Author SHA1 Message Date
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
Weston Ruter
fb28cd4663 Customize: Improve the menu creation flow.
Often, folks run into two issues when they create new menus: they click "Add a Menu" thinking it will add a new page to their menu, or they forget to assign their new menu to a location, and then wonder why it doesn't show up on their site.

This commit rearranges the order of items in the menu panel, and updates the flow for creating a menu by breaking it up into steps. Additionally, more help text has been added to guide people through the process of creating a menu.

Also adds default `type` lookups for Panel and Section instances. See #30741.

Props bpayton, obenland, westonruter, celloexpessions, afercia, melchoyce, zoonini, michelleweber.
Fixes #40104.


git-svn-id: https://develop.svn.wordpress.org/trunk@41768 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-05 02:21:22 +00:00
Sergey Biryukov
ff65c814f9 Taxonomy: After [40903], restore documentation for wp_dropdown_categories() arguments that are different from the defaults in WP_Term_Query::__construct().
Fixes #41058.

git-svn-id: https://develop.svn.wordpress.org/trunk@41767 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-05 01:56:48 +00:00
Sergey Biryukov
cfe1b4476b Menus: Introduce wp_get_nav_menu_name() to retrieve the name of a navigation menu as set in the admin.
Props markoheijnen, christophherr, SpencerFinnell, wojtek.szkutnik, sagarprajapati, welcher, SergeyBiryukov.
Fixes #13910.

git-svn-id: https://develop.svn.wordpress.org/trunk@41766 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-05 01:37:39 +00:00
Konstantin Obenland
0bff7272e8 Widgets: Continue to use shortcode for some embeds
Renders YouTube and Vimeo embeds through WordPress' video shortcode.

See #42039.


git-svn-id: https://develop.svn.wordpress.org/trunk@41765 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-05 01:28:11 +00:00
K. Adam White
e4726752ab Widgets: Fix jshint error in media widget.
git-svn-id: https://develop.svn.wordpress.org/trunk@41764 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-05 00:57:08 +00:00
Sergey Biryukov
c5d9fa67a2 Posts, Post Types: Introduce page_attributes_misc_attributes action that fires before the help hint text in the 'Page Attributes' meta box.
Props markcallen, MikeHansenMe.
Fixes #34034.

git-svn-id: https://develop.svn.wordpress.org/trunk@41763 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-05 00:54:22 +00:00
Sergey Biryukov
9550cd43c9 Twenty Fourteen: Add missing singular placeholder in comments.php.
Uses the recommended pattern for better compatibility with languages that use the singular form for other numbers. Also adds translator comments.

Props bplv, xkon.
See #39660.

git-svn-id: https://develop.svn.wordpress.org/trunk@41762 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-05 00:41:23 +00:00
Sergey Biryukov
8ae64e992b Twenty Fifteen: Add missing singular placeholder in comments.php.
Uses the recommended pattern for better compatibility with languages that use the singular form for other numbers. Also adds translator comments.

Props bplv, xkon.
See #39660.

git-svn-id: https://develop.svn.wordpress.org/trunk@41761 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-05 00:40:20 +00:00
K. Adam White
8cda3a2f55 REST API: Support ordering response collection by listed slugs.
Adds an "include_slug" orderby value for REST API collections to permit returning a collection filtered by slugs in the same order in which those slugs are specified.
Previously, the order of slugs provided with the ?slug query parameter had no effect on the order of the returned records.

Props wonderboymusic, ocean90, boonebgorges.
Fixes #40826.



git-svn-id: https://develop.svn.wordpress.org/trunk@41760 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-05 00:36:43 +00:00
Konstantin Obenland
75ce48ef70 Widgets: Allow oEmbeds in video widget.
Opens up video embeds to all supported video oEmbed providers.

Props westonruter.
See #42039.


git-svn-id: https://develop.svn.wordpress.org/trunk@41759 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-05 00:21:27 +00:00
K. Adam White
64a36e4119 REST API: Support objects in settings schema.
Enables register_setting to accept an object as its schema value, allowing settings to accept non-scalar values through the REST API.
This whitelists the added type in the settings controller, and passes properties from argument registration into the validation functions.

Props joehoyle.
See #38583.



git-svn-id: https://develop.svn.wordpress.org/trunk@41758 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-05 00:18:44 +00:00
Sergey Biryukov
f7fcc393d7 Bundled Themes: Restore double line breaks before media queries.
See #40138.

git-svn-id: https://develop.svn.wordpress.org/trunk@41757 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-05 00:01:09 +00:00
Sergey Biryukov
4f10f171e8 Bundled Themes: Change tag cloud format to a list (<ul>) for better semantics and accessibility.
List markup allows screen reader users to know in advance how many tags are within the list.

Props xkon, davidakennedy.
Fixes #40138.

git-svn-id: https://develop.svn.wordpress.org/trunk@41756 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-04 23:52:03 +00:00