37797 Commits

Author SHA1 Message Date
Sergey Biryukov
6c81f1a5f6 TinyMCE: on the toolbar drop-downs apply overflow style on the actual element with text.
Props abdullahramzan, azaozz.
Merges [42446] to the 4.9 branch.
Fixes #43090.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42552 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-23 08:30:29 +00:00
Sergey Biryukov
cc5f8c14bd Editor: change the test in user_can_richedit() to also detect when IE11 is in compatibility mode.
Props ndavison, azaozz.
Merges [42529] to the 4.9 branch.
Fixes #42503.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42551 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-23 08:17:05 +00:00
Dion Hulse
cc80848121 WPDB: Use a PCRE syntax which supports PCRE compiled between 2003 and 2006.
This fixes a PHP Warning in `wpdb::parse_db_host()` when WordPress is used with (sometimes a modern) PHP that's compiled against an ancient PCRE version.

Merges [42549] to the 4.9 branch.
Fixes #43109 for 4.9.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42550 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-23 03:39:45 +00:00
Aaron Jorbin
aee858cbc7 Remove JSHint due to license compatibility
Backports [42547] without adding new files due to how minor updates work.

JSHint inherits a license from JSLint that includes the clause "The Software shall be used for Good, not Evil." WordPress's license specifically allows grants the freedom to run the program, for any purpose. Please note, this is not an encouragement of evil. Rather than doing something evil, how about learning to love those around you. Instead of tweeting lies and saying people are "Not Good!", help your neighbor. In the words of Lin Manual Miranda, "Love is love is love is love is love is love is love is love, cannot be killed or swept aside."

This replaces JSHint with esprima, a part of the larger jQuery project, and a custom wrapper for some basic error checking within codemirror.

The existing JSHint configuration is kept in place in case someone wants to use that, but they can only do so for Good.

Fixes #42850
Props netweb for a spelling fix on a comment.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42548 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-23 03:37:13 +00:00
Weston Ruter
c353693858 Widgets: Ensure media is explicitly enqueued from Text widget in case Media widgets are unregistered.
Amends [41344].
See #40854.
Fixes #43125 for 4.9 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42546 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-22 19:27:26 +00:00
Weston Ruter
729fe1b7aa Customize: Let default status for Customizer be draft if user does not have capability to publish.
Amends [41626].
Props sayedwp, westonruter.
See #30937.
Fixes #42686 for 4.9 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42544 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-22 19:11:17 +00:00
Weston Ruter
b868dbc0f3 Customize: Prevent frontend previewing from causing a customization lock on the changeset.
Props dlh.
Amends [41839].
See #42024.
Fixes #42975 for 4.9 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42542 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-22 06:50:45 +00:00
Weston Ruter
8a4d165315 Customize: Use changeset-specific "locked" messages when branching is enabled.
Props dlh.
See #39896.
Fixes #42655 for 4.9 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42539 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-22 06:31:39 +00:00
Weston Ruter
c9bc611bec 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.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42537 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-22 06:15:54 +00:00
Weston Ruter
8265b1b36c 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.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42535 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-22 05:22:14 +00:00
Weston Ruter
a157105ca6 Widgets: Allow relative/partial URLs in Image Widget's link field.
Props audrasjb.
Amends [41252].
See #41274.
Fixes #42740 for 4.9 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42534 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-22 04:52:46 +00:00
Weston Ruter
4104ec8d44 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.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42532 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-21 08:03:25 +00:00
Sergey Biryukov
805a190886 Plugins: Update review filter links in Details modal.
Props darko-a7, afercia.
Merges [42459] to the 4.9 branch.
Fixes #43016. See #meta3379.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42524 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-17 07:01:30 +00:00
Weston Ruter
265f2bbb08 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.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42522 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-17 01:30:35 +00:00
Aaron D. Campbell
15f864489d Post 4.9.2 version bump for 4.9 branch
git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42520 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-16 23:58:04 +00:00
Dion Hulse
476ba3af29 Bump the 4.9 branch to version 4.9.2.
git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42494 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-16 21:36:18 +00:00
Sergey Biryukov
a370591924 Plugins: Fix the plugin details modal "Close" button after [42443].
Props rinkuyadav999.
Merges [42491] to the 4.9 branch.
Fixes #43082.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42493 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-16 20:57:09 +00:00
Dion Hulse
b726b22318 External Libraries: Remove unnecessary / obsoleted MediaElement.js files.
Props joemcgill.
Merges [42462] to the 4.9 branch.
Fixes #42720 for 4.9.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42465 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-16 06:40:23 +00:00
Sergey Biryukov
582ca73c4e Widgets: When checking for errors in Custom HTML widget, pass correct value to toggleClass() for Save button.
`toggleClass()` expects a boolean as a second argument, not an integer.

Props iCaleb.
Merges 42457 to the 4.9 branch.
Fixes #42867.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42458 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-15 23:50:57 +00:00
Sergey Biryukov
d12e2fb0d1 Plugins: Fix the plugin details modal in the install plugin search tab after [41356].
Props afercia.
Merges [42443] to the 4.9 branch.
Fixes #43082.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42456 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-15 23:06:37 +00:00
Sergey Biryukov
2252f005ab 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.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42455 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-15 22:49:15 +00:00
Sergey Biryukov
5793802833 Media: Add small-audio.flac for a unit test added in [42451].
Merges [42453] to the 4.9 branch.
See #42225.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42454 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-15 22:35:55 +00:00
Sergey Biryukov
b8d69fe82d Media: Add flac to the list of allowed file types.
Props blobfolio.
Merges [42451] to the 4.9 branch.
Fixes #42225.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42452 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-15 22:23:24 +00:00
Sergey Biryukov
2c91b54463 Media: Bring consistency to getimagesize() error suppression.
Props chasewg, joemcgill, jeremyfelt.
Merges [42449] to the 4.9 branch.
Fixes #42480.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42450 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-15 20:01:51 +00:00
Sergey Biryukov
e13a5ef1e2 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.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42448 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-15 19:29:37 +00:00
Dion Hulse
6935ebbaad 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.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42445 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-15 00:09:39 +00:00
Andrew Ozz
d7702426c0 Merged revision 42430 from trunk:
Editor: ensure there is a selection before getting the caret position. Fixes a bug in Firefox when there is no selection for a hidden element.

Props johnschulz, azaozz.

Fixes #43012 for 4.9.2.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42442 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-13 11:27:54 +00:00
Sergey Biryukov
58d94a05df Editor: Link suggestions: add fallback title for posts with no title.
Props afercia.
Merges [42425] to the 4.9 branch.
Fixes #42664.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42439 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-12 20:12:11 +00:00
Sergey Biryukov
e5bbe98df0 Twenty Seventeen: Remove unnecessary comment in front-page.php.
Props hardik-amipara, poena.
Merges [42437] to the 4.9 branch.
Fixes #42820.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42438 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-12 20:08:48 +00:00
Sergey Biryukov
7cb68ddcb6 Customize: Prevent nav menu location assignment checkbox change from increasing height by 1px.
Props obenland.
Amends [41817].
Merges [42152] to the 4.9 branch.
See #42157.
Fixes #42492.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42436 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-12 19:25:10 +00:00
Dion Hulse
b08417d800 Upgrade: When deleting old files, if deletion fails attempt to empty the file instead.
Props joemcgill, dd32.
Merges [42433] to the 4.9 branch.
Fixes #42963 for 4.9.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42434 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-10 06:10:59 +00:00
Rachel Baker
f7f1bd9500 General: Update copyright year to 2018 in license.txt.
Merges [42424] to the 4.9 branch.
Fixes #43007.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42428 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-06 19:31:49 +00:00
Rachel Baker
1408fa7aec EST API: Adjust unit testes to expect a 401 status code in error responses from permission callbacks when user is not authenticated.
Missed in [42421].

Merges [42423] to the 4.9 branch.
Fixes #42828.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42427 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-06 19:28:44 +00:00
Rachel Baker
601a3b07ff 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.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42422 602fd350-edb4-49c9-b593-d223f7449a82
2017-12-30 20:48:10 +00:00
Boone Gorges
32792f55b5 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.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42418 602fd350-edb4-49c9-b593-d223f7449a82
2017-12-22 02:49:55 +00:00
Weston Ruter
c6039d6e6b 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.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42391 602fd350-edb4-49c9-b593-d223f7449a82
2017-12-13 05:18:27 +00:00
Konstantin Obenland
89eaf5e34f 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.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42375 602fd350-edb4-49c9-b593-d223f7449a82
2017-12-07 02:22:55 +00:00
Boone Gorges
efdbf4ba23 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.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42372 602fd350-edb4-49c9-b593-d223f7449a82
2017-12-04 22:03:52 +00:00
Boone Gorges
aac8a92f96 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.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42371 602fd350-edb4-49c9-b593-d223f7449a82
2017-12-04 21:59:33 +00:00
Boone Gorges
85fcc21d30 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.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42370 602fd350-edb4-49c9-b593-d223f7449a82
2017-12-04 21:57:28 +00:00
Boone Gorges
04299d18e9 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.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42369 602fd350-edb4-49c9-b593-d223f7449a82
2017-12-04 21:54:15 +00:00
Konstantin Obenland
27af285dfb 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.



git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42363 602fd350-edb4-49c9-b593-d223f7449a82
2017-12-04 20:16:43 +00:00
Dion Hulse
56265b81b1 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


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42344 602fd350-edb4-49c9-b593-d223f7449a82
2017-12-01 03:06:13 +00:00
John Blackbourn
7fe9676398 Bump 4.9 branch to version 4.9.1.
git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42316 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-29 18:54:28 +00:00
John Blackbourn
cbd55a0929 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.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42267 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-29 16:10:38 +00:00
John Blackbourn
d861f5197a Hardening: Ensure the attributes of enclosures are correctly escaped in RSS and Atom feeds.
Merges [42260] to the 4.9 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42266 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-29 16:10:06 +00:00
John Blackbourn
8b9993ba82 Hardening: Add escaping to the language attributes used on html elements.
Merges [42259] to the 4.9 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42265 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-29 16:09:15 +00:00
John Blackbourn
c6c0d9753e Hardening: Use a properly generated hash for the newbloguser key instead of a determinate substring.
Merges [42258] to the 4.9 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42264 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-29 16:07:54 +00:00
John Blackbourn
618e7255b0 Post WordPress 4.9.1 Beta 1 version bump.
git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42254 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-28 18:11:15 +00:00
John Blackbourn
88e4b51aaa WordPress 4.9.1 Beta 1.
git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42253 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-28 18:00:10 +00:00