Commit Graph

37887 Commits

Author SHA1 Message Date
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