Commit Graph

39060 Commits

Author SHA1 Message Date
Gary Pendergast 73cbf3ec7d Docs: Add missing periods to a grab-bag of docblocks.
Props Hitendra Chopda.
Fixes #45409.



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

See #44672.

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

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

Props fuchsws, rachelbaker, desrosj.
Fixes #44672.

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

Props subrataemfluence, adamsilverstein.
Fixes #42239.


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

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

Props stevefaulkner, aardrian.
Fixes #43154.


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

See #44502.



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

Props nadim0988, afercia.
Fixes #45185.


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



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



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

Props subrataemfluence, jirihon.
Fixes #44303.



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



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

Props pento, laghee.
Fixes #44560.



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

Props chetan200891, garrett-eclipse.
Fixes #46014.



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



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

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

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

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

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

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

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

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


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

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

Props spacedmonkey.
See #45933, #44458.


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

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

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

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


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

See #45940, #44458.


git-svn-id: https://develop.svn.wordpress.org/trunk@44623 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-16 14:03:35 +00:00
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 0c9236ae42 Build Tools: Don't send AppVeyor notifications on Slack on repeated successful builds.
See #44276.



git-svn-id: https://develop.svn.wordpress.org/trunk@44599 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-15 05:48:46 +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
Gary Pendergast e8781736ed 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@44595 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-15 04:50:03 +00:00
Gary Pendergast 6dbb6750e3 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.



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