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
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
`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
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
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
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
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
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
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
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
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
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
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
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
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