Commit Graph

14680 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Felix Arntz
72e86aacfb Bootstrap/Load: Use wp_load_translations_early() when Translation API is not yet loaded.
Props spacedmonkey.
Fixes #45932. See #44458.


git-svn-id: https://develop.svn.wordpress.org/trunk@44622 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-16 13:33:56 +00:00
Andrea Fercia
00726f0963 Taxonomy: Remove extra padding around buttons on term edit page.
Props monikarao, mukesh27, chetan200891.
See #9777.
Fixes #45183.


git-svn-id: https://develop.svn.wordpress.org/trunk@44621 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-16 12:58:45 +00:00
Gary Pendergast
fdd285c433 Docs: Improve the sanitize_email filter.
- Remove duplicate parameter names.
- Fix the wrong value being passed in the second parameter.
- Correct the type of the `$message` parameter.

Props ChriCo.
Fixes #45595.



git-svn-id: https://develop.svn.wordpress.org/trunk@44620 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-16 06:15:40 +00:00
Gary Pendergast
989425c5d7 Rewrite: Remove extra arguments being passed to WP_Rewrite::iis7_url_rewrite_rules().
Props rafsuntaskin.
Fixes #44185.



git-svn-id: https://develop.svn.wordpress.org/trunk@44619 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-16 06:09:27 +00:00
Gary Pendergast
afa551294e Formatting: Add type checking to _sanitize_text_fields().
When a non-string value is passed, return an empty string.

Props Mte90.
Fixes #41450.



git-svn-id: https://develop.svn.wordpress.org/trunk@44618 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-16 06:04:51 +00:00
Gary Pendergast
267c79a518 Plugin Editor: Disable the documentation look up button when no function is selected.
Props xkon.
Fixes #41143.



git-svn-id: https://develop.svn.wordpress.org/trunk@44617 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-16 06:00:23 +00:00
Gary Pendergast
cd7d022ae0 Templates: Fix the return value of get_the_author_posts_link().
When the `$authordata` global isn't defined, return an empty string, rather than `void`.

Props mukesh27, subrataemfluence.
Fixes #45597.



git-svn-id: https://develop.svn.wordpress.org/trunk@44616 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-16 05:53:26 +00:00
Gary Pendergast
97c6a43eda Admin: Use is_user_logged_in() instead of wp_validate_auth_cookie() in admin-post.php.
This matches the authentication check in `admin-ajax.php`, and allows the authentication method to be filtered.

Props jmdodd.
Fixes #45475.



git-svn-id: https://develop.svn.wordpress.org/trunk@44615 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-16 05:40:04 +00:00
Gary Pendergast
9beaad7878 Docs: Correct the docs for POMO_Reader::setEndian().
The parameter type and name where the wrong way around.

Props ishitaka.
Fixes #45410.



git-svn-id: https://develop.svn.wordpress.org/trunk@44614 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-16 05:35:27 +00:00
Gary Pendergast
5d52753e2e Docs: Correct the @return type of get_theme_mod().
This now matches the type of the `$value` parameter of `set_theme_mod()`.

Props mensmaximus.
Fixes #45319.



git-svn-id: https://develop.svn.wordpress.org/trunk@44613 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-16 05:31:29 +00:00
Gary Pendergast
e23ffe3145 Docs: Remove duplicate docblocks for the pre_user_login and link_category filters.
Props coffee2code.
Fixes #45308.



git-svn-id: https://develop.svn.wordpress.org/trunk@44612 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-16 05:28:56 +00:00
Gary Pendergast
e79bddcb02 Users: Add extra checking to wp_new_user_notification().
Prevent a notification from being sent when an unrecognised value is passed in the `$notify` parameter.

Props cthreelabs, 360zen.
Fixes #44293.



git-svn-id: https://develop.svn.wordpress.org/trunk@44611 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-16 04:26:48 +00:00
Gary Pendergast
5aeabd7fbf Posts: Set a HTTP 403 error when an incorrect post preview nonce is sent.
Props graymouser.
Fixes #43570.



git-svn-id: https://develop.svn.wordpress.org/trunk@44610 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-16 03:53:42 +00:00
Gary Pendergast
efcc69ed84 Docs: Add documentation for the wp_maybe_auto_update action.
Props MikeGillihan.
Fixes #43301.



git-svn-id: https://develop.svn.wordpress.org/trunk@44609 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-16 03:37:38 +00:00
Gary Pendergast
c2862a404e Admin Bar: Set the Admin Bar to not be showing on REST API requests.
Props ayeshrajans.
Fixes #45727.



git-svn-id: https://develop.svn.wordpress.org/trunk@44608 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-16 02:53:15 +00:00
Jonathan Desrosiers
99bcf2719b Docs: Add missing documentation for _WP_Dependency::set_translations().
Introduced in [43859].

Props stazdotio.
Fixes #45550.

git-svn-id: https://develop.svn.wordpress.org/trunk@44607 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-15 22:47:14 +00:00
Jonathan Desrosiers
3f4cc1a113 Privacy: Use consistent variable naming when working with privacy requests.
Throughout the core privacy functions, `WP_User_Request` instances were stored in variables named both `$request`, and `$request_data`. This changes all occurrences of `$request_data` to `$request` for better consistency.

Props nateallen, bruceallen, garrett-eclipse.
Fixes #44708.

git-svn-id: https://develop.svn.wordpress.org/trunk@44606 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-15 22:34:39 +00:00
Gary Pendergast
efc09a6922 Docs: Tweak the docblock for setup_userdata().
This is a followup to [44603]. The default value should be last, not somewhere in the middle.

Props swissspidy.
Fixes #44697.



git-svn-id: https://develop.svn.wordpress.org/trunk@44605 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-15 10:28:42 +00:00
Andrea Fercia
a90d82fb0b Admin: Use the correct CSS media query for the Help tab on small screens after [44588].
See #43221


git-svn-id: https://develop.svn.wordpress.org/trunk@44604 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-15 07:47:27 +00:00
Gary Pendergast
3a6ffa1d18 Users: Correct the default value in setup_userdata().
The `$for_user_id` parameter is an `int`, not a `string`, so the default value should be `0`, rather than an empty string.

Props subrataemfluence.
Fixes #44697.



git-svn-id: https://develop.svn.wordpress.org/trunk@44603 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-15 06:32:21 +00:00
Gary Pendergast
0393473016 Users: Check that a valid user is passed to get_password_reset_key().
Props edocev.
Fixes #44601.



git-svn-id: https://develop.svn.wordpress.org/trunk@44602 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-15 06:26:23 +00:00
Gary Pendergast
de1b02f61b Docs: Fix the WP_Object_Cache::get() docblock.
The `$force` parameter is a `bool`, not a `string`. The matching `wp_cache_get()` docblock has the correct type.

Props subrataemfluence.
Fixes #44454.



git-svn-id: https://develop.svn.wordpress.org/trunk@44601 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-15 06:17:42 +00:00
Gary Pendergast
c1ae8b91e2 Docs: Add docblocks for WP_Customize_Header_Image_Control member variables.
Props subrataemfluence.
Fixes #44410.



git-svn-id: https://develop.svn.wordpress.org/trunk@44600 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-15 05:53:35 +00:00
Gary Pendergast
bb59882be8 Coding Standards: Move an assignment out of a condition in wp-admin/admin.php.
Props subrataemfluence, jrf, pento.
Fixes #44363.



git-svn-id: https://develop.svn.wordpress.org/trunk@44598 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-15 05:47:04 +00:00
Gary Pendergast
da17f41cc1 Coding Standards: Move assignments out of conditions in wp-includes/user.php.
Props subrataemfluence.
See #44315.



git-svn-id: https://develop.svn.wordpress.org/trunk@44597 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-15 05:37:48 +00:00
Gary Pendergast
65d6dd18b9 Updates: Tweak the "before updating, please back up..." message.
Props chetan200891, sebastien@thivinfo.com.
See #43790.



git-svn-id: https://develop.svn.wordpress.org/trunk@44596 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-15 05:19:59 +00:00
Jonathan Desrosiers
66eefd653c Coding Standards: Assignments must be the first block of code on a line.
Props subrataemfluence.
Fixes #44225.

git-svn-id: https://develop.svn.wordpress.org/trunk@44593 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-15 02:40:59 +00:00
Jonathan Desrosiers
425b59c048 Docs: Update inaccurate return descriptions.
In the `@return` tag description for `get_post_modified_time()`, `get_the_time()`, and `get_post_time()`, the `$d` parameter is incorrectly referred to as `$id`.

Props behzod.
Fixes #45323.

git-svn-id: https://develop.svn.wordpress.org/trunk@44592 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-15 02:07:41 +00:00
Gary Pendergast
f418ee12b1 Link Template: In get_adjacent_post(), move the sanitisation of $excluded_terms earlier.
This is a followup to [42828], ensuring that the `get_{$adjacent}_post_excluded_terms` filter is always passed an array, as expected.

Props soulseekah, zottto.
Fixes #43521.



git-svn-id: https://develop.svn.wordpress.org/trunk@44591 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-15 01:53:02 +00:00
Gary Pendergast
d7e86e8313 Docs: Update the @since version for the doing_it_wrong_trigger_error filter.
Fixes #34183.



git-svn-id: https://develop.svn.wordpress.org/trunk@44590 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-15 00:51:44 +00:00
Gary Pendergast
e121a5e03d Widgets: Remove unnecessary sanitize_text_field() calls in core widget ::form() methods.
This sanitisation only needs to be run in `::update()` to correctly clean up the input.

Props welcher, greenshady.
Fixes #42461.



git-svn-id: https://develop.svn.wordpress.org/trunk@44589 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-15 00:42:30 +00:00
Gary Pendergast
580d483105 Admin: Make the Help tab available on small screens.
Props jobthomas, xkon.
Fixes #43221.



git-svn-id: https://develop.svn.wordpress.org/trunk@44588 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-15 00:19:54 +00:00
Gary Pendergast
5cdc0e1397 Query: Cache the result when get_pages() doesn't find anything in the database.
Props flixos90, soulseekah.
Fixes #43514.



git-svn-id: https://develop.svn.wordpress.org/trunk@44587 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-14 23:26:20 +00:00
Gary Pendergast
464c9a72f0 Docs: Improve the docblock of wp_admin_bar_edit_menu().
What age were you when you learned that there's a `$user_id` global, as well as `$user_ID` global? I was today years old.

Props pento, mukesh27.
Fixes #43448.



git-svn-id: https://develop.svn.wordpress.org/trunk@44586 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-14 23:11:20 +00:00
Gary Pendergast
25ffb39d0a Docs: Improve documentation of the `$wp_registered_sidebars global.
Props mukesh27.
Fixes #43448.



git-svn-id: https://develop.svn.wordpress.org/trunk@44585 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-14 23:00:05 +00:00
Gary Pendergast
c80325658f Customizer: Use the sandbox attribute to prevent top navigation from the preview.
Props valchovski.
Fixes #42341.



git-svn-id: https://develop.svn.wordpress.org/trunk@44583 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-14 07:24:16 +00:00
Gary Pendergast
7de213856b Docs: Improve docblocks for _get_plugin_data_markup_translate() and _sort_uname_callback().
Props Jaydeep Rami.
Fixes #42228.



git-svn-id: https://develop.svn.wordpress.org/trunk@44581 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-14 06:53:44 +00:00
Gary Pendergast
f5f5da1fff Customizer: Improve browser compatibility of the preview iframe.
When `home` and `siteurl` are different, the customizer preview iframe will be blank in Chrome and Safari, due to their `X-Frame-Options` implementation quirks.

Changing this to `SAMEORIGIN` and adding the `frame-ancestors` Content Security Policy gives the correct behaviour.

Props fullyint.
Fixes #40020.



git-svn-id: https://develop.svn.wordpress.org/trunk@44580 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-14 06:37:30 +00:00
Gary Pendergast
71abc20def Formatting: Remove soft hyphens when sanitising titles.
Props andg.
Fixes #45378.



git-svn-id: https://develop.svn.wordpress.org/trunk@44579 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-14 05:38:41 +00:00
Gary Pendergast
4550488c99 Widgets: Don't log invalid HTML in the Text Widget.
[41215] supresses these irrelevant error messages from the front end, this removes them from the error log, too.

Props jeherve.
Fixes #43815.



git-svn-id: https://develop.svn.wordpress.org/trunk@44578 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-14 05:04:12 +00:00
Gary Pendergast
f73d8da051 Blocks: Add a $source_block parameter to the render_block_data filter.
This contains a copy of the block, unmodified by other filter functions, so that plugins have a clean reference to work from, if they need.

Props dmsnell.
Fixes #45451.



git-svn-id: https://develop.svn.wordpress.org/trunk@44576 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-14 01:46:56 +00:00
Andrea Fercia
627ce6f4b4 Accessibility: Exclude the Windows High Contrast mode transparent outline from the CSS transition after [44544].
See #41286.


git-svn-id: https://develop.svn.wordpress.org/trunk@44575 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-12 15:00:04 +00:00
Gary Pendergast
992184cf73 Coding Standards: Upgrade WPCS to 1.2.1.
This upgrade fixes quite a few false positives, as well as auto-fixing some indenting issues.

Fixes #45956.



git-svn-id: https://develop.svn.wordpress.org/trunk@44574 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-12 06:40:16 +00:00
Gary Pendergast
a139c8cbf7 Coding Standards: Fix and whitelist variable names.
From the `WordPress.NamingConventions.ValidVariableName` sniff, this commit fixes/whitelists all `NotSnakeCaseMemberVar`, `MemberNotSnakeCase`, and `StringNotSnakeCase` violations. It also fixes a handful of the `NotSnakeCase` violations.

See #45934.



git-svn-id: https://develop.svn.wordpress.org/trunk@44573 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-12 06:05:55 +00:00
Gary Pendergast
cf5be804c7 Coding Standards: Remove an unnecessary line whitelisting.
Props jrf.
See #45934.



git-svn-id: https://develop.svn.wordpress.org/trunk@44572 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-12 04:52:53 +00:00
Gary Pendergast
358d65b9c7 Coding Standards: Fix an incorrect phpcs:ignore comment.
It's `phpcs:ignore`, not `wpcs:ignore`.

Props GaryJ.

See #45934.



git-svn-id: https://develop.svn.wordpress.org/trunk@44570 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-12 03:48:05 +00:00
Gary Pendergast
ff53bd388c Coding Standards: Extract extract() from the codebase.
Of the last four instances of `extract()` occurring, three of them are removed by this commit, and the fourth is appropriately documented.

See #45934.



git-svn-id: https://develop.svn.wordpress.org/trunk@44569 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-12 03:19:23 +00:00
Jonathan Desrosiers
34e3de7b7f REST API: Encourage proper usage of register_rest_route().
Calling `register_rest_route()` too early in the loading process has the potential to cause some unintentional problems and pitfalls. Because `register_rest_route()` calls `rest_get_server()` (which creates the `WP_REST_Server` instance), calling the function directly and/or before `rest_api_init` should be discouraged.

For example, if `register_rest_route ()` is called on `init`, the REST API server instance is set up (and all functions added to `rest_api_init` and other related hooks are invoked), even though the current request may not be a REST request. Also, if `register_rest_route()` is called even earlier (say, in an `mu-plugin` file), required endpoints may be missing since normal plugins have not yet been loaded and have not had a chance to register their own action hooks.

This adds a `_doing_it_wrong()` notice the first time `register_rest_route()` is called before `rest_api_init` in a request to encourage best practices for registering REST API routes.

Props kraftbj, desrosj, timothyblynjacobs.
Fixes #45265.

git-svn-id: https://develop.svn.wordpress.org/trunk@44568 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-11 18:18:41 +00:00
Andrea Fercia
d78fa59746 Menus: Make menu items not jump while dragging items.
Props alexvorn2, welcher, afercia.
Fixes #41160.


git-svn-id: https://develop.svn.wordpress.org/trunk@44567 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-11 13:55:28 +00:00
Gary Pendergast
33caf61b8b Coding Standards: Fix the Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace violations.
See #45934.



git-svn-id: https://develop.svn.wordpress.org/trunk@44566 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-11 06:39:55 +00:00
Gary Pendergast
83af0329a2 Coding Standards: Document intentional case block fall-throughs.
Fixes `PSR2.ControlStructures.SwitchDeclaration.TerminatingComment` violations.

See #45934.



git-svn-id: https://develop.svn.wordpress.org/trunk@44565 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-11 06:25:37 +00:00
Gary Pendergast
6f0487c2f0 Coding Standards: Ignore the violations of Generic.NamingConventions.UpperCaseConstantName.ConstantNotUpperCase.
See #45934.



git-svn-id: https://develop.svn.wordpress.org/trunk@44563 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-11 06:07:50 +00:00
Gary Pendergast
8cc49330a4 Coding Standards: Fix the minor WordPress.WP.I18n violations.
`WordPress.WP.I18n.MissingTranslatorsComment` is in progress in #44360.

See #45934.



git-svn-id: https://develop.svn.wordpress.org/trunk@44562 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-11 06:03:46 +00:00
Gary Pendergast
b0c61e267b Post WordPress 5.1 Beta 1 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@44558 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-11 00:58:03 +00:00
Gary Pendergast
2792e71cec WordPress 5.1 Beta 1.
git-svn-id: https://develop.svn.wordpress.org/trunk@44557 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-11 00:41:39 +00:00
Gary Pendergast
49f5f62f30 Emoji: Fix a code formatting error introduced in [44554].
See #45930.



git-svn-id: https://develop.svn.wordpress.org/trunk@44556 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 23:39:19 +00:00
Gary Pendergast
1eaf7453f9 Blocks: Reverse the logic when checking the pre_render_block result.
We should be returning if the result isn't null, not when it is.

See #45451.



git-svn-id: https://develop.svn.wordpress.org/trunk@44555 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 23:31:01 +00:00
Gary Pendergast
d32cead515 Emoji: Improve performance when encoding or staticizing emoji.
Both `wp_encode_emoji()` and `wp_staticize_emoji()` perform a PHP version check when deciding how to apply their behaviour, but this check only needs to happen once, rather than every time in their internal looks.

Moving the check outside of the loop reduces processing time by 50%.

Props johnbillion.
Fixes #45930.



git-svn-id: https://develop.svn.wordpress.org/trunk@44554 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 23:19:37 +00:00
Gary Pendergast
041471735a Blocks: Add the pre_render_block and render_block_data filters.
At the start of `render_block()`, the `pre_render_block` filter allows the function to be short-circuited, and the `render_block_data` filter is applied to the `$block` parameter before it's processed.

Props kkarpieszuk, pento.
Fixes #45451.



git-svn-id: https://develop.svn.wordpress.org/trunk@44553 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 23:15:49 +00:00
Jonathan Desrosiers
7508db604b Embeds: Remove Photobucket, FunnyOrDie from the list of oEmbed providers.
These services no longer support oEmbed.

Props skostadinov, notnownikki.
Fixes #45399.

git-svn-id: https://develop.svn.wordpress.org/trunk@44552 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 22:41:13 +00:00
Andrea Fercia
b3fcb41718 Accessibility: Improve text input in the Tags meta box when using Safari + Voiceover.
Props parbaugh, konainm, wbrubaker, pento, ryelle.
Fixes #44966.


git-svn-id: https://develop.svn.wordpress.org/trunk@44551 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 22:29:46 +00:00
Jonathan Desrosiers
2e8b87cd83 Docs: Add missing periods to param annotations for flip() in WP_Image_Editor_GD.
Props hitendra-chopda.
Fixes #45208.

git-svn-id: https://develop.svn.wordpress.org/trunk@44550 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 22:09:26 +00:00
Andrea Fercia
a0bca4f976 Accessibility: Improve color contrast ratio in the Events and News dashboard widget.
Props boemedia, lucagrandicelli.
Fixes #45280.


git-svn-id: https://develop.svn.wordpress.org/trunk@44549 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 22:07:42 +00:00
Jonathan Desrosiers
3a6966b69d Media: Correct since annotation for adding the caption_id attribute.
Introduced in [42704]
Fixes #34595.

git-svn-id: https://develop.svn.wordpress.org/trunk@44548 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 21:36:05 +00:00
Felix Arntz
08564b5a80 General: Fix problematic string to array parsing.
WordPress has historically often used code like `preg_split( '/[\s,]+/', $var )` to parse a string of comma-separated values into an array. However, this approach was causing an empty string to not be parsed into an empty array as expected, but rather into an array with the empty string as its sole element.

This was among other areas causing problems in the REST API where passing an empty request parameter could cause that request to fail because, instead of it being ignored, that parameter would be compared against the valid values for it, which typically do not include an empty string.

Props david.binda, sstoqnov.
Fixes #43977.


git-svn-id: https://develop.svn.wordpress.org/trunk@44546 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 21:05:50 +00:00
Andrea Fercia
238e8991f8 Accessibility: Remove negative tabindex from the login, install, and setup pages header.
Props bamadesigner, rishishah, jainnidhi.
Fixes #42632.


git-svn-id: https://develop.svn.wordpress.org/trunk@44545 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 17:20:59 +00:00
Andrea Fercia
2d4ae6ce6d Accessibility: Add focus styles for Windows High Contrast mode.
Introduces in core new focus styles dedicated to Windows High Contrast mode. The 
new styles use a transparent CSS outline as already explored in the Block Editor.
This first part covers some of the main user interface controls like buttons, links,
and media views elements. Other parts will be addressed in the next future.

Fixes #41286.


git-svn-id: https://develop.svn.wordpress.org/trunk@44544 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 16:46:44 +00:00
Andrea Fercia
3b3808feeb Accessibility: Improve the way Safari and VoiceOver read out the screen reader text.
Sometimes, Safari and VoiceOver read out the text hidden with `screen-reader-text`
in a wrong order. While there's no known, full, solution, it is possible to make 
them respect the correct order reliably at least within buttons.

Fixes #42006.


git-svn-id: https://develop.svn.wordpress.org/trunk@44543 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 16:30:03 +00:00
Jonathan Desrosiers
ba6f1ff56e Media: Introduce the has_post_thumbnail filter.
Props rzen, desrosj.
Fixes #44859.

git-svn-id: https://develop.svn.wordpress.org/trunk@44542 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 15:27:09 +00:00