Commit Graph

25020 Commits

Author SHA1 Message Date
Weston Ruter
3ed6b9efd4 Customize: Prevent showing SFTP theme installation notification in multisite when user cannot install themes.
Props flixos90.
See #37661, #42184.
Fixes #42674 for 4.9 branch.

Built from https://develop.svn.wordpress.org/branches/4.9@42537


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42366 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-22 06:16:41 +00:00
Weston Ruter
2441c3c3f1 Customize: Improve accuracy of message displayed when accessing Customizer with a changeset that is already published or trashed.
Amends [38810].
Props dlh.
Fixes #42497 for 4.9 branch.

Built from https://develop.svn.wordpress.org/branches/4.9@42535


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42364 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-22 05:23:40 +00:00
Weston Ruter
2e8c881ff4 Widgets: Allow relative/partial URLs in Image Widget's link field.
Props audrasjb.
Amends [41252].
See #41274.
Fixes #42740 for 4.9 branch.

Built from https://develop.svn.wordpress.org/branches/4.9@42534


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-22 04:53:43 +00:00
Weston Ruter
0685e3e2f3 Code Editor: Disable attr-value-double-quotes HTMLHint rule since too strict for user input.
Using single-quoted attribute values is not in any way invalid HTML.

Amends [41376].
Props sasiddiqui.
See #12423.
Fixes #42802 for 4.9 branch.

Built from https://develop.svn.wordpress.org/branches/4.9@42532


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42361 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-21 08:04:43 +00:00
Sergey Biryukov
d9bf3e5e60 Plugins: Update review filter links in Details modal.
Props darko-a7, afercia.
Merges [42459] to the 4.9 branch.
Fixes #43016. See #meta3379.
Built from https://develop.svn.wordpress.org/branches/4.9@42524


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42353 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-17 07:02:41 +00:00
Weston Ruter
4c4d1ecbe5 Widgets: Prevent checkValidity from running on a form when widget is first adding to sidebar.
Amends [41352].
See #23120.
Fixes #43003 for 4.9 branch.

Built from https://develop.svn.wordpress.org/branches/4.9@42522


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42351 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-17 01:31:41 +00:00
Aaron Campbell
be9734cbee Post 4.9.2 version bump for 4.9 branch
Built from https://develop.svn.wordpress.org/branches/4.9@42520


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42349 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-16 23:59:40 +00:00
Dion Hulse
4abf1b12c9 Bump the 4.9 branch to version 4.9.2.
Built from https://develop.svn.wordpress.org/branches/4.9@42494


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42323 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-16 21:37:40 +00:00
Dion Hulse
e77f8257ea External Libraries: Remove unnecessary / obsoleted MediaElement.js files.
Props joemcgill.
Merges [42462] to the 4.9 branch.
Fixes #42720 for 4.9.

Built from https://develop.svn.wordpress.org/branches/4.9@42465


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42294 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-16 06:41:51 +00:00
Sergey Biryukov
b6d9609fa9 WPDB: Always use mysqli when available.
This change makes WordPress use `mysqli` on PHP <5.5 when available, instead of only in PHP 5.5+ and development installs.

WPDB includes a fallback to `mysql` in the event that the database connection fails with `mysqli` so incompatibilities should be few and far between.

Props dd32.
Merges [42388] to the 4.9 branch.
Fixes #42812.
Built from https://develop.svn.wordpress.org/branches/4.9@42455


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42284 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-15 22:50:39 +00:00
Sergey Biryukov
84bd75ea88 Media: Add flac to the list of allowed file types.
Props blobfolio.
Merges [42451] to the 4.9 branch.
Fixes #42225.
Built from https://develop.svn.wordpress.org/branches/4.9@42452


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42282 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-15 22:24:41 +00:00
Sergey Biryukov
9026b41b3b Media: Bring consistency to getimagesize() error suppression.
Props chasewg, joemcgill, jeremyfelt.
Merges [42449] to the 4.9 branch.
Fixes #42480.
Built from https://develop.svn.wordpress.org/branches/4.9@42450


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42280 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-15 20:02:39 +00:00
Sergey Biryukov
77ce550e5c Themes: Improve line wrapping in feature filter on Theme Install screen and in the Customizer.
Props chetan200891 for initial patch.
Merges [42447] to the 4.9 branch.
Fixes #42871.
Built from https://develop.svn.wordpress.org/branches/4.9@42448


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42278 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-15 19:30:40 +00:00
Dion Hulse
3c9f3effb0 Formatting: Do not run formatting and texturization on author bios.
Removes the formatting and texturization added to author bios in #40040 due to back-compatibility concerns.

Reverts [41172], [41173].

Props 0x6f0, rabmalin for review, peterwilsoncc.
Merges [42441] to the 4.9 branch.
Fixes #42578.

Built from https://develop.svn.wordpress.org/branches/4.9@42445


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42275 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-15 00:10:42 +00:00
Sergey Biryukov
b8ebacbf82 Editor: Link suggestions: add fallback title for posts with no title.
Props afercia.
Merges [42425] to the 4.9 branch.
Fixes #42664.
Built from https://develop.svn.wordpress.org/branches/4.9@42439


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-12 20:13:38 +00:00
Rachel Baker
25bfff959f REST API: Return the proper status code for failed permission callbacks in WP_REST_Server->dispatch().
Use the rest_authorization_required_code() function to return a 401 status code when a permission callback fails due to a user not being logged in.

Merges [42421] to the 4.9 branch.

Props jaswrks.
Fixes #42828.

Built from https://develop.svn.wordpress.org/branches/4.9@42422


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42253 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-30 20:49:40 +00:00
Boone Gorges
af4f4f860e Taxonomy: Restore deprecated argument to term_description() signature.
This ensures that the parameter can't be reused for something else
in the future.

Merges [42417] to the 4.9 branch.

Props jorbin.
Fixes #42605.

Built from https://develop.svn.wordpress.org/branches/4.9@42418


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42249 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-22 02:50:39 +00:00
Weston Ruter
160e61fddf Editor: Fix determining TinyMCE editor width when in inline mode instead of iframe mode.
See #40854.
Amends [41985].
Props aduth.
Fixes #42416 for 4.9.

Built from https://develop.svn.wordpress.org/branches/4.9@42391


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42220 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-13 05:19:40 +00:00
Konstantin Obenland
0a429ab309 Widgets: Always try restoring widget assignments
For code-historic reasons, restoring widget assignments would not be attempted if there were no sidebars to map.
Restoring previous assignments is something unrelated to sidebar mappings however, so now it will be attempted on every theme switch.

Fixes #42719.

Merges [42374] to the 4.9 branch.

Built from https://develop.svn.wordpress.org/branches/4.9@42375


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42204 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-07 02:23:45 +00:00
Boone Gorges
030f429e78 category_description() should be taxonomy-agnostic.
This change reinstates the previous de facto behavior of `category_description()`.
See [40979], [42364]. Because `term_description()` no longer passes `$taxonomy` to
`get_term_field()`, the parameter is no longer needed and has been deprecated.

Merges [42368] to the 4.9 branch.

Fixes #42605. See #42771.

Built from https://develop.svn.wordpress.org/branches/4.9@42372


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42201 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-04 22:04:42 +00:00
Boone Gorges
c637f0c94f get_the_category_by_ID() should be taxonomy-agnostic.
Prior to 4.9, this function was accidentally taxonomy-agnostic in most cases.
The fix in [40979] caused a regression in this function. For backward
compatibility, we make it explicit that the query is by ID only.

Merges [42367] to the 4.9 branch.

See #42771.

Built from https://develop.svn.wordpress.org/branches/4.9@42371


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42200 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-04 22:00:41 +00:00
Boone Gorges
aedaea9209 Fix regression in get_tag_link() since 4.9.
See [42364] for description of the problem.

Because `get_category_link()` is now totally taxonomy-agnostic, `get_tag_link()`
can become a simple wrapper.
 
Merges [42366] to the 4.9 branch.

Props juiiee8487, markjaquith.
See #42771.

Built from https://develop.svn.wordpress.org/branches/4.9@42370


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42199 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-04 21:58:42 +00:00
Boone Gorges
edb61cba2e Don't do a strict taxonomy check in get_category_link().
Prior to version 4.9, a quirk in the implementation of `get_term()` caused
`get_category_link( 123 )` to fetch the taxonomy archive link for term 123
even if 123 is not in the 'category' taxonomy. The quirk was fixed in [40979];
see #40671. This bugfix introduced a regression for theme authors who were
expecting the old behavior.

By lifting the 'category' restriction, we allow the template function to work
in the old way.

Merges [42364], [42365] to the 4.9 branch.

Fixes #42717. See #42771.

Built from https://develop.svn.wordpress.org/branches/4.9@42369


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42198 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-04 21:55:40 +00:00
Konstantin Obenland
2afecbb253 Widgets: Don't try mapping empty sidebars.
Fixes a bug where the mapping logic would try mapping empty sidebars, resulting in PHP warnings.

Props ionvv, chetan200891 for initial patch.
See #42603.

Merges [42362] to the 4.9 branch.


Built from https://develop.svn.wordpress.org/branches/4.9@42363


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42192 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-04 20:17:42 +00:00
Dion Hulse
1fdfabf74c Avoid PHP Linting errors in the Random_Compat library under PHP7.
The latest updates to the library are larger than preferred, so instead this modifies the library to lint properly.

Fixes #42439 for 4.9

Built from https://develop.svn.wordpress.org/branches/4.9@42344


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42173 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-01 03:07:42 +00:00
John Blackbourn
c4a15959f5 Bump 4.9 branch to version 4.9.1.
Built from https://develop.svn.wordpress.org/branches/4.9@42316


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42145 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-29 18:55:42 +00:00
John Blackbourn
b4a3edc859 Hardening: Remove the ability to upload JavaScript files for users who do not have the unfiltered_html capability.
Merges [42261] to the 4.9 branch.

Built from https://develop.svn.wordpress.org/branches/4.9@42267


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42096 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-29 16:12:18 +00:00
John Blackbourn
e75247a179 Hardening: Ensure the attributes of enclosures are correctly escaped in RSS and Atom feeds.
Merges [42260] to the 4.9 branch.

Built from https://develop.svn.wordpress.org/branches/4.9@42266


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-29 16:11:38 +00:00
John Blackbourn
45874b5050 Hardening: Add escaping to the language attributes used on html elements.
Merges [42259] to the 4.9 branch.

Built from https://develop.svn.wordpress.org/branches/4.9@42265


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42094 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-29 16:10:41 +00:00
John Blackbourn
ecd15e008a Hardening: Use a properly generated hash for the newbloguser key instead of a determinate substring.
Merges [42258] to the 4.9 branch.

Built from https://develop.svn.wordpress.org/branches/4.9@42264


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42093 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-29 16:08:41 +00:00
John Blackbourn
594456341d Post WordPress 4.9.1 Beta 1 version bump.
Built from https://develop.svn.wordpress.org/branches/4.9@42254


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-28 18:12:38 +00:00
John Blackbourn
ec63674dfc WordPress 4.9.1 Beta 1.
Built from https://develop.svn.wordpress.org/branches/4.9@42253


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42082 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-28 18:01:39 +00:00
John Blackbourn
4ae2ee9869 Media: Further improvements to the handling of language codes that get passed to MediaElement.
This change means that only the leading portion of a locale code gets passed to MediaElement, removing problems that arise from locales such as `de_DE_formal` and `pt_PT_ao90`.

Props erich_k4wp, blobfolio, flixos90, ocean90, joemcgill, SergeyBiryukov.

Fixes #42574

Merges [42251] to the 4.9 branch.

Built from https://develop.svn.wordpress.org/branches/4.9@42252


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42081 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-28 14:54:42 +00:00
Dion Hulse
0236fd226e Theme Editor: Translate the URL to the Child Themes Codex page.
Props odysseygate, johnpgreen.
Merges [42247] to the 4.9 branch.
Fixes #42454.

Built from https://develop.svn.wordpress.org/branches/4.9@42248


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42077 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-27 03:53:40 +00:00
Dion Hulse
9fe3e9edf0 Theme Editor: Validate files are editable based on their relative filenames, rather than full file path.
This fixes theme editing on Windows platforms where `validate_file()` will return `2` on a full file path.

Merges [42244] to the 4.9 branch.
Fixes #42609.

Built from https://develop.svn.wordpress.org/branches/4.9@42245


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42074 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-27 03:29:25 +00:00
Dion Hulse
e1095eeb9f Theme/Plugin Editor: Remove the caching added in [41806] as it causes more problems than it fixes.
While caching here seemed like a good idea in theory, in practice the cache would be often stale causing development issues.
We exclude common folders (such as `node_modules`) from the scanning to avoid directories which are not useful to the end-user, so as long as those exclusion lists are held up this shouldn't cause too much of a degredation in the future.
We may consider adding caching here again in the future if it's determined that it is really needed.

Props precies, ibenic, mariovalney, schlessera, and all the others who commented on the ticket(s).
This partually reverts [41806].
Merges [42242] to the 4.9 branch.
See #6531.
Fixes #42573 for 4.9.

Built from https://develop.svn.wordpress.org/branches/4.9@42243


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42072 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-27 03:00:38 +00:00
Dion Hulse
68cb5b6f05 WPDB: Fix the parsing of sockets which contain colons within the socket name (used on some cloud providers).
Props natacado.
Merges [42226] to the 4.9 branch.
Fixes #42634 for 4.9.

Built from https://develop.svn.wordpress.org/branches/4.9@42229


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42058 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-27 00:56:41 +00:00
Dion Hulse
6dc1dd28f5 Themes: Prevent JS error on Themes admin screen when only one theme is installed.
Amends [42029].
Props chetan200891, afercia.
See #42348, westonruter.
Merges [42222] to the 4.9 branch.
Fixes #42673.

Built from https://develop.svn.wordpress.org/branches/4.9@42223


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42052 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-24 02:56:42 +00:00
John Blackbourn
4cb8d10856 Users: Correct the value of the lang attribute in the admin area.
This corrects the value when the user's language is set to `English (United States)` but the site language is not.

Props ocean90, afercia

Fixes #42242

Merges [42220] to the 4.9 branch.

Built from https://develop.svn.wordpress.org/branches/4.9@42221


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-23 19:06:42 +00:00
John Blackbourn
97ba6be232 Docs: Correct the @since property for the page_attributes_misc_attributes action.
Props jeremyescott, jfarthing84

Fixes #42607

Merges [42203] to the 4.9 branch.

Built from https://develop.svn.wordpress.org/branches/4.9@42219


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42048 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-23 18:03:43 +00:00
Dion Hulse
cee7720939 Upgrade: Fix updating plugins which include a numeric file/folder names.
The fix in [41821] caused numeric folder names to be reindexed to 0..n when in the root directory (for example, `my-plugin/24/`).

Props edo888.
See #41524.
Merges [42214] to the 4.9 branch.
Fixes #42628 for 4.9.

Built from https://develop.svn.wordpress.org/branches/4.9@42215


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42044 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-21 04:16:41 +00:00
Dion Hulse
b09cebf575 Rewrite Rules: Correct the logic in extract_from_markers() after [41928].
Props stodorovic, SergeyBiryukov.
Merges [42199] to the 4.9 branch.
Fixes #42579. See #39920.

Built from https://develop.svn.wordpress.org/branches/4.9@42213


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42042 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-21 03:47:38 +00:00
Dion Hulse
66a3d52431 Multisite: Fix broken update blog_versions query after [41661].
Props Mista-Flo, lenasterg, flixos90.
Merges [42210] to the 4.9 branch.
Fixes #42641.

Built from https://develop.svn.wordpress.org/branches/4.9@42212


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-21 03:43:40 +00:00
Weston Ruter
85d9b63062 Bump package.json version to 4.9.1
Built from https://develop.svn.wordpress.org/branches/4.9@42197


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42027 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-16 01:16:37 +00:00
Weston Ruter
75ab7d2124 Bump version WordPress 4.9.1 alpha
Built from https://develop.svn.wordpress.org/branches/4.9@42196


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42026 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-16 01:02:39 +00:00
Weston Ruter
553d6fdbe0 Bump version for WordPress 4.9
Built from https://develop.svn.wordpress.org/branches/4.9@42195


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42025 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-16 00:12:39 +00:00
Weston Ruter
35b40d1001 Editor: Re-build tinymce.min.js after [42191].
See #42553.

Built from https://develop.svn.wordpress.org/branches/4.9@42194


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42024 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-15 23:36:39 +00:00
Weston Ruter
a5f8e0917f Editor: Disable wp_keep_scroll_position in IE11 since buggy; fix matches polyfill conflict with ME.js by doing runtime feature detection in context window.
Props westonruter, SergeyBiryukov, Clorith for testing.
See #41962, #42029.
Fixes #42553 for 4.9.

Built from https://develop.svn.wordpress.org/branches/4.9@42192


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42022 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-15 19:00:38 +00:00
Weston Ruter
73615e0bc4 File Editor: Eliminate gap inserted between code editor and heading in IE11 when CodeMirror initializes.
Props afercia, melchoyce, Clorith for testing, SergeyBiryukov for testing.
See #12423.
Fixes #42554 for 4.9.

Built from https://develop.svn.wordpress.org/branches/4.9@42190


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42020 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-15 18:31:37 +00:00
Weston Ruter
567de560e9 Customize: Prevent themes panel from auto-expanding in IE11.
In IE11 the `input` event erroneously gets triggered initially without any user input.

Amends [41648].
See #37661.
Fixes #42556 for 4.9.

Built from https://develop.svn.wordpress.org/branches/4.9@42188


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42018 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-15 18:13:40 +00:00
Weston Ruter
ff85340727 Widgets: Set global $post to current queried object instead of nullifying when is_singular() while applying filters (and shortcodes) in Text widget and (via plugin) Custom HTML widget.
Also prevent `[gallery]` shortcode from dumping out every attachment on the site when a containing Text widget is shown on an archive template.

Props westonruter, bobbingwide, joemcgill for testing.
See #10457.
Fixes #42548, #42547 for 4.9.

Built from https://develop.svn.wordpress.org/branches/4.9@42186


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42016 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-15 02:33:44 +00:00
Weston Ruter
ecf8680978 Editor: Improve scrolling behavior and prevent autosave logic from causing dirty state when just switching between Visual and Text tabs.
Props pento.
See #41962, #42029.
Fixes #42530 for 4.9.

Built from https://develop.svn.wordpress.org/branches/4.9@42184


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-15 00:22:42 +00:00
Weston Ruter
36282a2a9c About Page: Fix issue with overlapping images and text on IE11 and Edge 15.
Props Clorith, ryelle, afercia, la-geek, SergeyBiryukov.
See #42087.
Fixes #42545 for 4.9

Built from https://develop.svn.wordpress.org/branches/4.9@42182


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42012 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-14 23:04:40 +00:00
Weston Ruter
44eb69904d Post WordPress 4.9 RC3 bump.
Built from https://develop.svn.wordpress.org/branches/4.9@42180


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-14 06:51:41 +00:00
Weston Ruter
ce6b628972 WordPress 4.9 RC3.
Built from https://develop.svn.wordpress.org/branches/4.9@42179


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42009 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-14 06:08:40 +00:00
Weston Ruter
0110751ddc Editor: Cease adding paragraphs when switching editor tabs.
Fixes an error since [41783] in which extra paragraphs could be added to content when switching editor tabs.

Props pento, adamsilverstein, aduth.
Fixes #42531 for 4.9.

Built from https://develop.svn.wordpress.org/branches/4.9@42178


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42008 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-14 05:28:41 +00:00
Gary Pendergast
5e736b62e0 Editor: When switching Editor tabs, don't scroll unnecessarily.
- When switching to the Text view, wait until after the Visual editor element has been hidden, before focussing the `<textarea>`.
- When switching to the Visual view, only scroll if the cursor is not visible on the current screen.

Merge of 52175 to the 4.9 branch.

Fixes #42530.


Built from https://develop.svn.wordpress.org/branches/4.9@42176


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42006 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-14 05:21:39 +00:00
Weston Ruter
eb18399c10 About: Fix jumping behavior for titles and columns when scrolling.
Props ryelle.
See #42087.
Fixes #42514, #42526 for 4.9.

Built from https://develop.svn.wordpress.org/branches/4.9@42174


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42004 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-13 22:48:36 +00:00
Weston Ruter
c268b2f28c Customize: Allow notifications for linting errors in code editor control (for Additional CSS) to be overridden to allow saving.
Implements the same override that was implemented in [41721] for the theme/plugin editors.

See #41897, #41887.
Fixes #42528 for 4.9.

Built from https://develop.svn.wordpress.org/branches/4.9@42172


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42002 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-13 22:47:12 +00:00
Weston Ruter
15b14c30c1 Customize: Prevent PHP notice on theme-switch dashboard welcome link (and link to themes admin screen) when user cannot customize.
Props skostadinov, ocean90.
Amends [41699].
See #42050.
Fixes #42525 for 4.9.

Built from https://develop.svn.wordpress.org/branches/4.9@42170


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42000 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-13 22:45:47 +00:00
Dominik Schilling
0d7f326477 Build: Add npm-shrinkwrap.json.
For compatibility with the build server `fsevent` has been manually removed.

Props netweb.
See #42483.
Built from https://develop.svn.wordpress.org/branches/4.9@42168


git-svn-id: http://core.svn.wordpress.org/branches/4.9@41998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-13 22:44:24 +00:00
Dominik Schilling
062ab0b0c8 Revert [42166].
Due to running `npm install` an updated `npm-shrinkwrap.json` file was committed.

See #42483.
Built from https://develop.svn.wordpress.org/branches/4.9@42167


git-svn-id: http://core.svn.wordpress.org/branches/4.9@41997 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-13 22:43:42 +00:00
Weston Ruter
46c75fbaf7 I18N: Fix passing singular/plural strings to JS.
This is a temporary solution while waiting for full I18N support in JS.

Props ocean90, dd32, westonruter, Mirucon for testing.
Amends [41376], [41721], [41389].
See #20491.
Fixes #42510 for 4.9.

Built from https://develop.svn.wordpress.org/branches/4.9@42164


git-svn-id: http://core.svn.wordpress.org/branches/4.9@41995 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-13 07:09:35 +00:00
Weston Ruter
11e007c502 About: Add vertical alignment for developer happiness sections.
Also run CSS autoprefixer to add `-ms-` prefixes for CSS grid identifiers for IE11.

Props Presskopp.
Amends [42121].
See #42087.
Fixes #42524 for 4.9.

Built from https://develop.svn.wordpress.org/branches/4.9@42162


git-svn-id: http://core.svn.wordpress.org/branches/4.9@41993 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-13 05:49:36 +00:00
Weston Ruter
b0c557fbb2 About: Fix grammar typo with pluralization.
Props metodiew, westonruter.
Amends [42121].
See #42087.
Fixes #42476 for 4.9.

Built from https://develop.svn.wordpress.org/branches/4.9@42160


git-svn-id: http://core.svn.wordpress.org/branches/4.9@41991 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-13 05:20:36 +00:00
Weston Ruter
277261edeb About: Synchronize 4.9 tagline across about pages for credits, freedoms, and privacy.
Props dave.pullig.
Amends [41943].
See #42087.
Fixes #42518 for 4.9.

Built from https://develop.svn.wordpress.org/branches/4.9@42158


git-svn-id: http://core.svn.wordpress.org/branches/4.9@41989 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-12 20:00:37 +00:00
Weston Ruter
1b39843b11 Theme Editor: Fix styling of child theme notice.
Props westonruter, melchoyce, ndiego.
See #24048.
Fixes #42491 for 4.9.

Built from https://develop.svn.wordpress.org/branches/4.9@42156


git-svn-id: http://core.svn.wordpress.org/branches/4.9@41987 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-11 20:44:38 +00:00
Weston Ruter
6cc5d01d17 Customize: Restore ability to add Custom Link nav menu items for jump links and other URLs that were previously allowed.
Simplify regular expression for checking URL validity to just do basic checks to confirm the value looks like a URL. Leave the complete validation to the server-side logic in `WP_Customize_Nav_Menu_Item_Setting::sanitize()` to avoid having to maintain two separate codebases for validating URLs.

Props westonruter, SergeyBiryukov for testing.
Amends [41697].
See #32816.
Fixes #42506 for 4.9.

Built from https://develop.svn.wordpress.org/branches/4.9@42154


git-svn-id: http://core.svn.wordpress.org/branches/4.9@41985 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-10 23:43:39 +00:00
Weston Ruter
523fcaca2e Customize: Ensure customization drafts are published instead of trashed when scheduled changeset goes live while non-admin user is authenticated (such as during WP Cron).
Props designsimply for testing, dlh for testing, melchoyce for testing.
See #28721, #34923, #42220.
Fixes #42489 for 4.9.

Built from https://develop.svn.wordpress.org/branches/4.9@42149


git-svn-id: http://core.svn.wordpress.org/branches/4.9@41980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-10 22:45:38 +00:00
Weston Ruter
a647fbead2 Settings: Replace count() call with empty() in get_settings_errors() to prevent PHP 7.2 warnings when $wp_settings_errors is null.
Props pross, dd32, westonruter.
See #40109.
Fixes #42498 for 4.9.

Built from https://develop.svn.wordpress.org/branches/4.9@42147


git-svn-id: http://core.svn.wordpress.org/branches/4.9@41978 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-10 22:32:47 +00:00
Weston Ruter
389166f9aa Customize: Ensure autosave revision is dismissed immediately after implicit restoration notice dismissal as done with explicit notice dismissal.
Fixes issue where a drafted/scheduled changeset could inadvertently re-use the previous autosave revision in the preview while a user expects it to have been dismissed.

See #39896, [41597].
Fixes #42502 for 4.9.

Built from https://develop.svn.wordpress.org/branches/4.9@42145


git-svn-id: http://core.svn.wordpress.org/branches/4.9@41976 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-10 21:45:38 +00:00
Weston Ruter
af74789be0 Widgets: Style the Image Widget's link field as invalid when a bad URL is supplied.
Fixes issue where user may supply an invalid URL and be unable to save the widget on the Widgets admin screen without being told why.

Amends [41252].
See #41274.
Fixes #42488 for 4.9.

Built from https://develop.svn.wordpress.org/branches/4.9@42141


git-svn-id: http://core.svn.wordpress.org/branches/4.9@41972 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-10 01:29:40 +00:00
Weston Ruter
ca12fb6710 Customize: Fix reliability of just-in-time publishing for changesets that miss their schedule when visiting customize.php.
When just doing `wp_publish_post()` for the changeset from `customize.php`, any option-based settings will fail to get saved because `WP_Customize_Manager` would have already been loaded with `settings_previewed`, resulting in `update_option()` calls being short-circuited. So an admin-ajax request to `customize_save` is used to work around this.

Props westonruter, jeremyfelt, dlh for testing, LittleBigThing for testing.
Amends [41626].
See #28721, #39221.
Fixes #42457 for 4.9.

Built from https://develop.svn.wordpress.org/branches/4.9@42139


git-svn-id: http://core.svn.wordpress.org/branches/4.9@41970 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-09 04:45:38 +00:00
Weston Ruter
707a3196f7 Customize: Ensure autosaving message gets sent to preview after initial change when saved state is first dirty.
Amends [41667].
Fixes #42475 for 4.9.

Built from https://develop.svn.wordpress.org/branches/4.9@42137


git-svn-id: http://core.svn.wordpress.org/branches/4.9@41968 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-09 04:21:40 +00:00
Weston Ruter
e6a91f7ccf Settings: Fix date/time format previewing.
Props afercia.
Amends [41857].
Fixes #41603 for 4.9.

Built from https://develop.svn.wordpress.org/branches/4.9@42135


git-svn-id: http://core.svn.wordpress.org/branches/4.9@41966 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-09 03:57:36 +00:00
Weston Ruter
bbef4fd178 Customize: Restore search icon to available widgets pane incorrectly removed in [41893].
See #42215.
Fixes #42472 for 4.9.

Built from https://develop.svn.wordpress.org/branches/4.9@42133


git-svn-id: http://core.svn.wordpress.org/branches/4.9@41964 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-09 01:06:34 +00:00
Weston Ruter
59fdb7a220 Post WordPress 4.9 RC2 bump.
Built from https://develop.svn.wordpress.org/trunk@42125


git-svn-id: http://core.svn.wordpress.org/trunk@41956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-07 05:26:47 +00:00
Weston Ruter
f76b491135 WordPress 4.9 RC2.
Built from https://develop.svn.wordpress.org/trunk@42124


git-svn-id: http://core.svn.wordpress.org/trunk@41955 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-07 04:54:47 +00:00
Konstantin Obenland
4eda9c7388 About: Hardcoded image sources.
We're committed to these images now.

See #42087.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41954 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-07 04:26:48 +00:00
Weston Ruter
e4fe01e2b4 Customize: Fix logic inversion in [42113] which prevented themes from being installed in Customizer.
Also fix PHP notice related to parent themes and WordPress.org theme query results.

Props dd32, obenland, celloexpressions, westonruter, atachibana for testing.
See #42406, #37661.
Fixes #42442.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41953 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-07 04:17:47 +00:00
Mel Choyce
2382232692 About Page: Implement design.
Props ryelle, karmatosed, transl8or, obenland, melchoyce.
See #42087.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-07 04:11:47 +00:00
Gary Pendergast
8255d04abb WPDB: Check that AUTH_SALT is not empty.
In `wpdb::placeholder_escape()`, the key for `hash_hmac()` defaults to `AUTH_SALT`, but `hash_hmac()` will return an empty string if the key is empty.

This had the side effect of the string `{}` being incorrectly replaced with a `%` character in queries just about to be run on the database.

Props jsonfry.
Fixes #42431.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41949 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-07 01:09:47 +00:00
Gary Pendergast
002d65112f WPDB: Fix a PHP notice when AUTH_SALT is undefined.
In `wpdb::placeholder_escape()`, the key for `hash_hmac()` falls back to `rand()` when `AUTH_SALT` is undefined. `hash_hmac()` requires the key to be a string, however, so we need to cast it as such.

Props mkomar.
Fixes #42401.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41948 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-07 00:30:46 +00:00
Weston Ruter
a74afff787 Customize: Prevent customize_autosaved=on from getting added to frontend preview URLs.
Amends [41969].
See #39896, #42450.
Fixes #42433.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41947 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-06 23:11:53 +00:00
Weston Ruter
c15b2a0908 Customize: Fall back to ISO date format for date/time control inputs if year, month, or day are missing from the date_format option.
Amends [42111].
Props dlh, westonruter.
Fixes #42394.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41946 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-06 20:28:48 +00:00
John Blackbourn
b8de3548d3 Administration: Ensure the new Privacy Policy screen appears when within the Network Admin and User Admin.
Props hnle, dd32
Fixes #42443

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


git-svn-id: http://core.svn.wordpress.org/trunk@41945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-06 18:17:54 +00:00
Konstantin Obenland
65c1468ff5 File Editors: Account for network admin use
Fixes a bug where files couldn't be accessed in multisite installs.

Props flixos90, westonruter.
Fixes #42420.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41944 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-03 18:51:49 +00:00
Weston Ruter
76e01c3562 Customize: Ensure changeset_uuid param for autosave auto-draft gets stripped from location after previewing theme switch when not in branching mode.
Amends [41597].
See #39896.
Fixes #42415.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41943 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-03 17:37:52 +00:00
Weston Ruter
d0608c5585 Customize: Make sure theme switch blocking in the Customizer is consistently applied when changeset is drafted/scheduled.
* Consider both `selectedChangesetStatus` and `changesetStatus` states when deciding to disable.
* Factor out common logic into `canSwitchTheme` function on `ThemesPanel`.
* Keep Live Preview and Install buttons disabled in Themes controls and detail overlays when appropriate.

Props westonruter, dlh.
Amends [41788].
See #42126, #37661, #39896.
Fixes #42406.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41942 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-03 00:59:47 +00:00
Weston Ruter
83c29a4d08 Theme Editor: Ensure files listed recursively can be both viewed and edited.
Prevent edits to 2-level deep theme files from returning a `disallowed_theme_file` error when attempting to save an edit. Aligns logic for gathering `$allowed_files` in `theme-editor.php` for listing files with the validation logic in `wp_edit_theme_plugin_file()`.

Amends [41806].
See #6531.
Fixes #42425.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41941 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-02 23:05:48 +00:00
Weston Ruter
ef272167c4 Customize: Present the date/time control input fields in the same format (and order) as date_format.
Props westonruter, obenland, atachibana for testing, Mirucon for testing.
See #42373, #28721.
Fixes #42394.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41940 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-02 23:00:49 +00:00
Konstantin Obenland
99c19a5a82 Codemirror: Unify line endings in csslint.js
This is likely a problem caused upstream and will probably be a non-issue once #41870 is merged in a future release.

Fixes #42424.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41939 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-02 22:31:47 +00:00
Weston Ruter
8902ddba18 Customize: Always use underlying changeset post date as initial date in scheduled date fields if date is future.
Prevent user from having to re-enter the previously-supplied future date if they had switched from schedule to draft but wanted to switch back again. Improves parity with behavior of post edit screen.

Props dlh, westonruter, obenland.
See #39896, #28721.
Fixes #42413.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41938 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-02 20:00:48 +00:00
Weston Ruter
fbee634ac7 Customize: Prevent history.replaceState() and history.pushState() calls from causing error in customize preview before DOM ready.
Amends [41597].
See #39896.
Fixes #42414.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41937 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-02 19:27:47 +00:00
Weston Ruter
5f16c57782 Customize: Prevent re-importing starter content when changeset is saved as draft or scheduled.
Themes cannot currently be switched in Customizer after changeset is saved anyway.

Props dlh, westonruter.
See #40146, #42411, #42126.
Fixes #42395.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41936 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-02 19:00:54 +00:00
Weston Ruter
7deb33b386 Bundled Themes: Fix fragile update-theme phpunit test which broke after version updates in [42105].
See #42090.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41935 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-02 01:26:48 +00:00
David A. Kennedy
7b74056cf5 Bundled Themes: Bump version numbers and update changelogs for 4.9 release
* Also, updates POT files for Twenty Ten and Twenty Eleven.

Props lemacarl, maedahbatool, mrahmadawais, davidakennedy.

Fixes #42090.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41934 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-01 22:43:47 +00:00
Weston Ruter
926f2114f0 Customize: Strip zero padding when setting month to prevent de-selection; add zero-padding for number input fields when blurring.
Amends [42042].
See #42373.
Fixes #42392.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41933 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-01 21:04:53 +00:00
Gary Pendergast
a2693fd860 Database: Restore numbered placeholders in wpdb::prepare().
[41496] removed support for numbered placeholders in queries send through `wpdb::prepare()`, which, despite being undocumented, were quite commonly used.

This change restores support for numbered placeholders (as well as a subset of placeholder formatting), while also adding extra checks to ensure the correct number of arguments are being passed to `wpdb::prepare()`, given the number of placeholders.

See #41925.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41885 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-31 12:00:49 +00:00
Weston Ruter
6f2db8ea69 Post WordPress 4.9 RC1 version bump.
Built from https://develop.svn.wordpress.org/trunk@42050


git-svn-id: http://core.svn.wordpress.org/trunk@41884 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-31 04:32:48 +00:00
Weston Ruter
84c6d74a8c WordPress 4.9 RC1.
Built from https://develop.svn.wordpress.org/trunk@42049


git-svn-id: http://core.svn.wordpress.org/trunk@41883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-31 03:42:49 +00:00
Weston Ruter
8a1dc558a1 Customize: Consolidate sourcing of control params.
Prevent needlessly iterating over `controlConstructor` to find `type` when it is already supplied.

Amends [41750], [41726].
See #42083.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41882 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-31 02:59:47 +00:00
Adam Silverstein
274792f9cd REST API: JS client - Enumerate endpoints supporting trash.
Improve the logic determining which endpoints support the trash by enumerating them. Endpoints that don't support the trash require `force=true` when deleting. The previous approach relied on the `force` argument description, which is a translated string and was fragile. In the future, we can expose whether an endpoint supports the trash as part of its schema and automate this logic.

Props Soean.
Fixes #40672.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41881 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-31 02:54:48 +00:00
Konstantin Obenland
b61de38e87 Customize: Spiff up theme updates
Fixes UI bugs around theme updates in the Customizer. Theme versions now get updated and users are no longer left alone after a successful update.

Props rinkuyadav999, celloexpressions for initial patch.
Fixes #42365.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41880 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-31 01:33:47 +00:00
Gary Pendergast
8981414082 About page: Tweak the privacy policy language, for clarity.
See #40794.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41879 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-31 00:21:49 +00:00
Mel Choyce
f7aa0e24a7 About Page: Update the blurb in "Warning: Potential Danger Ahead!" to be more accurate.
Props transl8or, karmatosed, chanthaboune.
See #42087.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41878 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-30 20:58:50 +00:00
Felix Arntz
82c6a301f2 Multisite: Pass network object instead of ID to pre_get_main_site_id.
In the original function introduced in [41380], and subsequently [41861], only the network ID was passed to the new `pre_get_main_site_id` filter. In order to make give quick access to other network properties, it was decided to pass the whole object instead. The changeset includes an additional test.

Fixes #29684.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-30 19:56:47 +00:00
Weston Ruter
ca84147401 Customize: Allow 0:00-0:59 in date/time control when 24-hour time used.
* Let min hour be 0 and max be 23 in 24-hour time; let min hour be 1 and max be 12 in 12-hour time.
* Show error notification when an invalid date value is provided, not just when not a future date.
* Fix translation of custom validity message.
* Start checking for validity after all inputs have been initially populated.
* Remove support for being able to enter 24:00.
* Cease forcing date input elements from being casted to integers, to allow for invalid inputs to be detected.

Props westonruter, Presskopp, peterwilsoncc, atachibana for testing.
See #39896, #28721.
Fixes #42373.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-30 16:40:47 +00:00
Weston Ruter
285c6a57c8 Tests: Remove references to deleted JS files in QUnit tests.
Amends [41570], [40584].
See #41755, #40690.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41875 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-30 04:06:48 +00:00
Weston Ruter
fbb0b8bc8f Customize: Debounce requests for theme searches and the updating of the resulting filter count.
Props celloexpressions.
See #37661.
Fixes #42343.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41874 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-30 03:57:52 +00:00
Weston Ruter
9a18c87e0c Customize: Fix phpdoc for params in WP_Customize_Manager::add_section().
Amends [40804].
See #39671.
Fixes #42372.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41873 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-29 03:22:49 +00:00
Weston Ruter
5fc9fddccc Customize: Fix interface alignment between Setting and Control, adding defaults to wp.customize.Setting and using wp.customize.previewer as default previewer param.
Also move jsdoc from class to `initialize` method and correct the param types.

Amends [41726], [42037], [32681].
See #42083, #30737.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41872 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-29 03:08:53 +00:00
Weston Ruter
35172737ef Customize: Support instantiation of partials with flat/unwrapped params for parity with controls, sections, and panels in [41726].
* Passing `options.params` when constructing `Partial` is now deprecated in favor of just passing `options`.
* Improve usage of jsdoc in JS `Partial` class.
* Also add `defaults` property to `wp.customize.selectiveRefresh.Partial` class for parity with `Control`.

See #42083.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-29 00:15:53 +00:00
Weston Ruter
cb7483b595 Customize: Fix mobile placement of panes for available widgets and nav menu items.
Props Mahvash-Fatima.
Amends [41893].
See #42215.
Fixes #42359.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41870 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-28 06:54:47 +00:00
Weston Ruter
84b969efea Customize: Ensure id for section and panel is passed among params to respective templates.
Fixes issue where JS-added Publish Settings section failed to get container element ID set properly to hide its section-meta.

Amends [42025].
See #42337, #42083.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41869 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-28 06:37:47 +00:00
Weston Ruter
685e3c1a67 Customize: Deprecate nav menu classes that are no longer used, instead of removing them immediately.
* Deprecate PHP classes `WP_Customize_New_Menu_Section` and `WP_Customize_New_Menu_Control`.
* Deprecate JS class `wp.customize.Menus.NewMenuControl`.
* Also introduce `wp.customize.Menus.createNavMenu()` for logic to create nav menus separately from the logic for handling UI interactions.

Amends [41768].
See #40104, #42364.
Fixes #42357.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-28 05:48:47 +00:00
Weston Ruter
9dca5ae189 Customize: Fix deep-linking to sections for themes via autofocus[section] query parameter.
* Expand containing panel when expanding themes section.
* Consolidate UI changes related to a section's expanded state change.
* Prevent collapsing current section when expanding.
* Auto-expand first themes section when expanding panel if one is not expanded already.

See #37661, #42354.
Fixes #42360.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41867 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-28 05:22:46 +00:00
Gary Pendergast
615a9afab8 Tests: Update wp-api-generated.js.
[41979] caused a change in `wp-api-generated.js`, so it needs to be updated.

See #39996.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41866 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-28 01:56:46 +00:00
Weston Ruter
d348f1624b Customize: Improve Media control accessibility and compatibility for settings passed as arrays or as solitary setting.
* Eliminate Media control template from having dependency on `params.settings.default` for element ID, to fix compat with `params.settings` array or single `params.setting`. See #36167.
* Move description out of label and add `aria-describedby` to Media control's Select button. See #30738, #33085.
* Obtain notification container whenever content is (re-)rendered (such as for Media control). See #38794.
* Re-render notifications after control content is re-rendered, if control is in expanded section. See #38794.

Amends [41390].
See #36167, #38794, #33085, #30738.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41865 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-27 20:18:47 +00:00
Weston Ruter
cb877e10ba Widgets: Prevent showing underlying attachment excerpt as caption when empty caption value is supplied in Image widget.
Allow underlying attachment to display if `caption` is `null`.

Props miyauchi, westonruter.
See #39993.
Fixes #42350.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41864 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-27 05:05:51 +00:00
Weston Ruter
7b0de1f1b0 Themes: Switch back from throttling to debouncing in theme searches on admin screen.
Start debouncing after initial search performed when `search` query param is present to prevent initial "flash of unsearched themes".

Props afercia, westonruter.
Amends [41797].
See #40254.
Fixes #42348.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41863 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-27 03:31:53 +00:00
John Blackbourn
c6fd6b0374 External Libraries: Remove usage of each() from the Text_Diff_Engine_native class.
This removes deprecated notices in PHP 7.2 but takes a different approach to the upstream class from Horde, which appears to be buggy.

Props SergeyBiryukov
Fixes #41526

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


git-svn-id: http://core.svn.wordpress.org/trunk@41862 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-26 12:52:53 +00:00
John Blackbourn
4550ef5b2c External Libraries: Remove usage of text strings in assert() in the Text_Diff_Engine_native class.
See #41526

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


git-svn-id: http://core.svn.wordpress.org/trunk@41861 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-26 11:32:48 +00:00
Konstantin Obenland
db00af7cc2 Menus: Add menu-$i slugs to mapping groups
Helps to future proof the feature.
Also orders slugs by popularity to optimize mapping time.

See #39692.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41860 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-25 22:29:49 +00:00
Weston Ruter
a6af74ec32 Customize: Register the Publish Settings section in JS to ensure it does not get unregistered via PHP.
The `publish_settings` section is a fundamental dependency for Customizer, so it must be guaranteed to be registered.

Also unconditionally register core types for panels, sections, and controls in case plugin unhooks all `customize_register` actions.

See #39896.
Fixes #42337.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41859 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-25 21:45:49 +00:00
Weston Ruter
3ed6bbf4a4 Customize: Link elements prior to embedding to prevent possible errors when a control is associated with a non-existent section.
Fixes issue specifically with attempting to access an orphaned control's `elements` immediately after it has been added. Normally this would not happen because a control would not be registered without a section, and also a control should only be interacted with once its `embedded` deferred has been resolved.

Also harden logic for gathering list of deferred setting IDs.

See #37964.
Fixes #42330.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41858 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-25 16:49:49 +00:00
Sergey Biryukov
6b3b489a5d Permalinks: Change mention of URI to URL in the description of %category% tag.
Props danieltj, tobifjellner.
Fixes #42147.
Built from https://develop.svn.wordpress.org/trunk@42023


git-svn-id: http://core.svn.wordpress.org/trunk@41857 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-25 11:11:45 +00:00
John Blackbourn
7fc62bbd4f External Libraries: Revert [41633]. This causes warnings when editing and viewing certain revisions.
See #41526

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


git-svn-id: http://core.svn.wordpress.org/trunk@41856 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-25 09:56:53 +00:00
Weston Ruter
6794fd18ef Post WordPress 4.9 Beta 4 version bump.
Built from https://develop.svn.wordpress.org/trunk@42021


git-svn-id: http://core.svn.wordpress.org/trunk@41855 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-25 07:08:52 +00:00
Weston Ruter
f6bf73792c WordPress 4.9 Beta 4.
Built from https://develop.svn.wordpress.org/trunk@42020


git-svn-id: http://core.svn.wordpress.org/trunk@41854 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-25 06:13:47 +00:00
David A. Kennedy
750098da21 Bundled Themes: Make sure new gallery widgets look good in themes
Twenty Ten: Reduces image size and removes image borders for galleries in widget areas.
Twenty Eleven: Reduces image size and removes image borders for galleries in widget areas.
Twenty Twelve: Reduces image size for some gallery sizes in widget areas.
Twenty Thirteen: Ensure proper clearing for images, hide captions for some gallery column combos and ensure good display for galleries in widget areas.
Twenty Fourteen: Ensure proper clearing for images and hide captions for some gallery column combos for galleries in widget areas.
Twenty Seventeen: Hide captions for some gallery column combos for galleries in widget areas.

Props joyously, williampatton, davidakennedy, melchoyce, crunnells.

Fixes #41969.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-25 02:17:47 +00:00
Weston Ruter
d19c79fa21 Customize: Remove theme_installing notification when installation fails.
Amends [41648].
Props celloexpressions.
See #42184, #37661.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41852 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-25 01:14:46 +00:00
Gary Pendergast
3cd984f024 About page: The link URLs in the privacy policy shouldn't be translatable.
Both of these URLs live on the main wordpress.org site, not Rosetta sites.

See #40794.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-25 01:07:47 +00:00
iandunn
2762709d2a Dashboard: Strip ports from IPs to avoid PHP warnings.
Fixes #41083.
Props pento, iandunn, EatonZ, birgire, dd32.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41850 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-25 00:07:46 +00:00
Weston Ruter
12c626c82e Update $_old_files to add the deleted MediaElement.js files when it was upgraded from 2.22.0 to 4.2.3.
Amends [41198].
See #39686.
Fixes #42097.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41849 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-25 00:02:50 +00:00
Sergey Biryukov
116e4712cb I18N: Use a consistent pattern for translator comments for placeholders in the string added in [42013].
See #41974.
Built from https://develop.svn.wordpress.org/trunk@42014


git-svn-id: http://core.svn.wordpress.org/trunk@41848 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 23:40:46 +00:00
Mel Choyce
7495a110cc Code Editors: Add a persistent notification on CSS files, encouraging people to use the CSS panel in the Customizer instead of editing their CSS files directly.
Props helen, westonruter, nic.bertino, michelleweber.
Fixes #42100.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41847 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 23:35:46 +00:00
Weston Ruter
d96b7af890 Permalinks: Fix placement of structure tags based on last cursor position.
Props felipeelia, afercia.
See #29872.
Fixes #42042.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41846 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 23:27:48 +00:00
John Blackbourn
2f3e91028a Filesystem API: Add more specificity to the rules for valid files in validate_file().
This now treats files containing `./` as valid, and also treats files containing a trailing `../` as valid due to widespread use of this pattern in theme and plugin zip files.

Adds tests.

Props Ipstenu, borgesbruno, DavidAnderson, philipjohn, birgire
Fixes #42016, #36170

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


git-svn-id: http://core.svn.wordpress.org/trunk@41845 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 23:15:49 +00:00
John Blackbourn
16cfe96580 Filesystem API: Don't immediately return an error for invalid file names contained within a Zip while it's being extracted.
This allows the extraction of the rest of the valid files within the archive to continue.

See #42016

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


git-svn-id: http://core.svn.wordpress.org/trunk@41844 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 23:11:50 +00:00
Weston Ruter
48e726bbef Embeds: Improve consistency of update and refresh logic for oEmbed caching between oembed_cache and post meta.
* Allow updating oEmbed cache during `parse-embed` requests for non-post editors (such as widgets).
* Update any existing `oembed_cache` post when `usecache` and TTL has passed.
* Do not overwrite a previously valid cache with `{{unknown}}`.

Props dlh.
See #34115.
Fixes #42310.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 23:10:48 +00:00
Sergey Biryukov
5dd45b38c8 Transients: After [41963], add missing cron task for delete_expired_transients().
Props dlh.
Fixes #41699.
Built from https://develop.svn.wordpress.org/trunk@42008


git-svn-id: http://core.svn.wordpress.org/trunk@41842 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 23:00:47 +00:00
John Blackbourn
4812370aab Docs: Improve the docs for validate_file() and validate_file_to_edit().
See #42016, #36170, #41017

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


git-svn-id: http://core.svn.wordpress.org/trunk@41841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 22:50:49 +00:00
Sergey Biryukov
29d5ee851c I18N: Use a consistent pattern for translator comments for placeholders in some more Customizer strings.
See #41974.
Built from https://develop.svn.wordpress.org/trunk@42006


git-svn-id: http://core.svn.wordpress.org/trunk@41840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 22:47:46 +00:00
Sergey Biryukov
f156f90ff5 I18N: Add a context for remaining "Schedule" strings.
Props Mirucon.
Fixes #42165.
Built from https://develop.svn.wordpress.org/trunk@42005


git-svn-id: http://core.svn.wordpress.org/trunk@41839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 22:35:47 +00:00
David A. Kennedy
55c8978f1f Twenty Seventeen: Make gallery link styles consistent in all widget areas
Removes the box shadow on gallery links in footer widget areas so they're consistent with the sidebar widget area.

Props transl8or, sami.keijonen, davidakennedy.

Fixes #42302.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41838 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 21:53:51 +00:00
Weston Ruter
a1ec65b695 Themes: Harmonize list of theme features on Theme Install screen with list in the Customizer.
Use the core list, rather than the .org API, due to inconsistencies and to ensure tags are translated.

Props celloexpressions.
See #37661, #42306.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41837 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 21:46:47 +00:00
Sergey Biryukov
50c6a55fba I18N: Give context to "Installed" string added in [41648].
Props dimadin.
Fixes #42325.
Built from https://develop.svn.wordpress.org/trunk@42002


git-svn-id: http://core.svn.wordpress.org/trunk@41836 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 21:43:47 +00:00
Weston Ruter
fd2e006968 Widgets: Limit container-constraining logic in Text widget to video, iframe, object, and embed elements.
Amends [41779].
See #40854.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41835 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 21:32:46 +00:00
Joe Hoyle
bebb0b0d82 REST API: Don’t remove unregistered properties from objects in schema.
In r41727 the ability to sanitise and validate objects from JSON schema was added, with a whitelist approach. It was decided we should pass through all non-registered properties to reflect the behaviour of the root object in register_rest_route. To prevent arbitrary extra data via setting objects, we force additionalProperties to false in the settings endpoint.

See #38583.
Built from https://develop.svn.wordpress.org/trunk@42000


git-svn-id: http://core.svn.wordpress.org/trunk@41834 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 21:05:49 +00:00