Gary Pendergast
4c425c87fa
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 .
Built from https://develop.svn.wordpress.org/trunk@44659
git-svn-id: http://core.svn.wordpress.org/trunk@44490 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 01:34:51 +00:00
Gary Pendergast
36a0e107f0
Tests: Add tests for the __return*()
functions.
...
Props pbearne, mukesh27.
Fixes #46043 .
Built from https://develop.svn.wordpress.org/trunk@44658
git-svn-id: http://core.svn.wordpress.org/trunk@44489 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 00:33:51 +00:00
laurelfulford
3993b8cda2
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 .
Built from https://develop.svn.wordpress.org/trunk@44657
git-svn-id: http://core.svn.wordpress.org/trunk@44488 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-20 20:23:51 +00:00
Felix Arntz
9f2d529a77
Upgrade/Install: Make version_compare()
calls for plugin required version checks more robust.
...
Props afragen.
Fixes #46024 . See #43986 .
Built from https://develop.svn.wordpress.org/trunk@44656
git-svn-id: http://core.svn.wordpress.org/trunk@44487 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-20 12:03:53 +00:00
Andrea Fercia
5e6e3573bf
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 .
Built from https://develop.svn.wordpress.org/trunk@44655
git-svn-id: http://core.svn.wordpress.org/trunk@44486 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-19 15:28:50 +00:00
Andrew Ozz
fc781d2f8a
TinyMCE: fix $_old_files
after [44651], remove wp-tinymce.js
and add wp-tinymce.js.gz
.
...
Props ocean90, garrett-eclipse.
Fixes #45645 .
Built from https://develop.svn.wordpress.org/trunk@44654
git-svn-id: http://core.svn.wordpress.org/trunk@44485 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-19 10:23:50 +00:00
Mike Schroder
792d02dde0
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
Built from https://develop.svn.wordpress.org/trunk@44653
git-svn-id: http://core.svn.wordpress.org/trunk@44484 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-19 01:20:49 +00:00
laurelfulford
fc83cdfe6c
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 .
Built from https://develop.svn.wordpress.org/trunk@44652
git-svn-id: http://core.svn.wordpress.org/trunk@44483 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-18 20:46:51 +00:00
Andrew Ozz
b7897c5761
TinyMCE: retire wp-tinymce.php and remove pre-compression of wp-tinymce.js.
...
Fixes #45645 .
Built from https://develop.svn.wordpress.org/trunk@44651
git-svn-id: http://core.svn.wordpress.org/trunk@44482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-18 19:51:53 +00:00
laurelfulford
f8d655fe37
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 .
Built from https://develop.svn.wordpress.org/trunk@44650
git-svn-id: http://core.svn.wordpress.org/trunk@44481 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-18 18:38:50 +00:00
Andrew Ozz
abcb59f860
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 .
Built from https://develop.svn.wordpress.org/trunk@44649
git-svn-id: http://core.svn.wordpress.org/trunk@44480 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-18 16:33:51 +00:00
Gary Pendergast
9fc53b8461
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 .
Built from https://develop.svn.wordpress.org/trunk@44648
git-svn-id: http://core.svn.wordpress.org/trunk@44479 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-18 05:26:49 +00:00
Gary Pendergast
ac79b4e716
Coding Standards: Remove some add_action()
s that were commented out years ago.
...
Props Girishpanchal.
Fixes #44545 .
Built from https://develop.svn.wordpress.org/trunk@44647
git-svn-id: http://core.svn.wordpress.org/trunk@44478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-18 04:04:49 +00:00
Gary Pendergast
9b2a6b606c
Plugin Installer: Ensure CSS for the 3-column view isn't applied to the 4-column view.
...
Props nielslange.
Fixes #43573 .
Built from https://develop.svn.wordpress.org/trunk@44646
git-svn-id: http://core.svn.wordpress.org/trunk@44477 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-18 04:03:52 +00:00
Gary Pendergast
a06dd65235
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 .
Built from https://develop.svn.wordpress.org/trunk@44645
git-svn-id: http://core.svn.wordpress.org/trunk@44476 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-18 02:15:49 +00:00
Gary Pendergast
0ee053758e
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 .
Built from https://develop.svn.wordpress.org/trunk@44644
git-svn-id: http://core.svn.wordpress.org/trunk@44475 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-18 01:42:50 +00:00
Gary Pendergast
6ef9017c96
Docs: Add missing periods to a grab-bag of docblocks.
...
Props Hitendra Chopda.
Fixes #45409 .
Built from https://develop.svn.wordpress.org/trunk@44643
git-svn-id: http://core.svn.wordpress.org/trunk@44474 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-18 01:03:50 +00:00
desrosj
2a92fc794b
Tests: Do not include the delimiter parameter in ucwords()
calls.
...
This parameter is not supported in PHP < 5.4. Introduced in [44641].
See #44672 .
Built from https://develop.svn.wordpress.org/trunk@44642
git-svn-id: http://core.svn.wordpress.org/trunk@44473 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 21:45:51 +00:00
desrosj
56bb62543d
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 .
Built from https://develop.svn.wordpress.org/trunk@44641
git-svn-id: http://core.svn.wordpress.org/trunk@44472 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 21:25:51 +00:00
Andrea Fercia
a32aeb0392
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 .
Built from https://develop.svn.wordpress.org/trunk@44640
git-svn-id: http://core.svn.wordpress.org/trunk@44471 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 12:08:49 +00:00
Andrea Fercia
3578f89900
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 .
Built from https://develop.svn.wordpress.org/trunk@44639
git-svn-id: http://core.svn.wordpress.org/trunk@44470 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 11:55:51 +00:00
Gary Pendergast
e96ea8eab6
Docs: Partial revert of [44636].
...
Unrelated changes in `wp-includes/general-template.php` were accidentally committed.
See #44502 .
Built from https://develop.svn.wordpress.org/trunk@44638
git-svn-id: http://core.svn.wordpress.org/trunk@44469 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 07:57:52 +00:00
Andrea Fercia
173e0f9ee7
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 .
Built from https://develop.svn.wordpress.org/trunk@44637
git-svn-id: http://core.svn.wordpress.org/trunk@44468 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 07:41:52 +00:00
Gary Pendergast
e42dddb5ba
Docs: Mark the internal functions as @private
in wp-includes/post.php
.
...
Props shamim51.
Fixes #44502 .
Built from https://develop.svn.wordpress.org/trunk@44636
git-svn-id: http://core.svn.wordpress.org/trunk@44467 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 07:21:51 +00:00
Gary Pendergast
dcdfd7f412
Docs: Fix the last handful of incorrect @since 5.0.0
docblock tags.
...
Props peterwilsoncc.
Fixes #45543 .
Built from https://develop.svn.wordpress.org/trunk@44635
git-svn-id: http://core.svn.wordpress.org/trunk@44466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 06:46:50 +00:00
Gary Pendergast
3f847f8b6c
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 .
Built from https://develop.svn.wordpress.org/trunk@44634
git-svn-id: http://core.svn.wordpress.org/trunk@44465 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 06:27:50 +00:00
Gary Pendergast
e933db7053
Tests: Ensure meta keys are cleaned up after each test.
...
Props jnylen0.
Fixes #46007 .
Built from https://develop.svn.wordpress.org/trunk@44633
git-svn-id: http://core.svn.wordpress.org/trunk@44464 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 04:34:50 +00:00
Gary Pendergast
09ab58c3d2
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 .
Built from https://develop.svn.wordpress.org/trunk@44632
git-svn-id: http://core.svn.wordpress.org/trunk@44463 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 04:24:49 +00:00
Gary Pendergast
3fc76e352b
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 .
Built from https://develop.svn.wordpress.org/trunk@44631
git-svn-id: http://core.svn.wordpress.org/trunk@44462 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 02:45:49 +00:00
Gary Pendergast
b158c806d1
Coding Standards: Remove an assignment in a conditional from get_plugins()
.
...
Props subrataemfluence.
Fixes #44249 .
Built from https://develop.svn.wordpress.org/trunk@44630
git-svn-id: http://core.svn.wordpress.org/trunk@44461 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 00:49:48 +00:00
desrosj
67bec96f92
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 .
Built from https://develop.svn.wordpress.org/trunk@44629
git-svn-id: http://core.svn.wordpress.org/trunk@44460 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 22:45:50 +00:00
desrosj
3baecf04ee
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 .
Built from https://develop.svn.wordpress.org/trunk@44628
git-svn-id: http://core.svn.wordpress.org/trunk@44459 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 17:52:49 +00:00
Felix Arntz
94fb16f03f
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 .
Built from https://develop.svn.wordpress.org/trunk@44627
git-svn-id: http://core.svn.wordpress.org/trunk@44458 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 17:07:00 +00:00
desrosj
601d13a657
Coding Standards: Manually fix coding standards violations in wp-signup.php
.
...
Props GaryJ, jrf, netweb, desrosj.
Fixes #43405 .
Built from https://develop.svn.wordpress.org/trunk@44626
git-svn-id: http://core.svn.wordpress.org/trunk@44457 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 16:51:52 +00:00
Felix Arntz
2e7e09d869
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 .
Built from https://develop.svn.wordpress.org/trunk@44625
git-svn-id: http://core.svn.wordpress.org/trunk@44456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 15:22:56 +00:00
Felix Arntz
30d5ca9172
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 .
Built from https://develop.svn.wordpress.org/trunk@44624
git-svn-id: http://core.svn.wordpress.org/trunk@44455 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 15:21:50 +00:00
Felix Arntz
225f3055b8
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 .
Built from https://develop.svn.wordpress.org/trunk@44623
git-svn-id: http://core.svn.wordpress.org/trunk@44454 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 14:05:00 +00:00
Felix Arntz
a6ec40d65d
Bootstrap/Load: Use wp_load_translations_early()
when Translation API is not yet loaded.
...
Props spacedmonkey.
Fixes #45932 . See #44458 .
Built from https://develop.svn.wordpress.org/trunk@44622
git-svn-id: http://core.svn.wordpress.org/trunk@44453 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 13:34:52 +00:00
Andrea Fercia
da760d1ecf
Taxonomy: Remove extra padding around buttons on term edit page.
...
Props monikarao, mukesh27, chetan200891.
See #9777 .
Fixes #45183 .
Built from https://develop.svn.wordpress.org/trunk@44621
git-svn-id: http://core.svn.wordpress.org/trunk@44452 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 12:59:52 +00:00
Gary Pendergast
077af6e47d
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 .
Built from https://develop.svn.wordpress.org/trunk@44620
git-svn-id: http://core.svn.wordpress.org/trunk@44451 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 06:16:49 +00:00
Gary Pendergast
8c702e04f3
Rewrite: Remove extra arguments being passed to WP_Rewrite::iis7_url_rewrite_rules()
.
...
Props rafsuntaskin.
Fixes #44185 .
Built from https://develop.svn.wordpress.org/trunk@44619
git-svn-id: http://core.svn.wordpress.org/trunk@44450 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 06:10:50 +00:00
Gary Pendergast
0bbb277ee4
Formatting: Add type checking to _sanitize_text_fields()
.
...
When a non-string value is passed, return an empty string.
Props Mte90.
Fixes #41450 .
Built from https://develop.svn.wordpress.org/trunk@44618
git-svn-id: http://core.svn.wordpress.org/trunk@44449 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 06:05:49 +00:00
Gary Pendergast
63cbfcbded
Plugin Editor: Disable the documentation look up button when no function is selected.
...
Props xkon.
Fixes #41143 .
Built from https://develop.svn.wordpress.org/trunk@44617
git-svn-id: http://core.svn.wordpress.org/trunk@44448 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 06:01:50 +00:00
Gary Pendergast
32ace06a39
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 .
Built from https://develop.svn.wordpress.org/trunk@44616
git-svn-id: http://core.svn.wordpress.org/trunk@44447 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 05:54:49 +00:00
Gary Pendergast
4fa5437fc1
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 .
Built from https://develop.svn.wordpress.org/trunk@44615
git-svn-id: http://core.svn.wordpress.org/trunk@44446 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 05:41:50 +00:00
Gary Pendergast
5ed802faf4
Docs: Correct the docs for POMO_Reader::setEndian()
.
...
The parameter type and name where the wrong way around.
Props ishitaka.
Fixes #45410 .
Built from https://develop.svn.wordpress.org/trunk@44614
git-svn-id: http://core.svn.wordpress.org/trunk@44445 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 05:36:48 +00:00
Gary Pendergast
19642fd0c9
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 .
Built from https://develop.svn.wordpress.org/trunk@44613
git-svn-id: http://core.svn.wordpress.org/trunk@44444 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 05:32:48 +00:00
Gary Pendergast
97aef0e336
Docs: Remove duplicate docblocks for the pre_user_login
and link_category
filters.
...
Props coffee2code.
Fixes #45308 .
Built from https://develop.svn.wordpress.org/trunk@44612
git-svn-id: http://core.svn.wordpress.org/trunk@44443 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 05:29:49 +00:00
Gary Pendergast
655d44ffe8
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 .
Built from https://develop.svn.wordpress.org/trunk@44611
git-svn-id: http://core.svn.wordpress.org/trunk@44442 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 04:27:50 +00:00
Gary Pendergast
dd9442ae6c
Posts: Set a HTTP 403 error when an incorrect post preview nonce is sent.
...
Props graymouser.
Fixes #43570 .
Built from https://develop.svn.wordpress.org/trunk@44610
git-svn-id: http://core.svn.wordpress.org/trunk@44441 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 03:54:50 +00:00
Gary Pendergast
6f723ddf50
Docs: Add documentation for the wp_maybe_auto_update
action.
...
Props MikeGillihan.
Fixes #43301 .
Built from https://develop.svn.wordpress.org/trunk@44609
git-svn-id: http://core.svn.wordpress.org/trunk@44440 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 03:38:49 +00:00
Gary Pendergast
f2d2126d0d
Admin Bar: Set the Admin Bar to not be showing on REST API requests.
...
Props ayeshrajans.
Fixes #45727 .
Built from https://develop.svn.wordpress.org/trunk@44608
git-svn-id: http://core.svn.wordpress.org/trunk@44439 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 02:54:50 +00:00
desrosj
4bb472ac32
Docs: Add missing documentation for _WP_Dependency::set_translations()
.
...
Introduced in [43859].
Props stazdotio.
Fixes #45550 .
Built from https://develop.svn.wordpress.org/trunk@44607
git-svn-id: http://core.svn.wordpress.org/trunk@44438 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 22:48:51 +00:00
desrosj
50ddffbac3
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 .
Built from https://develop.svn.wordpress.org/trunk@44606
git-svn-id: http://core.svn.wordpress.org/trunk@44437 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 22:35:52 +00:00
Gary Pendergast
c062e39ac8
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 .
Built from https://develop.svn.wordpress.org/trunk@44605
git-svn-id: http://core.svn.wordpress.org/trunk@44436 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 10:29:50 +00:00
Andrea Fercia
f76f57e8ab
Admin: Use the correct CSS media query for the Help tab on small screens after [44588].
...
See #43221
Built from https://develop.svn.wordpress.org/trunk@44604
git-svn-id: http://core.svn.wordpress.org/trunk@44435 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 07:48:50 +00:00
Gary Pendergast
e0c4e5b610
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 .
Built from https://develop.svn.wordpress.org/trunk@44603
git-svn-id: http://core.svn.wordpress.org/trunk@44434 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 06:33:50 +00:00
Gary Pendergast
8ddef3e98d
Users: Check that a valid user is passed to get_password_reset_key()
.
...
Props edocev.
Fixes #44601 .
Built from https://develop.svn.wordpress.org/trunk@44602
git-svn-id: http://core.svn.wordpress.org/trunk@44433 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 06:27:49 +00:00
Gary Pendergast
a5d8a6bde3
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 .
Built from https://develop.svn.wordpress.org/trunk@44601
git-svn-id: http://core.svn.wordpress.org/trunk@44432 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 06:18:51 +00:00
Gary Pendergast
656d8edcaf
Docs: Add docblocks for WP_Customize_Header_Image_Control
member variables.
...
Props subrataemfluence.
Fixes #44410 .
Built from https://develop.svn.wordpress.org/trunk@44600
git-svn-id: http://core.svn.wordpress.org/trunk@44431 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 05:54:48 +00:00
Gary Pendergast
e4b25f1be2
Build Tools: Don't send AppVeyor notifications on Slack on repeated successful builds.
...
See #44276 .
Built from https://develop.svn.wordpress.org/trunk@44599
git-svn-id: http://core.svn.wordpress.org/trunk@44430 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 05:49:49 +00:00
Gary Pendergast
883ee72ed6
Coding Standards: Move an assignment out of a condition in wp-admin/admin.php
.
...
Props subrataemfluence, jrf, pento.
Fixes #44363 .
Built from https://develop.svn.wordpress.org/trunk@44598
git-svn-id: http://core.svn.wordpress.org/trunk@44429 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 05:48:50 +00:00
Gary Pendergast
120710d8f8
Coding Standards: Move assignments out of conditions in wp-includes/user.php
.
...
Props subrataemfluence.
See #44315 .
Built from https://develop.svn.wordpress.org/trunk@44597
git-svn-id: http://core.svn.wordpress.org/trunk@44428 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 05:38:49 +00:00
Gary Pendergast
db696999f1
Updates: Tweak the "before updating, please back up..." message.
...
Props chetan200891, sebastien@thivinfo.com .
See #43790 .
Built from https://develop.svn.wordpress.org/trunk@44596
git-svn-id: http://core.svn.wordpress.org/trunk@44427 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 05:20:50 +00:00
Gary Pendergast
4de7979b25
Build Tools: Tweak AppVeyor settings.
...
- Set `grunt build` as the build script
- Disable testing and deployment options
- Customise the Slack integration message
- Only show the Slack message when the status changes
See #44276 .
Built from https://develop.svn.wordpress.org/trunk@44595
git-svn-id: http://core.svn.wordpress.org/trunk@44426 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 04:51:52 +00:00
Gary Pendergast
c009a1960a
Build Tools: Add AppVeyor integration.
...
AppVeyor allows us to test in a Windows environment. This first iteration tests that building works correctly.
Props netweb.
Fixes #44276 .
Built from https://develop.svn.wordpress.org/trunk@44594
git-svn-id: http://core.svn.wordpress.org/trunk@44425 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 04:21:50 +00:00
desrosj
59fbee8544
Coding Standards: Assignments must be the first block of code on a line.
...
Props subrataemfluence.
Fixes #44225 .
Built from https://develop.svn.wordpress.org/trunk@44593
git-svn-id: http://core.svn.wordpress.org/trunk@44424 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 02:41:50 +00:00
desrosj
34c4ce3c81
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 .
Built from https://develop.svn.wordpress.org/trunk@44592
git-svn-id: http://core.svn.wordpress.org/trunk@44423 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 02:08:49 +00:00
Gary Pendergast
bf43978730
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 .
Built from https://develop.svn.wordpress.org/trunk@44591
git-svn-id: http://core.svn.wordpress.org/trunk@44422 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 01:54:49 +00:00
Gary Pendergast
6073c6e209
Docs: Update the @since
version for the doing_it_wrong_trigger_error
filter.
...
Fixes #34183 .
Built from https://develop.svn.wordpress.org/trunk@44590
git-svn-id: http://core.svn.wordpress.org/trunk@44421 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 00:52:50 +00:00
Gary Pendergast
2f288c306c
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 .
Built from https://develop.svn.wordpress.org/trunk@44589
git-svn-id: http://core.svn.wordpress.org/trunk@44420 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 00:43:49 +00:00
Gary Pendergast
11e9c98d5b
Admin: Make the Help tab available on small screens.
...
Props jobthomas, xkon.
Fixes #43221 .
Built from https://develop.svn.wordpress.org/trunk@44588
git-svn-id: http://core.svn.wordpress.org/trunk@44419 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 00:20:50 +00:00
Gary Pendergast
d2695fe283
Query: Cache the result when get_pages()
doesn't find anything in the database.
...
Props flixos90, soulseekah.
Fixes #43514 .
Built from https://develop.svn.wordpress.org/trunk@44587
git-svn-id: http://core.svn.wordpress.org/trunk@44418 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-14 23:27:50 +00:00
Gary Pendergast
56e77d8928
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 .
Built from https://develop.svn.wordpress.org/trunk@44586
git-svn-id: http://core.svn.wordpress.org/trunk@44417 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-14 23:12:50 +00:00
Gary Pendergast
767fb99e94
Docs: Improve documentation of the `$wp_registered_sidebars
global.
...
Props mukesh27.
Fixes #43448 .
Built from https://develop.svn.wordpress.org/trunk@44585
git-svn-id: http://core.svn.wordpress.org/trunk@44416 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-14 23:01:49 +00:00
desrosj
a7d0293446
Tests: Add missing parent::tearDown()
.
...
Also, remove a `tearDown()` method that was not serving any purpose.
Fixes #45931 .
Built from https://develop.svn.wordpress.org/trunk@44584
git-svn-id: http://core.svn.wordpress.org/trunk@44415 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-14 21:34:55 +00:00
Gary Pendergast
51f4314441
Customizer: Use the sandbox
attribute to prevent top navigation from the preview.
...
Props valchovski.
Fixes #42341 .
Built from https://develop.svn.wordpress.org/trunk@44583
git-svn-id: http://core.svn.wordpress.org/trunk@44414 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-14 07:25:50 +00:00
Gary Pendergast
b083cc65aa
Customizer: Fix a coding standards issue introduced in [44580].
...
See #40020 .
Built from https://develop.svn.wordpress.org/trunk@44582
git-svn-id: http://core.svn.wordpress.org/trunk@44413 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-14 07:23:50 +00:00
Gary Pendergast
0390ddad6b
Docs: Improve docblocks for _get_plugin_data_markup_translate()
and _sort_uname_callback()
.
...
Props Jaydeep Rami.
Fixes #42228 .
Built from https://develop.svn.wordpress.org/trunk@44581
git-svn-id: http://core.svn.wordpress.org/trunk@44412 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-14 06:54:49 +00:00
Gary Pendergast
d8f4a04232
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 .
Built from https://develop.svn.wordpress.org/trunk@44580
git-svn-id: http://core.svn.wordpress.org/trunk@44411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-14 06:38:51 +00:00
Gary Pendergast
10c66fb426
Formatting: Remove soft hyphens when sanitising titles.
...
Props andg.
Fixes #45378 .
Built from https://develop.svn.wordpress.org/trunk@44579
git-svn-id: http://core.svn.wordpress.org/trunk@44410 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-14 05:39:51 +00:00
Gary Pendergast
fcd66d09d9
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 .
Built from https://develop.svn.wordpress.org/trunk@44578
git-svn-id: http://core.svn.wordpress.org/trunk@44409 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-14 05:05:48 +00:00
Gary Pendergast
5ed789dc63
Tests: Add missing parent::setUp()
calls to all test classes.
...
Props johnbillion, birgire.
Fixes #37375 .
Built from https://develop.svn.wordpress.org/trunk@44577
git-svn-id: http://core.svn.wordpress.org/trunk@44408 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-14 04:54:50 +00:00
Gary Pendergast
0bbfe3b8e2
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 .
Built from https://develop.svn.wordpress.org/trunk@44576
git-svn-id: http://core.svn.wordpress.org/trunk@44407 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-14 01:47:51 +00:00
Andrea Fercia
1c59f76953
Accessibility: Exclude the Windows High Contrast mode transparent outline from the CSS transition after [44544].
...
See #41286 .
Built from https://develop.svn.wordpress.org/trunk@44575
git-svn-id: http://core.svn.wordpress.org/trunk@44406 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-12 15:01:49 +00:00
Gary Pendergast
7a617078fa
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 .
Built from https://develop.svn.wordpress.org/trunk@44574
git-svn-id: http://core.svn.wordpress.org/trunk@44405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-12 06:41:52 +00:00
Gary Pendergast
8656a65e1e
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 .
Built from https://develop.svn.wordpress.org/trunk@44573
git-svn-id: http://core.svn.wordpress.org/trunk@44404 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-12 06:06:48 +00:00
Gary Pendergast
3a697f7f46
Coding Standards: Remove an unnecessary line whitelisting.
...
Props jrf.
See #45934 .
Built from https://develop.svn.wordpress.org/trunk@44572
git-svn-id: http://core.svn.wordpress.org/trunk@44403 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-12 04:53:51 +00:00
Gary Pendergast
f72594974f
Coding Standards: Exclude some external files.
...
- `class-wp-block-parser.php` and `wp-includes/blocks/*` are imported from the Gutenberg plugin.
- `speed-trap-listener.php` is a third party library.
See #45934 .
Built from https://develop.svn.wordpress.org/trunk@44571
git-svn-id: http://core.svn.wordpress.org/trunk@44402 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-12 04:01:50 +00:00
Gary Pendergast
57fcb7d8dd
Coding Standards: Fix an incorrect phpcs:ignore
comment.
...
It's `phpcs:ignore`, not `wpcs:ignore`.
Props GaryJ.
See #45934 .
Built from https://develop.svn.wordpress.org/trunk@44570
git-svn-id: http://core.svn.wordpress.org/trunk@44401 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-12 03:49:49 +00:00
Gary Pendergast
08e8270a48
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 .
Built from https://develop.svn.wordpress.org/trunk@44569
git-svn-id: http://core.svn.wordpress.org/trunk@44400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-12 03:20:48 +00:00
desrosj
2785313bf2
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 .
Built from https://develop.svn.wordpress.org/trunk@44568
git-svn-id: http://core.svn.wordpress.org/trunk@44399 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 18:19:49 +00:00
Andrea Fercia
298ef1992e
Menus: Make menu items not jump while dragging items.
...
Props alexvorn2, welcher, afercia.
Fixes #41160 .
Built from https://develop.svn.wordpress.org/trunk@44567
git-svn-id: http://core.svn.wordpress.org/trunk@44398 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 13:56:49 +00:00
Gary Pendergast
4f861b9548
Coding Standards: Fix the Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace
violations.
...
See #45934 .
Built from https://develop.svn.wordpress.org/trunk@44566
git-svn-id: http://core.svn.wordpress.org/trunk@44397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 06:40:50 +00:00
Gary Pendergast
6d5cd6842a
Coding Standards: Document intentional case
block fall-throughs.
...
Fixes `PSR2.ControlStructures.SwitchDeclaration.TerminatingComment` violations.
See #45934 .
Built from https://develop.svn.wordpress.org/trunk@44565
git-svn-id: http://core.svn.wordpress.org/trunk@44396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 06:26:50 +00:00
Gary Pendergast
c00229969a
Coding Standards: Add exceptions for WordPress.Files.FileName.NotHyphenatedLowercase
.
...
See #45934 .
Built from https://develop.svn.wordpress.org/trunk@44564
git-svn-id: http://core.svn.wordpress.org/trunk@44395 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 06:17:50 +00:00
Gary Pendergast
3cbd512161
Coding Standards: Ignore the violations of Generic.NamingConventions.UpperCaseConstantName.ConstantNotUpperCase
.
...
See #45934 .
Built from https://develop.svn.wordpress.org/trunk@44563
git-svn-id: http://core.svn.wordpress.org/trunk@44394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 06:08:50 +00:00
Gary Pendergast
c008959e9e
Coding Standards: Fix the minor WordPress.WP.I18n
violations.
...
`WordPress.WP.I18n.MissingTranslatorsComment` is in progress in #44360 .
See #45934 .
Built from https://develop.svn.wordpress.org/trunk@44562
git-svn-id: http://core.svn.wordpress.org/trunk@44393 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 06:04:49 +00:00
Gary Pendergast
e05b19d248
Coding Standards: template.php
isn't a template tag file.
...
`WordPress.Files.FileName.InvalidTemplateTagFileName` shouldn't apply to it.
See #45934 .
Built from https://develop.svn.wordpress.org/trunk@44561
git-svn-id: http://core.svn.wordpress.org/trunk@44392 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 05:00:50 +00:00
Gary Pendergast
9e87cb7fa2
Coding Standards: Ignore the single WordPress.PHP.RestrictedPHPFunctions.create_function_create_function violation.
...
This is intentional, for older PHP support.
See #45934 .
Built from https://develop.svn.wordpress.org/trunk@44560
git-svn-id: http://core.svn.wordpress.org/trunk@44391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 03:45:48 +00:00
Gary Pendergast
5afa0c9ee3
Coding Standards: Remove PHPCS 2.x @codingStandardsIgnore*
ignore syntax.
...
Props netweb.
Fixes #42808 .
Built from https://develop.svn.wordpress.org/trunk@44559
git-svn-id: http://core.svn.wordpress.org/trunk@44390 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 03:04:51 +00:00
Gary Pendergast
3c0c01f348
Post WordPress 5.1 Beta 1 version bump.
...
Built from https://develop.svn.wordpress.org/trunk@44558
git-svn-id: http://core.svn.wordpress.org/trunk@44389 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 00:59:50 +00:00
Gary Pendergast
e11b64ddba
WordPress 5.1 Beta 1.
...
Built from https://develop.svn.wordpress.org/trunk@44557
git-svn-id: http://core.svn.wordpress.org/trunk@44388 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 00:42:48 +00:00
Gary Pendergast
8e623691c0
Emoji: Fix a code formatting error introduced in [44554].
...
See #45930 .
Built from https://develop.svn.wordpress.org/trunk@44556
git-svn-id: http://core.svn.wordpress.org/trunk@44387 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 23:40:49 +00:00
Gary Pendergast
203d686ec9
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 .
Built from https://develop.svn.wordpress.org/trunk@44555
git-svn-id: http://core.svn.wordpress.org/trunk@44386 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 23:31:50 +00:00
Gary Pendergast
92146fe52b
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 .
Built from https://develop.svn.wordpress.org/trunk@44554
git-svn-id: http://core.svn.wordpress.org/trunk@44385 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 23:20:52 +00:00
Gary Pendergast
8e2f6a9923
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 .
Built from https://develop.svn.wordpress.org/trunk@44553
git-svn-id: http://core.svn.wordpress.org/trunk@44384 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 23:16:50 +00:00
desrosj
b98affb210
Embeds: Remove Photobucket, FunnyOrDie from the list of oEmbed providers.
...
These services no longer support oEmbed.
Props skostadinov, notnownikki.
Fixes #45399 .
Built from https://develop.svn.wordpress.org/trunk@44552
git-svn-id: http://core.svn.wordpress.org/trunk@44383 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 22:42:51 +00:00
Andrea Fercia
9a9b5699fd
Accessibility: Improve text input in the Tags meta box when using Safari + Voiceover.
...
Props parbaugh, konainm, wbrubaker, pento, ryelle.
Fixes #44966 .
Built from https://develop.svn.wordpress.org/trunk@44551
git-svn-id: http://core.svn.wordpress.org/trunk@44382 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 22:30:49 +00:00
desrosj
d11928bc65
Docs: Add missing periods to param
annotations for flip()
in WP_Image_Editor_GD
.
...
Props hitendra-chopda.
Fixes #45208 .
Built from https://develop.svn.wordpress.org/trunk@44550
git-svn-id: http://core.svn.wordpress.org/trunk@44381 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 22:10:50 +00:00
Andrea Fercia
64bbbda39e
Accessibility: Improve color contrast ratio in the Events and News dashboard widget.
...
Props boemedia, lucagrandicelli.
Fixes #45280 .
Built from https://develop.svn.wordpress.org/trunk@44549
git-svn-id: http://core.svn.wordpress.org/trunk@44380 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 22:08:49 +00:00
desrosj
3dcc536b80
Media: Correct since
annotation for adding the caption_id
attribute.
...
Introduced in [42704]
Fixes #34595 .
Built from https://develop.svn.wordpress.org/trunk@44548
git-svn-id: http://core.svn.wordpress.org/trunk@44379 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 21:37:49 +00:00
Felix Arntz
be54938eef
General: Fix existing coding standard violations in bookmark tests, as outlined in [44546].
...
See #43977 .
Built from https://develop.svn.wordpress.org/trunk@44547
git-svn-id: http://core.svn.wordpress.org/trunk@44378 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 21:17:51 +00:00
Felix Arntz
a71d208785
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 .
Built from https://develop.svn.wordpress.org/trunk@44546
git-svn-id: http://core.svn.wordpress.org/trunk@44377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 21:06:49 +00:00
Andrea Fercia
0b5beabd36
Accessibility: Remove negative tabindex from the login, install, and setup pages header.
...
Props bamadesigner, rishishah, jainnidhi.
Fixes #42632 .
Built from https://develop.svn.wordpress.org/trunk@44545
git-svn-id: http://core.svn.wordpress.org/trunk@44376 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 17:21:52 +00:00
Andrea Fercia
7481337591
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 .
Built from https://develop.svn.wordpress.org/trunk@44544
git-svn-id: http://core.svn.wordpress.org/trunk@44375 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 16:47:50 +00:00
Andrea Fercia
c40ae024cd
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 .
Built from https://develop.svn.wordpress.org/trunk@44543
git-svn-id: http://core.svn.wordpress.org/trunk@44374 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 16:31:49 +00:00
desrosj
ae5c195d57
Media: Introduce the has_post_thumbnail
filter.
...
Props rzen, desrosj.
Fixes #44859 .
Built from https://develop.svn.wordpress.org/trunk@44542
git-svn-id: http://core.svn.wordpress.org/trunk@44373 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 15:28:50 +00:00
Felix Arntz
f251342de7
I18n: Add missing translator comments in wp-admin/includes/class-wp-plugins-list-table.php
.
...
Fixes #45898 .
Built from https://develop.svn.wordpress.org/trunk@44541
git-svn-id: http://core.svn.wordpress.org/trunk@44372 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 10:46:53 +00:00
desrosj
ca36ed433b
Docs: Correct since
annotation for _wp_get_allowed_postdata()
.
...
This function was introduced in 5.0.1, not 4.9.9 as currently indicated. Introduced in [44047].
Built from https://develop.svn.wordpress.org/trunk@44540
git-svn-id: http://core.svn.wordpress.org/trunk@44371 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 03:31:49 +00:00
Gary Pendergast
2772e5ec06
Admin: Don't use the keyup
event in addition to the input
event.
...
The `keyup` event was used to provide support for IE8, where which doesn't support the `input` event. As we dropped IE8 support some time ago, this was simply adding unnecessary complexity and double-event triggers.
Props dlh, afercia.
Fixes #32882 .
Built from https://develop.svn.wordpress.org/trunk@44539
git-svn-id: http://core.svn.wordpress.org/trunk@44370 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 02:57:50 +00:00
desrosj
8eb90ac374
Docs: Restore output
annotation in tags-suggest.js
.
...
This was mistakenly removed in [44537].
See #38922 .
Built from https://develop.svn.wordpress.org/trunk@44538
git-svn-id: http://core.svn.wordpress.org/trunk@44369 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 02:50:51 +00:00
desrosj
6fbf4ceaea
REST API: Restore use of wp_ajax_ajax_tag_search()
for tag search.
...
This solution does not work with custom taxonomies in the current state.
Reverts [42614,42619,42737].
Props danielbachhuber.
See #38922 .
Built from https://develop.svn.wordpress.org/trunk@44537
git-svn-id: http://core.svn.wordpress.org/trunk@44368 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 02:37:51 +00:00
Gary Pendergast
8441700842
Tests: Add support for a WP_TESTS_SKIP_INSTALL
environment variable.
...
Defining `WP_TESTS_SKIP_INSTALL=1` when running tests will skip the install step. While this shouldn't be used for full test runs, it's useful for saving time when running small groups of tests.
Props soulseekah.
Fixes #43432 .
Built from https://develop.svn.wordpress.org/trunk@44536
git-svn-id: http://core.svn.wordpress.org/trunk@44367 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 02:19:50 +00:00
desrosj
7855451267
Privacy: Add unit tests for privacy erasure fulfillment notifications.
...
Adds appropriate unit tests for `_wp_privacy_send_erasure_fulfillment_notification()`.
Props birgire, desrosj.
Fixes #44234 .
Built from https://develop.svn.wordpress.org/trunk@44535
git-svn-id: http://core.svn.wordpress.org/trunk@44366 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 02:07:49 +00:00
Gary Pendergast
c219081ce7
Build/Tests: Allow running unit tests from src
.
...
This is a partial recommit of [44509]: it allows running unit tests from `src` (which is useful), but doesn't make it the default (which Travis is having issues with).
See #45863 .
Built from https://develop.svn.wordpress.org/trunk@44534
git-svn-id: http://core.svn.wordpress.org/trunk@44365 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 02:04:50 +00:00
Gary Pendergast
14c44ad703
Block Editor: Upgrade the @wordpress/
packages.
...
This brings the block editor in core up to date with the Gutenberg 4.8 plugin release.
Props aduth, gziolo, youknowriad, mkaz, jorgefilipecosta, swissspidy, iseulde, soean, noisysocks, joen, brentswisher, dekervit, dimadin, zebulan, johnny5, nosolosw, netweb, ryelle, etoledom, mzorz, desrosj, mmtr86, tinkerbelly, ocean90, earnjam, ajitbohra, talldanwp, notnownikki, mcsf, afercia, adamsilverstein, gutendev, naoki0h, miyauchi, aldavigdis.
Fixes #45885 .
Built from https://develop.svn.wordpress.org/trunk@44533
git-svn-id: http://core.svn.wordpress.org/trunk@44364 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 01:54:56 +00:00
desrosj
da77cad30f
PHPCS: Fix formatting issues.
...
Fixes formatting issues introduced in [44528].
See #42017 .
Built from https://develop.svn.wordpress.org/trunk@44532
git-svn-id: http://core.svn.wordpress.org/trunk@44363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 01:52:52 +00:00
desrosj
72098048c6
Docs: Update since
annotation for text-transform
support in safecss_filter_attr()
.
...
Introduced in [42880].
Fixes #42729 .
Built from https://develop.svn.wordpress.org/trunk@44531
git-svn-id: http://core.svn.wordpress.org/trunk@44362 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 01:43:49 +00:00
desrosj
d83d8e1154
Docs: Update since
annotation for comments_list_table_query_args
.
...
Introduced in [42420].
Fixes #42997 .
Built from https://develop.svn.wordpress.org/trunk@44530
git-svn-id: http://core.svn.wordpress.org/trunk@44361 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 01:40:51 +00:00
Gary Pendergast
e69c1039eb
Build Tools: Copy unminified JS files to src
.
...
This allows `SCRIPT_DEBUG` to be set to `true` when running from `src`.
Fixes #45869 .
Built from https://develop.svn.wordpress.org/trunk@44529
git-svn-id: http://core.svn.wordpress.org/trunk@44360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 01:39:50 +00:00
desrosj
13c66b1b18
Media: Store audio creation date in meta.
...
In [41746], `wp_get_media_creation_timestamp()` was introduced to read the created timestamp for videos from `getID3` in meta whenever possible. This information is useful separately from the dates on the file itself.
This adds the same support audio files by utilizing `wp_get_media_creation_timestamp()` in `wp_read_audio_metadata()`.
Props blob folio, desrosj.
Fixes #42017 .
Built from https://develop.svn.wordpress.org/trunk@44528
git-svn-id: http://core.svn.wordpress.org/trunk@44359 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 01:32:50 +00:00
desrosj
cf1e3b0c40
Docs: Update since
annotations WP_Error::has_errors()
...
Introduced in [42761].
Fixes #42742 .
Built from https://develop.svn.wordpress.org/trunk@44527
git-svn-id: http://core.svn.wordpress.org/trunk@44358 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 22:42:51 +00:00
Felix Arntz
5bb4a5aa0e
Upgrade/Install: Add missing call to clear site meta cache in populate_site_meta()
.
...
See #44896 .
Built from https://develop.svn.wordpress.org/trunk@44526
git-svn-id: http://core.svn.wordpress.org/trunk@44357 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 21:29:50 +00:00
Felix Arntz
83603991c6
Bootstrap/Load: Fix missing object argument for singular capability checks and support capability tests overlooked in [44524].
...
See #44458 .
Built from https://develop.svn.wordpress.org/trunk@44525
git-svn-id: http://core.svn.wordpress.org/trunk@44356 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 20:44:50 +00:00
Felix Arntz
1e4088fc98
Bootstrap/Load: Introduce fatal error recovery mechanism allowing users to still log in to their admin dashboard.
...
This changeset introduces a `WP_Shutdown_Handler` class that detects fatal errors and which extension (plugin or theme) causes them. Such an error is then recorded, and an error message is displayed. Subsequently, in certain protected areas, for example the admin, the broken extension will be paused, ensuring that the website is still usable in the respective area. The major benefit is that this mechanism allows site owners to still log in to their website, to fix the problem by either disabling the extension or solving the bug and then resuming the extension.
Extensions are only paused in certain designated areas. The frontend for example stays unaffected, as it is impossible to know what pausing the extension would cause to be missing, so it might be preferrable to clearly see that the website is temporarily not accessible instead.
The fatal error recovery is especially important in scope of encouraging the switch to a maintained PHP version, as not necessarily every WordPress extension is compatible with all PHP versions. If problems occur now, non-technical site owners that do not have immediate access to the codebase are not locked out of their site and can at least temporarily solve the problem quickly.
Websites that have custom requirements in that regard can implement their own shutdown handler by adding a `shutdown-handler.php` drop-in that returns the handler instance to use, which must be based on a class that inherits `WP_Shutdown_Handler`. That handler will then be used in place of the default one.
Websites that would like to modify specifically the error template displayed in the frontend can add a `php-error.php` drop-in that works similarly to the existing `db-error.php` drop-in.
Props afragen, bradleyt, flixos90, ocean90, schlessera, SergeyBiryukov, spacedmonkey.
Fixes #44458 .
Built from https://develop.svn.wordpress.org/trunk@44524
git-svn-id: http://core.svn.wordpress.org/trunk@44355 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 20:05:49 +00:00
Boone Gorges
811be4779e
Taxonomy: Update @since
annotations for meta_box_sanitize_cb
arg.
...
Introduced in [42211].
Fixes #36514 .
Built from https://develop.svn.wordpress.org/trunk@44519
git-svn-id: http://core.svn.wordpress.org/trunk@44350 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 15:11:48 +00:00
desrosj
04dff0e2a9
Docs: Update since
annotations for adding LIKE
comparisons with meta keys.
...
Previously introduced in [42768].
Fixes #42409 .
Built from https://develop.svn.wordpress.org/trunk@44518
git-svn-id: http://core.svn.wordpress.org/trunk@44349 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 14:55:49 +00:00
Pascal Birchler
1224ebd0ac
Build/Test Tools: Update .gitignore
to exclude twentynineteen
and twentysixteen
.
...
Brings the list of bundled themes in `.gitignore` up to date.
Fixes #45474 .
Built from https://develop.svn.wordpress.org/trunk@44517
git-svn-id: http://core.svn.wordpress.org/trunk@44348 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 13:45:49 +00:00
Pascal Birchler
9bcdc25145
Build/Test Tools: Fix coding standards issues after [44515] and [44514].
...
See #44494 , #43743 .
Built from https://develop.svn.wordpress.org/trunk@44516
git-svn-id: http://core.svn.wordpress.org/trunk@44347 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 12:37:49 +00:00
Pascal Birchler
8f5e0ae06c
Taxonomy: Display term list table in full width if there is no edit form.
...
Makes sure there is no empty space when a user can manage terms but lacks the capability to edit terms.
Props mathieuhays, marcwieland95.
Fixes #43743 .
Built from https://develop.svn.wordpress.org/trunk@44515
git-svn-id: http://core.svn.wordpress.org/trunk@44346 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 12:05:50 +00:00
Pascal Birchler
a595f8a525
I18N: Add option to hide en_US locale in wp_dropdown_languages()
.
...
Props danieltj for initial patch.
Fixes #44494 .
Built from https://develop.svn.wordpress.org/trunk@44514
git-svn-id: http://core.svn.wordpress.org/trunk@44345 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 11:46:50 +00:00
Pascal Birchler
d32d061a5e
Upgrade/Install: Prevent possible JavaScript error when updating translations.
...
Props Presskopp.
Fixes #39189 .
Built from https://develop.svn.wordpress.org/trunk@44513
git-svn-id: http://core.svn.wordpress.org/trunk@44344 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 11:26:50 +00:00
Gary Pendergast
f57b25f447
Tests: Revert [44509].
...
This commit causes Travis to fail.
See #45863 .
Built from https://develop.svn.wordpress.org/trunk@44512
git-svn-id: http://core.svn.wordpress.org/trunk@44343 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 11:14:51 +00:00
Pascal Birchler
3b0b49f900
Embeds: Fix typo introduced in [44484].
...
Props JustinSainton.
Fixes #45036 .
Built from https://develop.svn.wordpress.org/trunk@44511
git-svn-id: http://core.svn.wordpress.org/trunk@44342 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 10:54:51 +00:00
Gary Pendergast
f9208ac14e
Tests: Improve REST API tests for categories and tags.
...
Props birgire, SergeyBiryukov.
See #39122 .
Fixes #45077 .
Built from https://develop.svn.wordpress.org/trunk@44510
git-svn-id: http://core.svn.wordpress.org/trunk@44341 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 10:31:51 +00:00
Gary Pendergast
0062616aa7
Build/Tests: Default to running unit tests from src
.
...
This is the actual commit, unlike [44508], which was not.
Props atimmer.
See #44492 .
Fixes #45863 .
Built from https://develop.svn.wordpress.org/trunk@44509
git-svn-id: http://core.svn.wordpress.org/trunk@44340 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 10:14:55 +00:00
Gary Pendergast
e0caaf7628
Build/Tests: Default to running unit tests from src
.
...
This commit also defaults WP-CLI commands to running against `src`, too.
Props atimmer, pento.
See #44492 .
Fixes #45863 .
Built from https://develop.svn.wordpress.org/trunk@44508
git-svn-id: http://core.svn.wordpress.org/trunk@44339 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 10:10:51 +00:00
Dominik Schilling
6503f77539
Build/Tools: Fix typo in phpcs.xml.dist
.
...
See #44366 .
Built from https://develop.svn.wordpress.org/trunk@44507
git-svn-id: http://core.svn.wordpress.org/trunk@44338 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 10:02:53 +00:00
Gary Pendergast
9f25ea37c7
Filesystem: Improve wp_is_stream()
performance.
...
Instead of turning the return value of `stream_get_wrappers()` into a regex to match the scheme, we can instead extract the scheme and search the return value of `stream_get_wrappers()`.
Props schlessera, swissspidy.
Fixes #45553 .
Built from https://develop.svn.wordpress.org/trunk@44506
git-svn-id: http://core.svn.wordpress.org/trunk@44337 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 09:51:54 +00:00