Commit Graph

24893 Commits

Author SHA1 Message Date
Andrea Fercia
69518459e6 Customize: Make sure the FTP credentials modal is visible.
The customizer and the theme installer use `visibility: hidden` on the body when
they open full-overlays screens. The FTP credentials modal needs a visibility
property set back to `visible` to be visible over those overlays.

Props purnendu.
Fixes #42205.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41806 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-23 17:54:53 +00:00
Sergey Biryukov
703713756a Tests: Fix typo in test_do_action_with_multiple_callbacks_on_different_priorities().
Props withinboredom.
Fixes #42311.
Built from https://develop.svn.wordpress.org/trunk@41971


git-svn-id: http://core.svn.wordpress.org/trunk@41805 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-23 13:04:49 +00:00
Peter Wilson
ca45ec136f Build/Test tools: Move wp_doing_ajax defintion from class setup to test setup.
Moves defintion of ajax request in `WP_Ajax_UnitTestCase` to `setUp()` method to account for hooks being reset as part of `tearDown()`.

Props matthias.thiel for report.
Fixes #41561.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-23 05:11:47 +00:00
Weston Ruter
990c6d5a42 Customize: Keep frontend preview link updated to reflect the current state of previewed URL, active theme, and autosaved state.
See #39896.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41803 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-23 00:41:47 +00:00
Weston Ruter
5e7e44aba7 Customize: Update 'Save & Activate' reference to 'Publish & Activate' in themes help tab text.
See #39896.
Fixes #42305.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-22 20:03:51 +00:00
John Blackbourn
74cf14cdf3 Docs: Correct docs introduced in [41965].
See #16778

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


git-svn-id: http://core.svn.wordpress.org/trunk@41801 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-21 22:42:51 +00:00
Dion Hulse
cb1b49bca5 Tests: Return an exit code of 1 in the event that the database server for tests is unavailable.
This allows for automated scripts & test suites to handle the failure of the test suite easier.

Props danielbachhuber
Fixes #41916

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


git-svn-id: http://core.svn.wordpress.org/trunk@41800 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-21 14:14:48 +00:00
Gary Pendergast
8608b710b7 Docs: Expand the docs for the core_version_check_query_args filter.
Add documentation for the parameters in the `$query` parameter.

Props MattyRob.
Fixes #16778.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41799 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-21 13:46:50 +00:00
Gary Pendergast
0847fab645 Media: Don't backdate media uploaded to pages.
When media is uploaded to a post, the upload directory is set according to the date of the post, so that the media URLs in the post match when the post was published.

A page is a slightly different beast, pages often live for years, and are regularly updated to stay relevant. This change causes media uploaded to pages to use the upload date to determine the upload directory.

Fixes #10752.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41798 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-21 13:27:48 +00:00
Dion Hulse
26f9c6b909 Transients: Clear expired transients from the database in a daily cron task.
Fixes #41699

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


git-svn-id: http://core.svn.wordpress.org/trunk@41797 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-21 13:22:49 +00:00
Gary Pendergast
f7fcb2cd5b Updates: Add the core_version_check_query_args filter.
This filter allows the data being sent for core update checks to be controlled for privacy concerns.

Props toscho, MattyRob, swissspidy, pento.
Fixes #16778.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41796 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-21 11:55:47 +00:00
Weston Ruter
0c1c0980e7 Customize: Improve back-compat for wp.customize.Control subclasses that expect options.params to be present for direct manipulation before calling parent initialize method.
Fixes known incompatibility with Make theme.

Amends [41726].
See #30741.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41795 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-21 08:51:48 +00:00
Weston Ruter
1f735509af Customize: Allow control subclasses to add to the deferred object before the base class initializes.
Update the `CodeEditorControl`'s `codemirror` deferred to be set before calling the parent class's `initialize` method. Since the `ready` method may be called directly by `initialize` it may be too late to add a new `Deferred` to the control's `deferred` property after calling the base control class's `initialize`.

Amends [41958].
See #41897.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41794 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-21 08:44:52 +00:00
Sergey Biryukov
45655bb928 Docs: Document $wp_version global in wp_initial_constants().
Props mt8.biz.
Fixes #42259.
Built from https://develop.svn.wordpress.org/trunk@41959


git-svn-id: http://core.svn.wordpress.org/trunk@41793 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-20 22:04:56 +00:00
Weston Ruter
47c555f8ed Customize: Add codemirror deferred object to CodeEditorControl which is resolved when CodeMirror is initialized.
CodeMirror gets initialized once the control's containing section is expanded. The deferred will be rejected if user preference for syntax highlighting is disabled.
Also move jsdoc from `wp.customize.Control` to intended `wp.customize.Control#initialize()`.

See #41897, #12423.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-20 21:48:46 +00:00
Weston Ruter
81c87e7d5e Code Editor: Improve ability to create Customizer CodeEditorControl instances in JS, lessening PHP dependencies.
Allow `CodeEditorControl` to be instantiated with a `editor_settings` param which is merged with `wp.codeEditor.defaultSettings`.

Also:

* Turn redundant "CSS Code" control label into screen reader text for Additional CSS.
* Remove `code-editor` as script dependency for `custom-html-widgets` since enqueueing is determined by `wp_enqueue_code_editor()`.
* Remove useless exporting of `code_type` param to JS in `WP_Customize_Code_Editor_Control`.
* Add `disabled` class to Custom HTML widget's Save button when linting errors are present.
* Remove redundant `span` inside CodeEditorControl's `label`.

See #41897, #12423, #41872.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-20 16:39:48 +00:00
Sergey Biryukov
33012ad740 Customize: Use typographic quotation marks in the strings added in [41768].
Props audrasjb, tobifjellner.
Fixes #42290. See #40104.
Built from https://develop.svn.wordpress.org/trunk@41956


git-svn-id: http://core.svn.wordpress.org/trunk@41790 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-20 14:07:47 +00:00
Sergey Biryukov
f80db51d0f Menus: Remove an extra space in the <ul> tag in Walker_Nav_Menu::start_lvl().
Fixes #42289.
Built from https://develop.svn.wordpress.org/trunk@41955


git-svn-id: http://core.svn.wordpress.org/trunk@41789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-20 10:40:46 +00:00
Mel Choyce
d31ab27d26 Customize Menus: Update capitalization of "next" to match case on the "Next" button.
Props hardeepasrani.
Fixes #42287.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41788 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-20 10:34:49 +00:00
Mel Choyce
4d41bf7127 Customization Locking: Update error message to use existing strings.
Props ramiy.
See #42024.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41787 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-20 10:32:53 +00:00
Weston Ruter
a402312a8d Customize: Prevent using default template for a base control when it has content rendered on the server.
Also prevent invalid `type` attribute from being added to a `select` element.

See #30738.
Fixes #42286.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41786 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-20 03:30:46 +00:00
Weston Ruter
6913ad9219 Widgets: Improve extensibility of the Gallery widget and of media widgets generally.
* Introduce a `widget_{$id_base}_instance_schema` filter for plugins to add new properties to a media widget's instance schema.
* Pass all of a gallery widget's instance props to the gallery media frame, not just the ones that core supports.

See #32417, #41914.
Fixes #42285.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41785 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 23:44:48 +00:00
Weston Ruter
ea21ad6cc1 Customize: Prevent re-highlighting "Add Items" button after available nav menu items pane has already been opened.
Amends [41930].
Props bpayton.
See #42114.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41784 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 18:38:47 +00:00
Weston Ruter
c8105f1460 Customize: Fix alignment of Customize, Activate, and Live Preview buttons appearing on the Themes admin screen.
Amends [41893].
Props Mahvash-Fatima.
See #42215.
Fixes #42275.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 18:10:47 +00:00
Weston Ruter
d695648084 Customize: Fix rendering issues in theme browsing when opening theme details or performing search in Safari.
Props sayedwp.
See #37661.
Fixes #42052.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 17:57:47 +00:00
Weston Ruter
b1a9139b46 Customize: Prevent drawing attention to save button if status unchanged from publish; account for changes to status/date when alerting about unsaved changes.
Also fix malformed ESLint directive from [41933].

Amends [41932].
See #39896, #42211.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41781 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 17:42:54 +00:00
Gary Pendergast
609da14d59 About page: Update the privacy policy dashes.
If one were to insert 1—3 dashes into a sentence - on purpose - they should use the correct da–
sh.

See #40794.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41780 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 15:36:47 +00:00
John Blackbourn
06eba419fe Build/Test tools: Document the return value of WP_UnitTestCase::factory().
See #41017

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


git-svn-id: http://core.svn.wordpress.org/trunk@41779 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 15:33:48 +00:00
Gary Pendergast
31a3c8e744 About page: Update the privacy policy language.
See #40794.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41778 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 15:26:48 +00:00
Mel Choyce
02ff01d331 About Page: Commit initial strings for 4.9.
Props kristastevens, dd32, hlashbrooke.
See #42087.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41777 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 13:57:48 +00:00
Sergey Biryukov
3aa0c23274 Docs: After [37329], update the documentation for register_widget() and unregister_widget().
Both functions can accept a `WP_Widget` instance object instead of a `WP_Widget` subclass name, same as `WP_Widget_Factory::register()` and `::unregister()`.

Props behzod.
Fixes #42270.
Built from https://develop.svn.wordpress.org/trunk@41942


git-svn-id: http://core.svn.wordpress.org/trunk@41776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 13:51:50 +00:00
Sergey Biryukov
1accb992f8 Menus: Pass $recent_args parameter to nav_menu_items_{$post_type_name}_recent filter.
Props welcher, eclev91.
Fixes #39849.
Built from https://develop.svn.wordpress.org/trunk@41941


git-svn-id: http://core.svn.wordpress.org/trunk@41775 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 13:05:55 +00:00
Sergey Biryukov
9c4fb24458 Docs: Reference WP_Comment_Query::__construct() as the source of information on accepted arguments in get_comments() and get_approved_comments().
See #41017.
Built from https://develop.svn.wordpress.org/trunk@41940


git-svn-id: http://core.svn.wordpress.org/trunk@41774 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 08:49:47 +00:00
Weston Ruter
bdefa6bf34 Post WordPress 4.9 Beta 3 version bump.
Built from https://develop.svn.wordpress.org/trunk@41939


git-svn-id: http://core.svn.wordpress.org/trunk@41773 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 05:08:48 +00:00
Weston Ruter
0ae160dec1 WordPress 4.9 Beta 3.
Built from https://develop.svn.wordpress.org/trunk@41938


git-svn-id: http://core.svn.wordpress.org/trunk@41772 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 04:43:48 +00:00
Joe McGill
d21f6799a6 Customizer: Improve handling of crops in the media library.
This is a follow up on r41732, implementing the following improvements:

* Attachment parent info is now stored in attachment meta rather than a 
separate post meta key.
* Attachments created from contextual crops (e.g. header, logos, etc.) are
filtered out of the media library using a new `_filterContext` method in
`wp.media.controller.Library`.

Props joemcgill, westonruter.
See #21819.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41771 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 04:18:47 +00:00
Weston Ruter
20aad6b5c5 Customize: Consistently use input_attrs as control param key in JS instead of inputAttrs.
See #30738, #41897.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41770 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 03:25:47 +00:00
Weston Ruter
f8d16c8aed Customize: Move control's fallback selection of default content template to renderContent method to align with sections and panels.
* Only use default control content template when a more specific template doesn't exist.
* Remove extraneous whitespace from being output in `WP_Customize_Control::render()` method.
* Move Custom Header template printing to `customize_controls_print_footer_scripts` action.

See #30738.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41769 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 03:04:49 +00:00
Sergey Biryukov
c81acd7cef I18N: Unify permission error message in wp-admin/ms-delete-site.php.
Props ramiy.
Fixes #42268.
Built from https://develop.svn.wordpress.org/trunk@41934


git-svn-id: http://core.svn.wordpress.org/trunk@41768 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 00:48:50 +00:00
Weston Ruter
887998f7ed Widgets: Harden logic for checking for valid media URLs.
* Update deprecated `isHostedVideo` method to always return `true` since all oEmbeds are now supported.
* Disable `scanImage` for non-image media widgets.
* Ensure embed URL field element is matched from current media frame instance due to bug where media frames are not destroyed upon closing.
* Update error message for invalid video URLs to ask user to check the URL for validity.

Props gk.loveweb, octalmage, westonruter.
See #42039, #40935.
Fixes #41052.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41767 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 00:07:54 +00:00
Weston Ruter
ed686152f5 Customize: Draw attention to save button after collapsing the publish settings section when the changeset status or date had been changed.
Props bpayton, westonruter.
See #42114, #39896.
Fixes #42211.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41766 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 23:06:49 +00:00
Sergey Biryukov
15c8976cc4 Dashboard: Add missing URL to "Help with testing" link in Gutenberg callout.
See #41316.
Built from https://develop.svn.wordpress.org/trunk@41931


git-svn-id: http://core.svn.wordpress.org/trunk@41765 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 22:41:46 +00:00
Weston Ruter
b65d6eb680 Customize: Draw attention to "Add Items" button after creating a new menu.
Introduce `wp.customize.utils.highlightButton()` and `wp.customize.Menus.MenuSection#highlightNewItemButton()`.

Props bpayton, melchoyce, afercia, westonruter.
Fixes #42114.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41764 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 22:00:50 +00:00
Sergey Biryukov
71dca590dc Build/Test Tools: Clean up $_REQUEST and $GLOBALS after modifying them in _test_list_hierarchical_page().
Props birgire.
Fixes #42044.
Built from https://develop.svn.wordpress.org/trunk@41929


git-svn-id: http://core.svn.wordpress.org/trunk@41763 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 21:48:48 +00:00
Sergey Biryukov
0f06f90341 Rewrite Rules: Remove redundant if condition in extract_from_markers().
Props Dency, yahil, appchecker.
Fixes #39920.
Built from https://develop.svn.wordpress.org/trunk@41928


git-svn-id: http://core.svn.wordpress.org/trunk@41762 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 21:28:46 +00:00
Sergey Biryukov
0afafb7a1b I18N: Unify error messages in XML-RPC methods wp_deleteCategory() and wp_deleteComment().
Props ramiy.
Fixes #39019.
Built from https://develop.svn.wordpress.org/trunk@41927


git-svn-id: http://core.svn.wordpress.org/trunk@41761 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 21:12:51 +00:00
Sergey Biryukov
50db4bceb0 Administration: After [41120], check for a registered action before sending a Bad Request HTTP response status code.
Props Clorith.
Fixes #42240.
Built from https://develop.svn.wordpress.org/trunk@41926


git-svn-id: http://core.svn.wordpress.org/trunk@41760 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 21:01:49 +00:00
Sergey Biryukov
469e37446e Menus: Remove unnecessary top margin for menu item type on Menus screen for correct alignment with the dropdown icon.
Props punit5658.
Fixes #41521.
Built from https://develop.svn.wordpress.org/trunk@41925


git-svn-id: http://core.svn.wordpress.org/trunk@41759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 20:52:49 +00:00
Sergey Biryukov
d2499c4212 Network Admin: After [41923], move the second <p> tag to a new line for better readability.
See #41652.
Built from https://develop.svn.wordpress.org/trunk@41924


git-svn-id: http://core.svn.wordpress.org/trunk@41758 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 20:51:48 +00:00
Sergey Biryukov
a749494900 I18N: Remove hardcoded constant from a translatable string in network_step1().
Props ramiy.
Fixes #41652.
Built from https://develop.svn.wordpress.org/trunk@41923


git-svn-id: http://core.svn.wordpress.org/trunk@41757 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 20:02:50 +00:00
Sergey Biryukov
73dc2a45e3 Docs: Document $ini_all staticvar in wp_is_ini_value_changeable().
Props nileshdudakiya94.
Fixes #41399.
Built from https://develop.svn.wordpress.org/trunk@41922


git-svn-id: http://core.svn.wordpress.org/trunk@41756 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 19:54:48 +00:00
Sergey Biryukov
106beec6a7 I18N: Combine two "Warning" strings in network_step1() and network_step2().
Props ramiy.
Fixes #38570.
Built from https://develop.svn.wordpress.org/trunk@41921


git-svn-id: http://core.svn.wordpress.org/trunk@41755 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 19:50:47 +00:00
Sergey Biryukov
eac62c8da0 Date/Time: Use delta comparison in get_gmt_from_date() tests to avoid race conditions.
Props keesiemeijer.
Fixes #38815.
Built from https://develop.svn.wordpress.org/trunk@41920


git-svn-id: http://core.svn.wordpress.org/trunk@41754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 19:42:48 +00:00
Weston Ruter
9cb9695104 Customize: Fix visibility of overlay notifications in Safari.
Props sayedwp, westonruter.
Amends [41390].
See #35210, #42024, #42052.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41753 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 18:14:37 +00:00
Felix Arntz
4cb1026757 Multisite: Document all return types in get_networks().
Adds more complete documentation to get_networks() and the corresponding methods in WP_Network_Query.

Fixes #42260.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41752 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 18:13:50 +00:00
Sergey Biryukov
0fc7597032 Docs: Document $default_scripts parameter in _WP_Editors::enqueue_scripts().
Props danieltj, ajayghaghretiya1.
Fixes #41322.
Built from https://develop.svn.wordpress.org/trunk@41917


git-svn-id: http://core.svn.wordpress.org/trunk@41751 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 18:09:47 +00:00
Sergey Biryukov
a28bd1d36c Plugins: Revert unintended change from [41915].
See #37430.
Built from https://develop.svn.wordpress.org/trunk@41916


git-svn-id: http://core.svn.wordpress.org/trunk@41750 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 18:01:49 +00:00
Sergey Biryukov
936bf3661f Plugins: After [41608], make the markup in WP_Plugin_Install_List_Table::no_items() a bit more readable.
See #37430.
Built from https://develop.svn.wordpress.org/trunk@41915


git-svn-id: http://core.svn.wordpress.org/trunk@41749 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 17:58:48 +00:00
Sergey Biryukov
4dd637acde Docs: Add @since entry for WP_Automatic_Updater::after_core_update(), introduced in [25841].
See #41017, #29086.
Built from https://develop.svn.wordpress.org/trunk@41914


git-svn-id: http://core.svn.wordpress.org/trunk@41748 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 17:48:49 +00:00
Weston Ruter
ae538512c3 Widgets: Fix previewing embeds in Text widget by allowing parse-embed admin ajax requests with an empty post_ID just as WP_oEmbed_Controller::get_proxy_item_permissions_check() allows.
As of #34115 if there is no post context the oEmbed will be cached in an `oembed_cache` custom post type, so having a post as context is no longer a requirement for caching.

Props biskobe, westonruter.
See #34115, #40450.
Fixes #40854.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41747 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 17:40:49 +00:00
Jeremy Felt
548d8c2e0d Multisite: Document all return types in get_sites().
Adds more complete documentation to `get_sites()` and the corresponding methods in `WP_Site_Query`.

Fixes #41789.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41746 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 17:39:46 +00:00
Sergey Biryukov
53dba84ec7 I18N: Remove <a> tag from a translatable string in confirm_another_blog_signup().
Props ramiy.
Fixes #41694.
Built from https://develop.svn.wordpress.org/trunk@41911


git-svn-id: http://core.svn.wordpress.org/trunk@41745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 17:36:50 +00:00
Sergey Biryukov
3951984680 I18N: Remove <b> tag from a translatable string in post_submit_meta_box().
Props ramiy.
Fixes #41681.
Built from https://develop.svn.wordpress.org/trunk@41910


git-svn-id: http://core.svn.wordpress.org/trunk@41744 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 17:31:48 +00:00
Sergey Biryukov
6b2a4c4574 I18N: Remove <strong> tag from a translatable string in Theme_Upgrader::install_strings().
Props ramiy.
Fixes #41695.
Built from https://develop.svn.wordpress.org/trunk@41909


git-svn-id: http://core.svn.wordpress.org/trunk@41743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 17:20:48 +00:00
Sergey Biryukov
2b9e8abd8f I18N: Remove <code> tags from translatable strings in Core_Upgrader, Language_Pack_Upgrader, Plugin_Upgrader, Theme_Upgrader.
Props ramiy.
Fixes #41705.
Built from https://develop.svn.wordpress.org/trunk@41908


git-svn-id: http://core.svn.wordpress.org/trunk@41742 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 17:15:47 +00:00
Sergey Biryukov
fb8d73a0f7 Docs: Correct type and description for the $data parameter in WP_Http::browser_redirect_compatibility().
Fixes #41380.
Built from https://develop.svn.wordpress.org/trunk@41907


git-svn-id: http://core.svn.wordpress.org/trunk@41741 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 16:38:48 +00:00
Sergey Biryukov
f9ff030127 I18N: Replace hardcoded file name in a translatable string in convert_to_screen() with a placeholder.
Props ramiy.
Fixes #41668.
Built from https://develop.svn.wordpress.org/trunk@41906


git-svn-id: http://core.svn.wordpress.org/trunk@41740 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 15:46:52 +00:00
Sergey Biryukov
82dd23d36f I18N: Make context for "Schedule" string added in [41898] more accurate.
Props ocean90.
Fixes #42165.
Built from https://develop.svn.wordpress.org/trunk@41905


git-svn-id: http://core.svn.wordpress.org/trunk@41739 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 15:39:52 +00:00
Sergey Biryukov
16bee559d4 I18N: Replace hardcoded file name in translatable strings in wp-admin/setup-config.php with a placeholder.
Props ramiy, danieltj.
Fixes #42161.
Built from https://develop.svn.wordpress.org/trunk@41904


git-svn-id: http://core.svn.wordpress.org/trunk@41738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 15:27:53 +00:00
Konstantin Obenland
d8f98b3649 Customize: Unstick filter pane in Theme selector
Prevents the filter pane from blocking the view of theme search results when it's open.
Users are now able to just scroll to view results.

Props rclations.
Fixes #42212.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 15:11:46 +00:00
Sergey Biryukov
ac5096d8bd Embeds: Avoid "Division by zero" warning in embed-content.php template if a thumbnail has a zero height.
Props stevenlinx, aegis123.
Fixes #40931.
Built from https://develop.svn.wordpress.org/trunk@41902


git-svn-id: http://core.svn.wordpress.org/trunk@41736 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 15:09:48 +00:00
Sergey Biryukov
a859b46e92 I18N: Replace function name in error message in WP_Http_Curl::request() and WP_Http_Streams::request() with a placeholder.
Props ramiy.
Fixes #41666.
Built from https://develop.svn.wordpress.org/trunk@41901


git-svn-id: http://core.svn.wordpress.org/trunk@41735 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 15:04:51 +00:00
Gary Pendergast
a2bd3e23d1 Dashboard: Ensure the "Dismiss" button on the Gutenberg callout is clickable.
Who likes z-index? We like z-index!

Props joemcgill.
See #41316.



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


git-svn-id: http://core.svn.wordpress.org/trunk@41734 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 14:55:48 +00:00
Konstantin Obenland
261f0d8ef2 Customize: Allow menu creation in locations pane
Adds a link to the menu creation workflow from the locations selector in the nav menu control.

Props bpayton, westonruter, Travel_girl, melchoyce, celloexpressions.
Fixes #36279.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41733 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 14:51:47 +00:00
Sergey Biryukov
97bab0459a I18N: Add a context for "Schedule" string.
Props Mirucon.
Fixes #42165.
Built from https://develop.svn.wordpress.org/trunk@41898


git-svn-id: http://core.svn.wordpress.org/trunk@41732 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 14:45:51 +00:00
Mel Choyce
0c73d35816 Code Editors: Fix display of "help" cursor.
Props studionashvegas .
Fixes #42210.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41731 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 13:11:49 +00:00
Gary Pendergast
df8ab820ef Dashboard: Remove a rogue comma introduced in [41895].
See #41316.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41730 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 12:39:46 +00:00
Gary Pendergast
3981736cd6 Dashboard: Introduce a "Try Gutenberg" callout.
To encourage more people to try Gutenberg, this new Dashboard box allows site users to easily install and try out Gutenberg.

Props pento, melchoyce, joen, karmatosed.
Fixes #41316.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41729 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 10:04:47 +00:00
Weston Ruter
e914c0447c Customize: Add missing filter docs in WP_Customize_Nav_Menu_Item_Setting::sanitize().
Props dlh.
Fixes #42257.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41728 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 04:57:50 +00:00
Weston Ruter
43b4a2577d Customize: Improve theme browsing UI on small screens.
Props Mahvash-Fatima, melchoyce, celloexpressions.
See #37661.
Fixes #42215.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41727 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 04:06:47 +00:00
Weston Ruter
41bb2125b0 Customize: Remove incorrect test assertions for the post_date of customization drafts.
Amends [41887].
See #42220.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41726 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 02:41:49 +00:00
Weston Ruter
b4edf21599 Media: Add missing mediaelement-migrate.js script to get uglified.
Amends [41877].
See #42189, #39686.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41725 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 02:26:48 +00:00
Weston Ruter
7ee77760af Widgets: Use a foreach loop instead of The Loop to iterate over posts in Recent Posts widget to avoid needing to reset a polluted global $post.
Props welcher, westonruter.
Amends [14607].
See #12320.
Fixes #37312.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41724 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 00:34:46 +00:00
Weston Ruter
dce5306603 Media: Use user locale as ME.js language in admin and add mejsL10n inline script before mediaelement-core so WP-exported translation strings are used.
See #39686.
Fixes #42241.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41723 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 00:08:45 +00:00
David A. Kennedy
b6539fb5a0 Twenty Seventeen: Fix double bottom-margins below embeds
Corrects an issue where both the containing paragraph and embed had bottom margins, causing unwanted extra space.

Props westonruter.

Fixes #42118.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41722 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-17 22:50:51 +00:00
Weston Ruter
bd9d1d9178 Customize: Allow post/page stubs to be edited in WP Admin as "customization drafts" when changeset is saved as draft or scheduled.
* Update stubs to have draft status when changeset is saved as draft, instead of preventing auto-draft garbage collection by giving them a far-future `post_date`.
* Show notice in publish metabox when editing a customization draft indicating that it will be published automatically with its changeset; a link to Customizer is included.
* Include a new "Customization Draft" display post state in the post list table.
* Disconnect stubs from their changesets when they are updated with a status other than "Draft".
* Trash customization drafts when their related changeset is trashed or deleted.
* Add a `_customize_changeset_uuid` postmeta to stubs to link them with their associated changeset.
* Include `customize_changeset_uuid` as context when requesting to insert a new auto-draft.

Props westonruter, melchoyce.
See #39896, #39752, #34923.
Fixes #42220.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41721 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-17 20:15:52 +00:00
Weston Ruter
955d5b0ab1 Widgets: Prevent MediaElement.js player from overflowing sidebar in Audio widget.
Props bradyvercher.
See #39686.
Fixes #42244.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 23:02:47 +00:00
Felix Arntz
021afced82 Role/Capability: Prevent a fatal error when checking a language capability early or in the frontend.
The meta capabilities `install_languages` and `update_languages` rely on the admin function `wp_can_install_language_pack()`. That function in turn relies on `request_filesystem_credentials()`, so it needs to be ensured that this function is available as well.

Fixes #42230.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41719 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 22:54:57 +00:00
Felix Arntz
3f8621b632 Multisite: Revert [41698] and [41743].
In order for `get_site_by()` to be truly beneficial, caching in `WP_Site_Query` needs to be improved to account for common use-cases and have them be invalidated less aggressively.

See #40180, #40228, #42091.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41718 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 22:35:47 +00:00
Felix Arntz
18789739c1 Multisite: Revert [41719].
While `get_site_by()` makes sense as a more explicit and less complex replacement for `get_blog_details()`, it is not ready yet in terms of caching, where it currently falls short of the older function under specific circumstances.

See #40180, #40228.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41717 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 22:29:48 +00:00
Helen Hou-Sandí
bb66a52a14 Code Editors: Minor style improvements.
props melchoyce.
see #42214.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41716 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 21:36:48 +00:00
Boone Gorges
af960204b6 Taxonomy: Add note about $number inconsistency to WP_Term_Query docs.
Fixes #41796.
Built from https://develop.svn.wordpress.org/trunk@41881


git-svn-id: http://core.svn.wordpress.org/trunk@41715 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 18:38:48 +00:00
Boone Gorges
9f73875705 Don't force distinct term queries when specifying number and object_ids.
This reverts [41377], which caused performance problems on sites with a large
number of terms.

See #41796.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 18:35:47 +00:00
John Blackbourn
24783cfc3e Media: Allow the unminified mediaelement script to be enqueued when SCRIPT_DEBUG is true.
Props dsawardekar
Fixes #42229

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


git-svn-id: http://core.svn.wordpress.org/trunk@41713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 18:15:47 +00:00
Andrea Fercia
575e60e96c Administration: Improve consistency of the "not found" strings.
Partially reverts [41608] restoring the original strings without the word `query`.

See #37430.
Fixes #42231.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 18:14:48 +00:00
Weston Ruter
2e602a8560 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41711 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 18:07:52 +00:00
Andrea Fercia
4085a1b266 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41710 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 17:59:52 +00:00
Jeremy Felt
e362e61ae5 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41709 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 17:06:48 +00:00
Sergey Biryukov
a88704d026 Administration: Remove punctuation from the link text in "Site Address" option description.
Props Presskopp.
Fixes #42190.
Built from https://develop.svn.wordpress.org/trunk@41874


git-svn-id: http://core.svn.wordpress.org/trunk@41708 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 14:02:50 +00:00
Weston Ruter
862e8c1807 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41707 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 07:57:48 +00:00
Weston Ruter
4150e805d7 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41706 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 06:46:48 +00:00
Weston Ruter
94f9c7e789 Customize: Prevent theme details modal from being clipped in Safari.
Props afercia.
See #42052, #37661.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41705 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 04:41:45 +00:00
Sergey Biryukov
c79492540a 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.
Built from https://develop.svn.wordpress.org/trunk@41870


git-svn-id: http://core.svn.wordpress.org/trunk@41704 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 04:06:49 +00:00
Weston Ruter
2e184426c0 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41703 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-15 22:42:48 +00:00
Weston Ruter
12f647679b Widgets: Rename "Custom Menu" widget to "Navigation Menu".
Props gk.loveweb, ChrisHardie, ajayghaghretiya1, melchoyce.
Fixes #40442.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-15 22:23:47 +00:00
Sergey Biryukov
46ff957961 Widgets: Move empty title checks out of the apply_filters( 'widget_title' ) calls for clarity.
See #42226.
Built from https://develop.svn.wordpress.org/trunk@41867


git-svn-id: http://core.svn.wordpress.org/trunk@41701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-15 21:43:47 +00:00
Sergey Biryukov
0ae79ece9f 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.
Built from https://develop.svn.wordpress.org/trunk@41866


git-svn-id: http://core.svn.wordpress.org/trunk@41700 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-15 21:29:51 +00:00
Weston Ruter
ad8c9f0170 File Editor: Move inline to external style to fix extra padding in RTL page direction.
Props afercia.
Fixes #42221.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41699 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-15 05:51:49 +00:00
Weston Ruter
191beede5e File Editor: Prevent the scrolling of current-file into view to also change initially-focused element in Chrome.
Props afercia.
Fixes #24048.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41698 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-15 05:37:51 +00:00
Weston Ruter
8562e4bfac Customize: Fix visibility of theme browser header in Safari.
Props benoitchantre, afercia.
See #42052, #37661.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41697 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-15 04:59:10 +00:00
Felix Arntz
e4550efbb7 Multisite: Return get_current_blog_id() value instead of hard-coded 1 in get_main_site_id() for non-multisite environments.
See #41936.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41696 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-14 22:46:48 +00:00
Felix Arntz
5ea3d62192 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41695 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-14 22:42:54 +00:00
Weston Ruter
24d304a0a1 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41694 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 21:21:55 +00:00
Helen Hou-Sandí
e48b16d96a File editor warning: Add a "Go back" button.
see #42100, #31779.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 20:56:50 +00:00
Weston Ruter
d975dccac9 Code Editor: Fix syntax error in PHP 5.2 and PHP 5.3 after [41855].
See #41871.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 19:43:49 +00:00
Mel Choyce
e5db49d607 Settings: Widen time/day input fields on General Settings page, and move the preview onto the next line.
Props desrosj, afercia.
Fixes #41603.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41691 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 18:39:48 +00:00
Adam Silverstein
59c3c7ae14 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41690 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 18:21:49 +00:00
Weston Ruter
22ecf792b5 Code Editor: Add unit tests for wp_enqueue_code_editor() and WP_Widget_Custom_HTML.
Props ryotsun.
See #12423.
Fixes #41871.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41689 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 17:58:46 +00:00
Mel Choyce
af6d136163 Improve File Credentials / Code Editor modal responsive styles.
Makes the modal full-width and height. 

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

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


git-svn-id: http://core.svn.wordpress.org/trunk@41688 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 14:39:54 +00:00
Weston Ruter
8af4e6e3f9 Customize: Fix positioning of Preview button in mobile.
Props Mahvash-Fatima.
Fixes #42172.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 08:23:50 +00:00
Weston Ruter
d44acf01dc Code Editor: Remove keeping track of wp.codeEditor instances since unused and no removal of instances upon deletion, leading to memory leak.
See #12423.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 04:34:52 +00:00
Weston Ruter
0659de4e21 File Editors: Display list of theme/plugin files in scrollable directory tree.
Props WraithKenny, afercia, melchoyce, westonruter.
Amends [41721].
Fixes #24048.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 02:39:47 +00:00
Gary Pendergast
95cfb7f5e4 Login: Swap bloginfo() usage for get_bloginfo().
[41843] introduced a use of `bloginfo()`, where it should be using `get_bloginfo()`.

Props dlh.
Fixes #34625.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41684 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 02:10:48 +00:00
Boone Gorges
a1879766ed 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.
Built from https://develop.svn.wordpress.org/trunk@41849


git-svn-id: http://core.svn.wordpress.org/trunk@41683 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 15:20:47 +00:00
Boone Gorges
0fce77da25 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.
Built from https://develop.svn.wordpress.org/trunk@41848


git-svn-id: http://core.svn.wordpress.org/trunk@41682 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 14:59:47 +00:00
Weston Ruter
3bfe1f6c21 Post WordPress 4.9 Beta 2 version bump.
Built from https://develop.svn.wordpress.org/trunk@41847


git-svn-id: http://core.svn.wordpress.org/trunk@41681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 06:25:48 +00:00
Weston Ruter
2601b16e76 WordPress 4.9 Beta 2.
Built from https://develop.svn.wordpress.org/trunk@41846


git-svn-id: http://core.svn.wordpress.org/trunk@41680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 05:43:47 +00:00
Weston Ruter
39a2308a94 Customize: Prevent showing confirmation dialog when leaving Customizer after previewing theme switch without making any changes.
Fixes #42173.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41679 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 05:17:49 +00:00
Gary Pendergast
af83fe7fb9 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.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41678 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 05:10:50 +00:00
Gary Pendergast
a9d38090ac 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.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41677 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 04:57:46 +00:00
Weston Ruter
da565a20b9 Twenty Seventeen: Fix positioning of edit shortcuts when partials are nested inside a frontpage panel.
Fixes #41557.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41676 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 04:44:45 +00:00
Gary Pendergast
8cb9f6159a 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.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41675 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 04:28:46 +00:00
Weston Ruter
663c20388b Widgets: Update default link_type for Gallery widget from none to post for consistency with wp.media.galleryDefaults.
Props bor0.
See #41914.
Fixes #41985.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41674 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 04:21:46 +00:00
Weston Ruter
434e3aba82 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 04:01:46 +00:00
Mel Choyce
f44ed386c1 Media: Fix an issue where audio players overflow playlist containers.
Props celloexpressions.
Fixes #41844.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41672 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 03:55:46 +00:00
Mel Choyce
a19f05ad63 Customizer: Improve specificity of small-screen styles in Widgets panel.
Props mrasharirfan, celloexpressions.
Fixes #41614.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41671 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 03:53:47 +00:00
Mel Choyce
7e6748ad61 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41670 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 03:48:47 +00:00
Gary Pendergast
5a8d166547 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.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41669 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 01:58:45 +00:00
Mel Choyce
009c3a94bb Gallery Widget: Fix row spacing across major browsers.
Props petertoi .
Fixes #42188.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41668 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 21:14:51 +00:00
Mel Choyce
71aa62101f Gallery Widget: Remove grey background behind gallery, and align images to the edge of the container.
Props Presskopp, benoitchantre, mrasharirfan.
Fixes #42101.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41667 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 19:45:49 +00:00
Weston Ruter
2866a3cad2 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41666 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 19:38:50 +00:00
Mel Choyce
e8922f416e 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41665 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 19:14:46 +00:00
Mel Choyce
39f3764a4b 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41664 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 18:25:46 +00:00
Gary Pendergast
a72be13ec0 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.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41663 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 12:06:48 +00:00
Pascal Birchler
8b4a8b6c15 Database: Add translators comment for error message in wpdb::prepare().
Props felipeelia.
Fixes #42142.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 08:35:47 +00:00
Weston Ruter
3ba66a0030 Widgets: Update video widget embed failure notice to indicate streams other than YouTube and Vimeo are allowed.
Amends [41759].
See #42039.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 06:22:47 +00:00
Weston Ruter
43801ded60 Customize: Make sure saved state is initially false when restoring autosave revision so that Save button will be enabled.
Amends [41597].
Props sayedwp.
See #39896.
Fixes #42143.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 05:57:48 +00:00
Weston Ruter
b2c816ff74 Customize: Correct docs for WP_Customize_Manager::changeset_uuid() after changes in [41626].
Props dlh.
Fixes #42174.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 05:45:46 +00:00
Weston Ruter
3f2b453a4d Customize: Introduce WP_Customize_Manager::trash_changeset_post() to reduce duplication and ensure proper changeset trashing logic.
Trashing a changeset via `wp_trash_post()` does not have the desired result since it mutates `post_content` (via Kses) and the `post_name` (even though it is a UUID).

Props dlh.
See #39896, #42030.
Fixes #42175.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 05:42:49 +00:00
Weston Ruter
c6f2ff7a8e Customize: Add notice for when there are no nav menus created yet, prompting user to create one.
Props bpayton, melchoyce, westonruter.
Fixes #42116.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41657 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 05:28:52 +00:00
Weston Ruter
36f8e77b49 Customize: Prevent outputting value attribute if already supplied among input_attrs.
This allows for `input[type=button]` controls to be added without producing illegal HTML.

Amends [41740].
See #30738, #33085.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41656 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 04:26:48 +00:00
Dion Hulse
b35cf2f529 Upgrades: Remove the usage of each() from WP_Upgrader for PHP 7.2 compatibility.
Props chrisvendiadvertisingcom, dd32.
Fixes #41524

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


git-svn-id: http://core.svn.wordpress.org/trunk@41655 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 04:24:50 +00:00
Gary Pendergast
fd247bc2e4 Database: When parsing the host, leave the port and socket as null if they're not defined.
This fixes a change in behaviour introduced by [41629].

The host is set to an empty string when it isn't defined, this continues existing behaviour. In particular, the mysqli library treats a `null` host as being the same as `localhost`, which is not always the intended behaviour.

Props birgire, markjaquith, pento.
Fixes #41722.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41654 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 00:10:47 +00:00
Weston Ruter
3609d0c4c5 Plugin Editor: Revert superseded changes to activate_plugin() and plugin_sandbox_scrape().
Partially revert [41671], [41561], [41560].
See #21622.
Fixes #39766.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 00:03:48 +00:00
Gary Pendergast
80fd3cad0d 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.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41652 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 23:46:47 +00:00
Weston Ruter
5bde734323 Customize: Fix vertical alignment of radio and checkbox inputs after [41740].
Props Shital Patel, subrataemfluence, sayedwp.
Amends [41740].
See #33085.
Fixes #42157.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41651 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 23:45:51 +00:00
Weston Ruter
c1ede53374 Customize: Fix string translations for singular vs plural after [41812].
Props felipeelia, tobifjellner, SergeyBiryukov.
See #42112.
Fixes #42170.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 21:04:49 +00:00
Weston Ruter
5123283cf7 Customize: Improve and clarify help text for Themes panel.
Props michelleweber, melchoyce, celloexpressions.
See #37661.
Fixes #42047.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41649 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 20:53:49 +00:00
Weston Ruter
6c05b7bef2 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 20:39:47 +00:00
Weston Ruter
7cb66a5353 Widgets: Allow deletion even when widget form fails validity checks.
Props felipeelia.
Amends [41352].
See #23120.
Fixes #42127.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41647 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 18:07:51 +00:00
Weston Ruter
b36fa8ce9c Customize: Adjust "Menu Locations" labels for singular/plural.
Props felipeelia.
Fixes #42112.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 17:57:48 +00:00
Konstantin Obenland
b17b035009 Menus: Limit mapping to registered locations
Weeds out orphaned locations, so their information will not continue to be mapped to future themes.

Fixes #42121.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 17:08:48 +00:00
Konstantin Obenland
a22bb4f3ad Customizer: Account for legacy menu data
Checks for menu location data from when a previewed theme was previously active.

See #39692.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 17:06:47 +00:00
Boone Gorges
8d773262f3 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.
Built from https://develop.svn.wordpress.org/trunk@41809


git-svn-id: http://core.svn.wordpress.org/trunk@41643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 16:45:48 +00:00
Mel Choyce
8f4e2bdb6b Customizer: Vertically center section arrows.
Props dualcube_subrata.
Fixes #42123.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41642 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 16:23:50 +00:00
Weston Ruter
7b0dbf49fc 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41641 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 07:09:52 +00:00
Gary Pendergast
58db3cb54e 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.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 05:34:49 +00:00
Weston Ruter
1a22fb3b60 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 05:27:49 +00:00
Weston Ruter
132c847087 Customize: Ensure customized changes pending to be written into changeset are successfully injected into Ajax requests in preview.
Amends [40704].
See #42162.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 04:51:47 +00:00
Weston Ruter
ef1c95ff91 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41637 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 03:34:53 +00:00
Weston Ruter
f462387431 Customize: Improve keyboard accessibility for publish settings section.
Props sayedwp.
See #39896.
Fixes #42027.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41636 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-09 23:01:46 +00:00
Konstantin Obenland
756c052ccb Menus: Add social as tertiary mapping group
Allows mapping of all social menus that include the term `social` in their slug.

See #39692.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41635 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-09 21:23:47 +00:00
Adam Silverstein
ca30822541 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-09 19:14:52 +00:00
Weston Ruter
598e5f400e Customize: Add jsdoc for api.panel, api.section, api.control, and api.notifications collections.
Props shramee, westonruter.
Fixes #39930.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41633 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-09 18:56:55 +00:00
Konstantin Obenland
8911893672 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.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41632 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-09 16:35:47 +00:00
Weston Ruter
35b5c9e762 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41631 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-09 16:04:48 +00:00
John Blackbourn
c9e8431582 Users: Remove some links to the dashboard from My Sites for users who cannot access it.
See #41453

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


git-svn-id: http://core.svn.wordpress.org/trunk@41630 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-09 15:22:46 +00:00
John Blackbourn
b25e759621 Networks and Sites: Correct the documentation for the update_site_cache parameter of WP_Site_Query.
Props welcher, sudar
Fixes #42155

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


git-svn-id: http://core.svn.wordpress.org/trunk@41629 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-09 14:26:49 +00:00
John Blackbourn
f14b24792a Press This: Use "installation" when referring to the act of installing Press This.
Props Presskopp
Fixes #41620

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


git-svn-id: http://core.svn.wordpress.org/trunk@41628 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-09 14:08:48 +00:00
John Blackbourn
8ec310d44c Customize: Don't use an abbreviation in screen reader help text.
Props pixolin
Fixes 42153

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


git-svn-id: http://core.svn.wordpress.org/trunk@41627 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-09 13:49:52 +00:00
Dominik Schilling
3dfe22a425 Customize: Add context to "View All Locations" string.
This is about navigation menu locations. Also updates the array alignment to use spaces.

See #40104.
Built from https://develop.svn.wordpress.org/trunk@41792


git-svn-id: http://core.svn.wordpress.org/trunk@41626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-08 16:34:49 +00:00
Dominik Schilling
3bee2912ea Customize: Use a consistent translator comment for the same strings.
See #21492.
Built from https://develop.svn.wordpress.org/trunk@41791


git-svn-id: http://core.svn.wordpress.org/trunk@41625 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-08 16:23:46 +00:00
Pascal Birchler
d323ea9e18 Customize: Add missing word in error message about already published changesets.
Introduced in [41626].

Fixes #42144.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-08 09:25:55 +00:00
Pascal Birchler
1478135c46 Database: Use numbered placeholders in error message in wpdb::prepare().
Props tobifjellner.
Fixes #42142.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41623 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-08 09:18:57 +00:00
Weston Ruter
a01ae9a8c3 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.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41622 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-07 06:00:54 +00:00
Sergey Biryukov
dc4241986b 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.
Built from https://develop.svn.wordpress.org/trunk@41787


git-svn-id: http://core.svn.wordpress.org/trunk@41621 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-07 00:40:52 +00:00
Sergey Biryukov
2ae2b1269a Rewrite: In url_to_postid(), bail early if the URL does not belong to the site.
Props ivankristianto, swissspidy, jkhongusc, SergeyBiryukov.
Fixes #39373.
Built from https://develop.svn.wordpress.org/trunk@41786


git-svn-id: http://core.svn.wordpress.org/trunk@41620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-06 23:29:51 +00:00
Sergey Biryukov
6ecdbe6e0e Editor: Fix JSHint errors after [41783].
See #42059.
Built from https://develop.svn.wordpress.org/trunk@41785


git-svn-id: http://core.svn.wordpress.org/trunk@41619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-06 19:12:49 +00:00
Sergey Biryukov
20a3f8d6c9 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.
Built from https://develop.svn.wordpress.org/trunk@41784


git-svn-id: http://core.svn.wordpress.org/trunk@41618 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-06 18:22:48 +00:00
Andrew Ozz
765272e3e5 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.
Built from https://develop.svn.wordpress.org/trunk@41783


git-svn-id: http://core.svn.wordpress.org/trunk@41617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-06 17:44:48 +00:00
Sergey Biryukov
806c464e4b 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.
Built from https://develop.svn.wordpress.org/trunk@41782


git-svn-id: http://core.svn.wordpress.org/trunk@41616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-06 17:37:47 +00:00
Joe McGill
53a58e35b7 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-06 16:31:54 +00:00
Sergey Biryukov
0b39f4c99d Twenty Seventeen: Add missing @return tag for twentyseventeen_video_controls().
Props ndoublehwp, audrasjb.
Fixes #41927.
Built from https://develop.svn.wordpress.org/trunk@41780


git-svn-id: http://core.svn.wordpress.org/trunk@41614 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-06 01:35:47 +00:00
Weston Ruter
77a4574b96 Widgets: Apply the same container-constraining embed resizing logic from the Video widget to embeds in the Text widget.
See #40854, #39994.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41613 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-06 00:39:52 +00:00
Weston Ruter
b6297d1866 Customize: Prevent color default control type from overriding template for ColorControl.
Amends [41771].
See #30738.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 14:36:57 +00:00
Weston Ruter
766db88eb9 Post WordPress 4.9 Beta 1 version bump
Built from https://develop.svn.wordpress.org/trunk@41777


git-svn-id: http://core.svn.wordpress.org/trunk@41611 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 05:54:52 +00:00
Weston Ruter
6a899cf45c WordPress 4.9 Beta 1.
Built from https://develop.svn.wordpress.org/trunk@41776


git-svn-id: http://core.svn.wordpress.org/trunk@41610 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 05:06:47 +00:00
Weston Ruter
b5f75fc315 File Editors: Fix JSHint error after [41774].
See #31779.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41609 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 04:43:47 +00:00
Helen Hou-Sandí
b698881469 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41608 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 04:25:48 +00:00
Weston Ruter
7f7dffafbb Customize: Fix QUnit tests after failures introduced in [41768].
Props bpayton.
Fixes #40104.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41607 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 04:23:48 +00:00