Commit Graph

38931 Commits

Author SHA1 Message Date
Gary Pendergast
ec7687b1d9 Tests: Improve REST API tests for categories and tags.
Props birgire, SergeyBiryukov.
See #39122.
Fixes #45077.



git-svn-id: https://develop.svn.wordpress.org/trunk@44510 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 10:30:49 +00:00
Gary Pendergast
0137c23f8d 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@44509 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 10:13:13 +00:00
Gary Pendergast
4198e71db7 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@44508 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 10:09:02 +00:00
Dominik Schilling (ocean90)
ed1b4dc41f Build/Tools: Fix typo in phpcs.xml.dist.
See #44366.

git-svn-id: https://develop.svn.wordpress.org/trunk@44507 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 10:01:32 +00:00
Gary Pendergast
ba495ec173 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@44506 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 09:50:19 +00:00
Peter Wilson
f3b7b7f966 Cron: Fix undefined variable notice.
Restore `$gmt_time` variable removed in error from [44483].

Props afragen.
Fixes #45870.



git-svn-id: https://develop.svn.wordpress.org/trunk@44505 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 08:36:07 +00:00
Gary Pendergast
e5b5db9e23 Block Editor: Obey the AUTOSAVE_INTERVAL constant.
Props youknowriad.
Fixes #45262.



git-svn-id: https://develop.svn.wordpress.org/trunk@44504 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 06:53:15 +00:00
Gary Pendergast
2a6e44a306 Docs: Correct the documentation for wp_list_authors().
The `exclude_admin` argument defaults to `true`, not `false`.

Props haruharuharuby.
Fixes #45120.



git-svn-id: https://develop.svn.wordpress.org/trunk@44503 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 06:51:38 +00:00
Gary Pendergast
62b4465532 Comments: Add new tests missed in [44499].
Props dshanske, birgire.
Fixes #44033.


git-svn-id: https://develop.svn.wordpress.org/trunk@44502 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 06:19:53 +00:00
Gary Pendergast
36a2ed3f56 Docs: Document the $page_hook action.
Props johnbillion.
Fixes #43643.



git-svn-id: https://develop.svn.wordpress.org/trunk@44501 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 06:13:44 +00:00
Gary Pendergast
31fdd577b4 Bundled Themes: Run the pingback_url through esc_url().
Twenties Ten through Seventeen have been updated to properly escape the pingback URL. Twenty Nineteen is already escaping the URL.

Props soulseekah, sharaz.
Fixes #43717.



git-svn-id: https://develop.svn.wordpress.org/trunk@44500 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 06:10:13 +00:00
Gary Pendergast
e5bdc271cb Comments: Add a new is_avatar_comment_type() function.
This function splits the `get_avatar_comment_types` filter out of `get_avatar_data()`.

Props dshanske, birgire.
Fixes #44033.



git-svn-id: https://develop.svn.wordpress.org/trunk@44499 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 05:59:49 +00:00
Gary Pendergast
943dcbbcef Docs: Add docblocks to the members of WP_Widget_Form_Customize_Control.
Props subrataemfluence.
Fixes #44420.



git-svn-id: https://develop.svn.wordpress.org/trunk@44498 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 05:48:33 +00:00
Gary Pendergast
ae62335191 Docs: Add docblocks for the PHPUnit factory objects.
Props andizer.
Fixes #44521.


git-svn-id: https://develop.svn.wordpress.org/trunk@44497 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 05:43:14 +00:00
Gary Pendergast
477adade57 Docs: Update Codex references to the Template_Hierarchy page.
https://codex.wordpress.org/Template_Hierarchy redirects to https://developer.wordpress.org/themes/basics/template-hierarchy/, so we should link to the correct page.

Props kmeze, pento.
Fixes #45222.



git-svn-id: https://develop.svn.wordpress.org/trunk@44496 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 05:08:25 +00:00
Gary Pendergast
e615ea6b91 Docs: Add @see WP_Session_Tokens to the WP_User_Meta_Session_Tokens docblock.
Props utsav72640.
Fixes #45499.



git-svn-id: https://develop.svn.wordpress.org/trunk@44495 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 05:03:25 +00:00
Gary Pendergast
3d030132ae Privacy: Fix a code formatting error introduced in [44491].
See #44908.



git-svn-id: https://develop.svn.wordpress.org/trunk@44494 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 04:32:59 +00:00
Gary Pendergast
acba2e55df Privacy: Tweak the wording of the success notice when updating the privacy policy page setting.
Props garrett-eclipse.
Fixes #44129.



git-svn-id: https://develop.svn.wordpress.org/trunk@44493 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 04:18:10 +00:00
Gary Pendergast
1c6336c881 Privacy: Always show the privacy policy guide.
Previously, the link to the privacy policy guide would only be displayed when a privacy policy page had been selected, but the guide is generally useful without that.

Props mukesh27, birgire.
Fixes #44871.



git-svn-id: https://develop.svn.wordpress.org/trunk@44492 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 04:00:10 +00:00
Gary Pendergast
37b849714f Privacy: Remove some unnecessary parameters being passed to wp_update_post() by wp_generate_user_request_key().
Props garrett-eclipse.
Fixes #44908.



git-svn-id: https://develop.svn.wordpress.org/trunk@44491 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 03:50:33 +00:00
Gary Pendergast
b4c34c1710 Help/About: Add a lang attribute to the <html> tag in readme.html
Props audrasjb.
Fixes #44955.



git-svn-id: https://develop.svn.wordpress.org/trunk@44490 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 02:55:54 +00:00
Gary Pendergast
bc027fb70f Login: Improve the error message when retrieving a lost password.
When an invalid username or email address is entered, the form now displays a better error message.

Props mrtortai, iamfriendly, TomHarrigan, afercia, pento.
Fixes #31788.



git-svn-id: https://develop.svn.wordpress.org/trunk@44489 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 02:05:08 +00:00
Alex Shiels
e06121f2ed Cron API: Make wp-cron.php non-blocking where possible.
This should make cron spawning faster by ensuring requests to wp-cron.php return immediately regardless of transport method. It is enabled only on recent PHP versions with fastcgi, due to historical bugs and availability of `fastcgi_finish_request()`. This needs testing on a range of platforms, to help determine if it's safe to use in other contexts also.

Props vnsavage, johnbillion, jnylen0.
See #18738, #41358


git-svn-id: https://develop.svn.wordpress.org/trunk@44488 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 01:05:16 +00:00
Gary Pendergast
bd7415490e Docs: Update the @since tag for the comment_status_links filter.
Fixes #42379.



git-svn-id: https://develop.svn.wordpress.org/trunk@44487 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 01:05:04 +00:00
Gary Pendergast
d2f0d5c812 Embeds: Add Instagram TV support.
Props dannydehaan.
Fixes #44557.



git-svn-id: https://develop.svn.wordpress.org/trunk@44486 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 00:23:35 +00:00
Gary Pendergast
b9e752770c Admin: Add a "Set up your homepage" link to the Welcome panel.
As many WordPress sites use a static homepage rather than a blog, this link gives a natural next step for new sites owners wanting to configure their site in this manner.

Props professor44, joyously, nielslange, mukesh27, melchoyce.
Fixes #45019.



git-svn-id: https://develop.svn.wordpress.org/trunk@44485 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 00:11:25 +00:00
Gary Pendergast
78064d5ce3 Embeds: Polldaddy is now called Crowdsignal.
Crowdsignal adds an additional embed URL, survey.fm.

Props donncha.
Fixes #45036.



git-svn-id: https://develop.svn.wordpress.org/trunk@44484 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 23:51:25 +00:00
Peter Wilson
0bc20594c7 Cron API: Add function and filter to return ready cron jobs.
Add the function `wp_get_ready_cron_jobs()` to return a modified version of the cron array limited to jobs ready to be run, ie with a timestamp of `time()` or earlier.

The new function includes the filter `pre_get_ready_cron_jobs` to allow for custom cron storage systems. This rounds out the functionality added in #32656.

Props Pento for code review.
Fixes #45797.



git-svn-id: https://develop.svn.wordpress.org/trunk@44483 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 21:48:07 +00:00
Jonathan Desrosiers
5778bffd42 REST API: Introduce rest_post_search_query filter.
This filter allows the query arguments to be manipulated for a post search query in the REST API.

Props Chouby, swissspidy.
Fixes #45454.

git-svn-id: https://develop.svn.wordpress.org/trunk@44482 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 21:44:06 +00:00
Adam Silverstein
f968e9d52f Media: improve the human_readable_duration function and tests.
Improve the `human_readable_duration` added in #39667:
* Remove upper limit.
* More resilient handling: remove negative prefix, trim.
* Correct @since to 5.1.0.
* Adds more test cases and improve inline docs.

Props birgire.
Fixes #39667.


git-svn-id: https://develop.svn.wordpress.org/trunk@44481 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 19:55:31 +00:00
Jonathan Desrosiers
559056f62f Docs: Improve accuracy of wp_list_sort()’s $list parameter description.
Props manikmist09.
Fixes #45766.

git-svn-id: https://develop.svn.wordpress.org/trunk@44480 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 19:53:34 +00:00
Jonathan Desrosiers
cd100a117d Docs: Fix typos in Twenty Seventeen function descriptions.
Props faisal03, mukesh27.
Fixes #45466.

git-svn-id: https://develop.svn.wordpress.org/trunk@44479 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 19:21:28 +00:00
Jonathan Desrosiers
c7e92e437c Tests: Add missing test cases for is_serialized_string().
Also, reorganize these tests into their own class.

Props pbearne.
Fixes #42870.

git-svn-id: https://develop.svn.wordpress.org/trunk@44478 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 19:04:51 +00:00
Jonathan Desrosiers
49509a1c6a Docs: Specify missing global variables used in wp_print_theme_file_tree().
The `$relative_file` and `$stylesheet` variables are used in the `wp_print_theme_file_tree()` function but were not noted within the inline documentation.

Props mukesh27, desrosj,
Fixes #43682.

git-svn-id: https://develop.svn.wordpress.org/trunk@44477 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 18:32:10 +00:00
Felix Arntz
aea4b2765a General: Make Update PHP notice link customizable.
After [42832], [42891] and [43006], this changeset refines the core notice informing about an outdated PHP version:

* The link to the Update PHP information page can now be adjusted using either a `WP_UPDATE_PHP_URL` environment variable, or a new `wp_update_php_url` filter.
* If that URL is different from the default one that points to https://wordpress.org/support/update-php/ or its localized equivalent, a note indicates that the linked resource has not been provided by WordPress itself, and the default URL is still linked to as an additional resource.
* The URL for the default information page has been updated to use the slug `update-php` instead of `upgrade-php`.
* `@since` annotations have been updated.

Going forward, admin areas that display information related to the PHP version should use the new function `wp_get_update_php_url()`.

Props afragen, fierevere, flixos90, markjaquith, miss_jwo, nerrad, pento, schlessera, SergeyBiryukov, spacedmonkey.
Fixes #45686. See #41191.


git-svn-id: https://develop.svn.wordpress.org/trunk@44476 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 17:26:38 +00:00
Jonathan Desrosiers
59bb9742e6 Docs: Fix order of parameter type and variable name.
The order of the type and variable name in the `param` tags for the `wp_get_default_privacy_policy_content` filter is incorrectly reversed. This moves the two into the correct order.

Props ishitaka, mukesh27.
Fixes #45416.

git-svn-id: https://develop.svn.wordpress.org/trunk@44475 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 17:02:55 +00:00
Jonathan Desrosiers
30461b62da Widgets: Fix custom HTML widget editor content not updating after save.
An integer comparison is performed against `control.currentErrorAnnotations`, but `control.currentErrorAnnotations` is actually an array. This fixes that comparison so the content saves correctly.

Props barryceelen.
Fixes #43657.

git-svn-id: https://develop.svn.wordpress.org/trunk@44474 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 16:41:53 +00:00
Gary Pendergast
0311c0d083 Users: Add the pre_count_users filter.
Props spacedmonkey.
Fixes #43693.



git-svn-id: https://develop.svn.wordpress.org/trunk@44473 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 09:48:09 +00:00
Felix Arntz
1e35159a2d Multisite: Introduce ms-site.php and ms-network.php files.
By providing distinct files for the site and network APIs, a better overview is provided. Prior to this change, the `ms-blogs.php` file had grown too big, mixing site APIs, network APIs and related legacy APIs that need to be maintained. Since multisite is often used in unexpected ways, backward-compatibility is ensured by including the two new files from `ms-blogs.php`, which previously contained all functions that have been moved to the new files.

This changeset does not contain any functional changes.

Fixes #40647.


git-svn-id: https://develop.svn.wordpress.org/trunk@44472 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 09:14:20 +00:00
Gary Pendergast
fbabf54a72 Media: Add $attr to the wp_get_attachment_link filter.
Props danielbachhuber.
Fixes #40155.



git-svn-id: https://develop.svn.wordpress.org/trunk@44471 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 09:08:06 +00:00
Gary Pendergast
801e193ae0 Coding Standards: Fix an error introduced in [44465].
See #45748.



git-svn-id: https://develop.svn.wordpress.org/trunk@44470 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 09:02:50 +00:00
Felix Arntz
855606e29d Multisite: Update @since tags for site management APIs.
Fixes #40364. Fixes #41333.


git-svn-id: https://develop.svn.wordpress.org/trunk@44469 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 08:57:32 +00:00
Felix Arntz
5fdfac40f2 Multisite: Move site-specific metadata integrations from the wrapper functions to the low-level Meta API functions.
This complements the work in [43729] and prepares site metadata for future REST API support.

Props spacedmonkey.
Fixes #45091. See #44467.


git-svn-id: https://develop.svn.wordpress.org/trunk@44468 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 08:47:37 +00:00
Felix Arntz
4657735ba6 Multisite: Update @since tags for site meta introduction.
Fixes #37923. Fixes #40229.


git-svn-id: https://develop.svn.wordpress.org/trunk@44467 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 08:17:34 +00:00
Gary Pendergast
34cd08cd37 Comments: Improve the Author box in the Edit Comment screen.
- Add a border below the heading, to match meta boxes.
- Remove the colons from the input labels.
- Tweak the padding and margins.

Props birgire, abdullahramzan, rhetorical, BODA1982, pento.
Fixes #43586.



git-svn-id: https://develop.svn.wordpress.org/trunk@44466 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 06:18:17 +00:00
Gary Pendergast
cfbb2e735f Users: Use email_exists() in send_confirmation_on_profile_email(), instead of a manual query.
This gives us caching, and removes the use of the `$wpdb` global.

Props spacedmonkey, pento.
Fixes #45748.



git-svn-id: https://develop.svn.wordpress.org/trunk@44465 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 06:06:04 +00:00
Gary Pendergast
19e46911cf Docs: Fix the @param type for wp_make_plugin_file_tree().
`$plugin_editable_files` is an `array`, not a `string`.

Props subrataemfluence.
Fixes #45593.



git-svn-id: https://develop.svn.wordpress.org/trunk@44464 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 06:01:50 +00:00
Gary Pendergast
06cc3de7ec Docs: Improve the @global tags in wp-includes/option.php.
Props upadalavipul.
Fixes #45581.



git-svn-id: https://develop.svn.wordpress.org/trunk@44463 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 05:59:27 +00:00
Gary Pendergast
0cbd818ce8 Docs: Correct the parameters passed to the twentyseventeen_custom_header_args filter.
The documented `$default_text_color` parameter isn't passed, and the `$video` parameter is passed, but not documented.

Props mukesh27.
Fixes #44920.


git-svn-id: https://develop.svn.wordpress.org/trunk@44462 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 05:55:55 +00:00
Gary Pendergast
ab3b19d94e Coding Standards: Improve the readability of get_the_modified_author().
Props promz.
Fixes #44951.



git-svn-id: https://develop.svn.wordpress.org/trunk@44461 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 05:49:50 +00:00