Commit Graph

39239 Commits

Author SHA1 Message Date
Sergey Biryukov 44ce02e28a PHPCS: Fix formatting issues introduced in [44670].
See #44914.

git-svn-id: https://develop.svn.wordpress.org/trunk@44672 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-21 19:56:47 +00:00
Felix Arntz 50d4abc949 Bootstrap/Load: Ensure that the fatal error shutdown handler does not prevent other shutdown handlers from being called.
This changeset adds support for a new `wp_die()` argument `exit`, which defaults to true and determines whether `wp_die()` should actually terminate the request. The new fatal error handler then calls `wp_die()` with that argument set to false, as calling `die()` or `exit` from a PHP shutdown function prevents other shutdown functions from being called.

Props schlessera, johnbillion.
Fixes #46038. See #44458.


git-svn-id: https://develop.svn.wordpress.org/trunk@44671 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-21 19:09:23 +00:00
Sergey Biryukov 8fe01c0621 Post Formats: Prevent Bulk Edit from unintentionally changing post format to Standard even if set to "No change".
Correct the logic in [41187].

Props birgire, mukesh27, lanche86.
Fixes #44914. See #41396.

git-svn-id: https://develop.svn.wordpress.org/trunk@44670 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-21 18:04:55 +00:00
laurelfulford 95c496b39e Twenty Seventeen: Prevent YouTube videos from being cut off in Safari.
The theme's `object-fit: cover` styles for the header caused YouTube videos to be positioned too far left in Safari. 

Fixes #40522.



git-svn-id: https://develop.svn.wordpress.org/trunk@44669 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-21 18:02:58 +00:00
Jonathan Desrosiers c0a1cf27e6 Privacy: Include request counts inline with the filters in the list table views.
Fixes $44952
Props eArtboard, pratikkry, birgire, garrett-eclipse.

git-svn-id: https://develop.svn.wordpress.org/trunk@44668 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-21 17:35:00 +00:00
Sergey Biryukov 59e31e0e4d Docs: Correct type and description for the first parameter of `set-screen-option` filter.
Props pbiron, burhandodhy.
Fixes #44850.

git-svn-id: https://develop.svn.wordpress.org/trunk@44667 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-21 16:07:40 +00:00
Felix Arntz 562ef09446 Bootstrap/Load: Support `WP_Error` and `$args` passed to `wp_die()` consistently in all handlers.
Prior to this change, each `wp_die()` handler had their own logic for how to parse arguments, causing inconsistencies and even breakage because the arguments possible to pass to `wp_die()` depended on the request context. Passing a `WP_Error` as `$message` for example used to be only support by the default handler, but not the AJAX and XML-RPC handlers.

With the fatal error protection, plus the new `wp_die()` handlers related to that, improving this support and compatibility has become more significant. Therefore this changeset introduces a private `_wp_die_process_input()` function that handles all function parameters consistently.

Props spacedmonkey, flixos90, schlessera.
Fixes #45933. See #44458.


git-svn-id: https://develop.svn.wordpress.org/trunk@44666 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-21 16:01:53 +00:00
Sergey Biryukov 8b4330bb6e I18N: Update translator comment for the notice displayed when viewing the block editor with JavaScript disabled.
A URL in the comment creates an impression that the link is not translatable.

See #45453, #45856.

git-svn-id: https://develop.svn.wordpress.org/trunk@44665 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-21 13:53:33 +00:00
Gary Pendergast b7794e63ce Dev Tools: Load the `wp-admin` build instructions from `src`.
This de-duplicates the content, so it only needs to be modified in one place.

Additionally, we now link to the NPM/Grunt install guides on the build instructions page.

Props pento, ocean90.
Fixes #43732.



git-svn-id: https://develop.svn.wordpress.org/trunk@44664 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-21 04:59:55 +00:00
Gary Pendergast 5d7089f5bf Terms: Show error colours when a term fails to update.
Props birgire, afercia, jaymanpandya.
Fixes #43703.



git-svn-id: https://develop.svn.wordpress.org/trunk@44663 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-21 04:49:06 +00:00
Peter Wilson 7d8ce1e287 Options: Avoid unnecessary DB calls when updating network options.
Adds a `maybe_serialize()` comparison for the old and new values in `update_network_option()` to avoid unnecessary database writes when options contain identical objects.

Props bor0.
Fixes #44956.



git-svn-id: https://develop.svn.wordpress.org/trunk@44662 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-21 04:26:33 +00:00
Gary Pendergast 02422aab1d Widgets: Fix Gallery Widget preview after an image is deleted.
The Gallery Widget incorrectly tried to include the deleted image in the preview.

Props westonruter, janak007, afercia, mrasharirfan.
Fixes #43139.



git-svn-id: https://develop.svn.wordpress.org/trunk@44661 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-21 04:12:10 +00:00
Gary Pendergast 3ea21b66d8 Docs: Improve the docblocks for `wp_insert_post()` and `wp_set_post_categories()`.
Their respective `post_category` and `post_categories` parameters were not correct.

Props Takahashi_Fumiki.
Fixes #45171.



git-svn-id: https://develop.svn.wordpress.org/trunk@44660 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-21 01:44:49 +00:00
Gary Pendergast 9dfde992ee Comments: Show the "awaiting moderation" message when comment cookies are disabled.
The "Your comment is awaiting moderation." message relied upon the comment author cookie being set. However, since it's now possible to opt-out of that cookie, submitting a comment won't show the comment preview when the comment is placed in moderation.

To avoid this issue, we now include a hash in the redirect URL, allowing the site to identify that a preview of the moderated comment should be displayed.

Props imath, tomdxw, birgire, lakenh, azaozz, pento.
Fixes #43857.



git-svn-id: https://develop.svn.wordpress.org/trunk@44659 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-21 01:33:50 +00:00
Gary Pendergast 19645a4790 Tests: Add tests for the `__return*()` functions.
Props pbearne, mukesh27.
Fixes #46043.



git-svn-id: https://develop.svn.wordpress.org/trunk@44658 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-21 00:32:33 +00:00
laurelfulford 192224a46e Twenty Nineteen: Create separate `:lang()` selectors for Devanagari.
In the non-latin font fallback styles, languages using the Devanagari alphabet were initially committed in a comma-separated list in the `:lang()` selector, which isn't fully supported. This update separates those languages into their own `:lang()` selectors. 

Props mako09.
Fixes #45731.



git-svn-id: https://develop.svn.wordpress.org/trunk@44657 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-20 20:22:05 +00:00
Felix Arntz f518dea0bc Upgrade/Install: Make `version_compare()` calls for plugin required version checks more robust.
Props afragen.
Fixes #46024. See #43986.


git-svn-id: https://develop.svn.wordpress.org/trunk@44656 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-20 12:02:02 +00:00
Andrea Fercia 6dde7cd74f Build/Test Tools: Update QUnit index file after [43174].
Updates the last occurrence of "(opens in a new window)" to "(opens in a new tab)".

See #43803.


git-svn-id: https://develop.svn.wordpress.org/trunk@44655 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-19 15:27:11 +00:00
Andrew Ozz d7ecd6772c TinyMCE: fix `$_old_files` after [44651], remove `wp-tinymce.js` and add `wp-tinymce.js.gz`.
Props ocean90, garrett-eclipse.
Fixes #45645.

git-svn-id: https://develop.svn.wordpress.org/trunk@44654 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-19 10:22:16 +00:00
Mike Schroder 544e7a30bc Media: Port date filter width fix from Gutenberg.
Ensures the entire date selection dropdown shows in the media modal.

Previously this was worked around in 8deaf5eca6 in Gutenberg. This moves the rule to core, allowing the workaround to be removed in Gutenberg.

Props ianbelanger.
Fixes #44760.
See https://github.com/WordPress/gutenberg/issues/2202

git-svn-id: https://develop.svn.wordpress.org/trunk@44653 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-19 01:19:18 +00:00
laurelfulford 7c0a304cf4 Twenty Nineteen: Fix alignment of page title when there are no posts.
Fix the alignment of the "Nothing Found" page title when there are no posts, to match how it appears for the search results when nothing is found, and the 404 page. 

Props kjellr, lorenzone92.
Fixes #45887.



git-svn-id: https://develop.svn.wordpress.org/trunk@44652 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-18 20:45:34 +00:00
Andrew Ozz 21e479d3a8 TinyMCE: retire wp-tinymce.php and remove pre-compression of wp-tinymce.js.
Fixes #45645.

git-svn-id: https://develop.svn.wordpress.org/trunk@44651 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-18 19:50:19 +00:00
laurelfulford 131142486b Twenty Nineteen: Use a less aggressive approach for non-latin font fallbacks.
The theme's original approach to its non-latin font fallbacks required `!important`, which overrode fonts that shouldn't have been changed, like the icon fonts used for editor buttons.

Props kjellr, mako09, allancole.
Fixes #45731.



git-svn-id: https://develop.svn.wordpress.org/trunk@44650 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-18 18:37:26 +00:00
Andrew Ozz b3a658edbc TinyMCE: treat HTML comments same as tags when keeping cursor position. Fixes breaking the More and Nextpage tags when switching from Text to Visual.
Props iCaleb, jeremeylduvall.
Fixes #45947.

git-svn-id: https://develop.svn.wordpress.org/trunk@44649 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-18 16:32:46 +00:00
Gary Pendergast 3132f22932 Block Editor: Restore the Custom Fields display option.
When merging, [44244] and [44260] were committed to trunk the opposite way that they were committed to the 5.0 branch. They were originally committed in [43885] and [43861], respectively.

Due to this switch, a change in how the Custom Fields meta box was registered wasn't merged from the 5.0 branch, causing it to not be registered correctly in trunk.

Props dd32, pento.
Fixes #46028.



git-svn-id: https://develop.svn.wordpress.org/trunk@44648 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-18 05:25:48 +00:00
Gary Pendergast 7521e95ca2 Coding Standards: Remove some `add_action()`s that were commented out years ago.
Props Girishpanchal.
Fixes #44545.



git-svn-id: https://develop.svn.wordpress.org/trunk@44647 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-18 04:03:20 +00:00
Gary Pendergast 22ac9a3d29 Plugin Installer: Ensure CSS for the 3-column view isn't applied to the 4-column view.
Props nielslange.
Fixes #43573.



git-svn-id: https://develop.svn.wordpress.org/trunk@44646 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-18 04:02:17 +00:00
Gary Pendergast 2ec6c8f3d3 Build Tools: Upgrade WPCS to 2.0.0.
A few sniffs have been renamed, this change includes the relevant `phpcs:ignore` comment updates.

Fixes #46002.



git-svn-id: https://develop.svn.wordpress.org/trunk@44645 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-18 02:14:24 +00:00
Gary Pendergast d3ee420c14 Emoji: Upgrade Twemoji to 11.2.0.
This upgrade includes general improvements to the style of a variety of emoji.

Full changelog: https://github.com/twitter/twemoji/compare/v11.0.0...v11.2.0

Props desrosj, pento.
Fixes #45133.



git-svn-id: https://develop.svn.wordpress.org/trunk@44644 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-18 01:41:41 +00:00
Gary Pendergast 73cbf3ec7d Docs: Add missing periods to a grab-bag of docblocks.
Props Hitendra Chopda.
Fixes #45409.



git-svn-id: https://develop.svn.wordpress.org/trunk@44643 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-18 01:02:11 +00:00
Jonathan Desrosiers 3e390cdf9b Tests: Do not include the delimiter parameter in `ucwords()` calls.
This parameter is not supported in PHP < 5.4. Introduced in [44641].

See #44672.

git-svn-id: https://develop.svn.wordpress.org/trunk@44642 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-17 21:44:30 +00:00
Jonathan Desrosiers 83cfc77500 REST API: Allow a user to change the letter casing of their email.
When a `PUT` request is performed to update a user, a `rest_user_invalid_email` error is incorrectly being returned when the email exists with different letter casing, even if it belongs to the user being updated. `email_exists()` performs a case insensitive lookup, but the conditional statement following that lookup was performing a strict comparison between the new email and the user’s current email.

This changes that comparison to instead compare the user ID returned by `email_exists()` with the user ID being updated. This more closely matches the logic used in `edit_user()` and allows a user to change the letter casing of their email.

Props fuchsws, rachelbaker, desrosj.
Fixes #44672.

git-svn-id: https://develop.svn.wordpress.org/trunk@44641 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-17 21:24:47 +00:00
Andrea Fercia a0978e8222 Media: Improve unselecting media in the media bulk selection mode.
Disables the "Delete Selected" button when unselecting media by clicking the
"checkmark" box in the media bulk selection mode.

Props subrataemfluence, adamsilverstein.
Fixes #42239.


git-svn-id: https://develop.svn.wordpress.org/trunk@44640 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-17 12:07:32 +00:00
Andrea Fercia 6b489bb125 Accessibility: Improve the way Internet Explorer 11 and JAWS announce fieldset legends.
When Internet Explorer encounters a non interactive element with a `tabindex`
attribute, it adds the element to the accessibility tree with a `role=group` and
an accessible name computed from the element. This prevents JAWS from announcing
any fieldset legend within the element.

- removes `tabindex="0"` from the content and the toolbar containers: these tabindex attributes are no longer needed
- removes `aria-label="Main content"` from the content container: not needed
- keeps the media modal focus fallback introduced in [38142] by making the `#wpbody-content` element focusable only when needed

Props stevefaulkner, aardrian.
Fixes #43154.


git-svn-id: https://develop.svn.wordpress.org/trunk@44639 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-17 11:54:23 +00:00
Gary Pendergast b71875d25e Docs: Partial revert of [44636].
Unrelated changes in `wp-includes/general-template.php` were accidentally committed.

See #44502.



git-svn-id: https://develop.svn.wordpress.org/trunk@44638 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-17 07:56:32 +00:00
Andrea Fercia fb37359865 Administration: CSS coding standards
- properties should be followed by a colon and a space
- media queries shouldn't use spaces within parenthesis
- indentation should use tabs instead of spaces or mixed spaces / tabs
- the content property should use double quotes
- no double spaces

Props nadim0988, afercia.
Fixes #45185.


git-svn-id: https://develop.svn.wordpress.org/trunk@44637 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-17 07:40:40 +00:00
Gary Pendergast 15f4df2af6 Docs: Mark the internal functions as `@private` in `wp-includes/post.php`.
Props shamim51.
Fixes #44502.



git-svn-id: https://develop.svn.wordpress.org/trunk@44636 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-17 07:20:16 +00:00
Gary Pendergast bcba20dd2b Docs: Fix the last handful of incorrect `@since 5.0.0` docblock tags.
Props peterwilsoncc.
Fixes #45543.



git-svn-id: https://develop.svn.wordpress.org/trunk@44635 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-17 06:45:58 +00:00
Gary Pendergast 7303470ecd Media: `media_handle_sideload()` expectes `wp_insert_attachment()` to return a `WP_Error`.
For `wp_insert_attachment()` to do that, we need to be setting the `$wp_error` parameter to true.

Props subrataemfluence, jirihon.
Fixes #44303.



git-svn-id: https://develop.svn.wordpress.org/trunk@44634 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-17 06:26:05 +00:00
Gary Pendergast 2e63f69564 Tests: Ensure meta keys are cleaned up after each test.
Props jnylen0.
Fixes #46007.



git-svn-id: https://develop.svn.wordpress.org/trunk@44633 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-17 04:33:42 +00:00
Gary Pendergast 37dd83ab7e Build Tools: Uglify `underscore.min.js` while building.
This avoids a `sourceMappingURL` being in the minified file, as we don't ship source maps.

Props pento, laghee.
Fixes #44560.



git-svn-id: https://develop.svn.wordpress.org/trunk@44632 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-17 04:23:38 +00:00
Gary Pendergast a3fe5b75e1 Comments: Correct the "Mine" comment count when viewing comments for a particular post.
The count should only be comments made on that post by the current user, not all comments by them.

Props chetan200891, garrett-eclipse.
Fixes #46014.



git-svn-id: https://develop.svn.wordpress.org/trunk@44631 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-17 02:44:32 +00:00
Gary Pendergast 950562452a Coding Standards: Remove an assignment in a conditional from `get_plugins()`.
Props subrataemfluence.
Fixes #44249.



git-svn-id: https://develop.svn.wordpress.org/trunk@44630 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-17 00:48:59 +00:00
Jonathan Desrosiers 6f6b23dd70 Privacy: Improve the ’Copy’ button verbiage to provide more clarity.
On the Privacy Policy Guide, there is currently a ‘Copy’ button below each section of suggested text. It is unclear what copy means without more context. It could be assumed, for instance, that the suggested text is copied to a new page.

This changes the button text to read `Copy this section to clipboard` to more clearly inform the user what is copied and how.

Props JoshuaWold, garrett-eclipse, birgire, vishaldodiya.
Fixes #44677.

git-svn-id: https://develop.svn.wordpress.org/trunk@44629 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-16 22:44:25 +00:00
Jonathan Desrosiers 06371823e3 Privacy: Allow column sorting in the privacy request admin tables.
This allows users to sort the export and erase personal data request tables by “Requester” (`post_title`, or user email) and “Requested” (`post_date`, or when the request was created), which can be helpful when sites have many requests present.

Props birgire, ianbelanger, pbiron, desrosj.
Fixes #43405.

git-svn-id: https://develop.svn.wordpress.org/trunk@44628 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-16 17:51:56 +00:00
Felix Arntz 17e5f4ad0b Plugins: Use centralized API to display information about updating PHP when a plugin requires a higher version.
This changeset uses the API functions introduced in [44476] to link to the resource about updating PHP when highlighting a plugin's required PHP version is not met. It furthermore expands them, introducing a new `wp_update_php_annotation()` function that prints the markup to indicate that the default URL has been altered by the web host, allowing it to be reused universally.

Furthermore, this changeset adds missing `update_php` capability checks before displaying the information about updating PHP.

Props afragen.
Fixes #45986. See #43986, #45686.


git-svn-id: https://develop.svn.wordpress.org/trunk@44627 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-16 17:05:37 +00:00
Jonathan Desrosiers 4e9dacc96c Coding Standards: Manually fix coding standards violations in `wp-signup.php`.
Props GaryJ, jrf, netweb, desrosj.
Fixes #43405.

git-svn-id: https://develop.svn.wordpress.org/trunk@44626 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-16 16:50:15 +00:00
Felix Arntz 34bd90a7c9 Bootstrap/Load: Add support for JSON requests to `wp_die()`.
In addition to AJAX and XML-RPC requests, `wp_die()` now handles JSON requests correctly, returning information in the expected content type.

Props spacedmonkey.
See #45933, #44458.


git-svn-id: https://develop.svn.wordpress.org/trunk@44625 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-16 15:21:49 +00:00
Felix Arntz 633a444219 Bootstrap/Load: Fix workaround to display admin link in PHP error template by introducing `$link_url` and `$link_text` arguments to `wp_die()`.
This changeset removes the hack that was used before to display more complex HTML markup than a simple message in the default PHP error template via `wp_die()`. By removing HTML markup from the arguments passed to `wp_die()` it furthermore paves the way for supporting other content types than the default.

The message and arguments can be modified with new `wp_php_error_message` and `wp_php_error_args` filters respectively.

Furthermore this changeset fixes a few issues of functions not existing which could potentially have caused fatal errors when executed early in the WordPress bootstrap process.

Props flixos90, spacedmonkey.
See #45933, #44458.


git-svn-id: https://develop.svn.wordpress.org/trunk@44624 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-16 15:20:04 +00:00
Felix Arntz 33f524f9c2 Bootstrap/Load: Only pause extensions when they cause a crash on a protected endpoint.
This is a first step on pausing extensions less aggressively. If a plugin or theme only causes a crash in the frontend, there is no point in pausing it in the admin backend.

See #45940, #44458.


git-svn-id: https://develop.svn.wordpress.org/trunk@44623 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-16 14:03:35 +00:00