37811 Commits

Author SHA1 Message Date
Sergey Biryukov
5534acadc7 Media: Store and reuse image cropper ratio settings if available, instead of overwriting.
Props adamsilverstein.
Merges [42595] to the 4.9 branch.
Fixes #42646.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42596 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-24 21:40:09 +00:00
Sergey Biryukov
5d91d4eb94 Tests: Update emoji base URL in Tests_Formatting_Emoji after [42590].
Merges [42592] to the 4.9 branch.
See #42862.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42593 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-24 17:30:11 +00:00
Sergey Biryukov
60aee0a3f6 Emoji: Update emoji base URL in _print_emoji_detection_script() and wp_staticize_emoji().
Merges [42590] to the 4.9 branch.
Props pento.
Fixes #42862.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42591 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-24 16:53:50 +00:00
Gary Pendergast
1cc2b3f6b6 Canonical URLs: Redirect to the correct URL when the post date changes.
When a post slug is changed, we store a copy of the old slug, so that we can redirect visitors visiting the old URL to the new URL.

In the same way, this stores a copy of the old date, when the post date changes, so we can redirect visitors to the new URL.

Merge of [42401,42587,42588] to the 4.9 branch.

Props nickmomrik, frank-klein.
Fixes #15397.



git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42589 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-24 07:11:40 +00:00
Dion Hulse
78099e100f Updates: Only trigger Background Update processes from within the core update check when a core autoupdate is on offer.
This change reduces the number of API calls which WordPress makes to api.wordpress.org during release windows.

Previously the background updates would run upon every core update transient refresh, however now they'll only run if there's an update available.
The change also increases the cache period for plugin & theme checks when running via the cron, from never-cache to 2 hours, which should hopefully reduce the number of needless API calls.

Merges [42584] to the 4.9 branch.
Fixes #43103 for 4.9.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42586 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-24 04:31:40 +00:00
Sergey Biryukov
4c70e545c0 Media: Introduce a custom error handler for MediaElement.js to display a download link if a FLV file cannot be rendered for any reason.
Props Clorith.
Merges [42582] to the 4.9 branch.
Fixes #42643.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42583 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-24 01:52:17 +00:00
Sergey Biryukov
d9e63099d8 Emoji: Update emoji regex for Twemoji to 2.4.0.
Build `src/wp-includes/formatting.php` following [42566].

Props peterwilsoncc.
Merges [42579] to the 4.9 branch.
Fixes #42862.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42580 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-24 01:14:17 +00:00
Aaron Jorbin
bf3f29c4eb REST API: Add existing term_id to the error data object when attempting to create a duplicate term.
Merges [42350] into 4.9

Props shooper, coleh, rachelbaker.
Fixes #42597. See #41370.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42578 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-23 20:21:46 +00:00
Andrew Ozz
985c2976b9 Merged revision(s) 42576 from trunk:
TinyMCE: backport bug fixes to `NotificationManager` and `WindowManager` from d1877933fa (diff-2e5c98d81ce2481aa1042b2320728b65) and to `MultiRange` from 250675bb7b.

Props peterwilsoncc, azaozz.
Fixes #42722 for 4.9.3, see #43012.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42577 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-23 19:40:16 +00:00
Andrew Ozz
687ceda8c0 Merged revision 42574 from trunk:
Editor: when keeping the scroll position treat all shortcodes as preview-able. Otherwise in some cases the marker span can get stuck inside the shortcode and break the markup.

Props azaozz, lizkarkoski and othellobloke for testing.
Fixes #42908 for 4.9.3.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42575 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-23 17:47:52 +00:00
Sergey Biryukov
c2d52d4381 Media: Restore white background of the content area in media modal.
Props afercia, chetan200891.
Merges [42572] to the 4.9 branch.
Fixes #43088.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42573 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-23 14:02:37 +00:00
Sergey Biryukov
b72c2f59cf Email: Don't send notifications for site or network admin email address change to the default 'admin_email' value.
Props tigertech, MattyRob, seanchayes.
Merges [42570] to the 4.9 branch.
Fixes #42693.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42571 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-23 13:46:32 +00:00
Sergey Biryukov
156047231b Customize: Correct "Add Items" button reference in help text shown after creating a new menu.
Props dlh, munyagu, rishishah.
Merges [42568] to the 4.9 branch.
Fixes #42565.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42569 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-23 12:04:25 +00:00
Sergey Biryukov
35d955ab1c Emoji: Update Twemoji to 2.4.0.
WordPress was already on 2.5.0, but Twemoji decided to break their versioning, so 2.4.0 is actually the latest release.

Merges [42566] to the 4.9 branch.
Fixes #42862.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42567 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-23 11:50:47 +00:00
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