Commit Graph

41701 Commits

Author SHA1 Message Date
Aaron Jorbin 42efaab548 Build/Test: Die with an error if populate_network fails
If you are missing WP_TESTS_EMAIL, populate_network will fail and it can be hard to debug. As populate_network can return a wp_error object, we can detect that and display the error to a user.

See: https://github.com/WordPress/gutenberg/pull/22613
Fixes: #50251
Props: TimothyBlynJacobs


git-svn-id: https://develop.svn.wordpress.org/trunk@47904 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-03 21:02:42 +00:00
Sergey Biryukov f9a4cdcb3c Toolbar: Display a "View Post" link when viewing comments for a single post on Comments screen.
Props Otto42, matt, SergeyBiryukov.
Fixes #50312.

git-svn-id: https://develop.svn.wordpress.org/trunk@47903 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-03 19:55:54 +00:00
Jonathan Desrosiers dfccba8d55 General: Continuing to work towards a passing PHP Compatibility scan.
This is a final pass to fix PHP compatibiilty issues in the codebase with code changes or adding `phpcs:ignore` comments.

With this change, all PHP compatibility warnings and errors without specific tickets have been addressed (see #49810 and #41750).

Props desrosj, johnbillion, jrf.
See #49922.

git-svn-id: https://develop.svn.wordpress.org/trunk@47902 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-03 17:38:56 +00:00
Jonathan Desrosiers 2da8918f1a Build/Test Tools: Disable Travis CI build Slack notifications for non-official branches.
When branches are unintentionally pushed to the GitHub `wordpress-develop` mirror by committers, a build is triggered in Travis and the result is reported in Slack if the criteria defined is met.

Though this is not the desired workflow (any modifications made to the mirror are erased when the repository is synced from SVN), this can cause a lot of noise if several pushes are made and raise false alarms.

This change limits builds only to the `master` branch, and branches meeting the `X.X` pattern to match each branched version.

Props desrosj, jorbin, ocean90, TimothyBlynJacobs.
Fixes #50307.

git-svn-id: https://develop.svn.wordpress.org/trunk@47901 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-03 17:01:14 +00:00
Sergey Biryukov de3fd5b242 Docs: Document the `term_order` value for the `orderby` parameter of `WP_Term_Query::__construct()`.
Props pbiron.
See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@47898 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-03 14:39:05 +00:00
Sergey Biryukov d57084755d Docs: Reformat the `orderby` section of `WP_Term_Query::__construct()` for better readability.
This makes it more consistent with the `fields` section.

See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@47897 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-03 14:35:31 +00:00
Sergey Biryukov 33b4f176cd File Editor: Don't verify SSL certificate when doing loopback requests for checking for fatal errors.
Previously, verification was disabled for the loopback request to the admin URL, but not to the home URL.

Follow-up to [46230].

Props munyagu.
Fixes #50309. See #47957.

git-svn-id: https://develop.svn.wordpress.org/trunk@47896 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-03 11:41:31 +00:00
Sergey Biryukov 3f0a45647e External Libraries: Update clipboard.js to 2.0.6.
This change includes some bug fixes and removal of the PhantomJS dependency.

Changelog: https://github.com/zenorocha/clipboard.js/compare/v2.0.4...v2.0.6

Props hareesh-pillai.
Fixes #50306.

git-svn-id: https://develop.svn.wordpress.org/trunk@47895 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-03 11:10:28 +00:00
Sergey Biryukov 112c2c456a Plugins: Make the message displayed when no plugins are installed more concise.
Props johnjamesjacoby, Presskopp.
Fixes #42336.

git-svn-id: https://develop.svn.wordpress.org/trunk@47894 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-03 10:49:45 +00:00
Sergey Biryukov 4ac1670efe Docs: Correct `@since` version for `available_permalink_structure_tags` filter.
Follow-up to [41182].

Props tiagohillebrandt, sabernhardt.
Fixes #42624.

git-svn-id: https://develop.svn.wordpress.org/trunk@47893 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-03 10:36:32 +00:00
Sergey Biryukov c21a340f95 Docs: Miscellaneous DocBlock corrections.
See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@47892 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-03 10:00:27 +00:00
Adam Silverstein fa96d59318 Formatting: add a new 'safe_style_disallowed_chars' filter.
Enable developers to change the regex used in `safecss_filter_attr` to limit characters in the parsed CSS.

Props paulschreiber, swissspidy, rmccue, bartekcholewa, miinasikk.
Fixes #37134.



git-svn-id: https://develop.svn.wordpress.org/trunk@47891 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-02 23:44:40 +00:00
Sergey Biryukov e18d6e942b Comments: Rename `Walker_Comment::comment_text()` to `::filter_comment_text()` for clarity.
Ensure the comment object is not null before checking its status.

Follow-up to [47887].

See #49956.

git-svn-id: https://develop.svn.wordpress.org/trunk@47889 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-02 20:51:34 +00:00
Jake Spurlock d232910423 Comments: Ensure that unmoderated comments won't be search indexed.
After a comment is submitted, only allow a brief window where the comment is live on the site. 

Fixes #49956.
Props: jonkolbert, ayeshrajans, Asif2BD, peterwilsoncc, imath, audrasjb, jonoaldersonwp, whyisjake.


git-svn-id: https://develop.svn.wordpress.org/trunk@47887 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-02 20:10:02 +00:00
Sergey Biryukov ffd5d37c77 Bundled Themes: Consistently check for `WP_Error` before outputting `get_the_tag_list()`.
Some themes already had these checks in place as a result of [41756], but not others.

Props sixhours, davidakennedy, SergeyBiryukov.
Fixes #39860.

git-svn-id: https://develop.svn.wordpress.org/trunk@47886 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-02 17:03:06 +00:00
Sergey Biryukov 49f03fff79 Docs: Correct `@param` type for `pre_redirect_guess_404_permalink` filter.
Improve filter documentation for consistency with other similar short-circuit filters in core.

Follow-up to [47878].

See #16557.

git-svn-id: https://develop.svn.wordpress.org/trunk@47885 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-02 16:21:49 +00:00
Dominik Schilling 9bea5b3444 I18N: Use `wp.i18n` for translatable strings in `wp-admin/js/updates.js`.
This removes the usage of `wp_localize_script()` for passing translations to the script and instead adds the translatable strings in the script directly through the use of `wp.i18n` and its utilities.

Props swissspidy, ocean90.
See #20491.
Fixes #50235.

git-svn-id: https://develop.svn.wordpress.org/trunk@47884 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-01 21:39:30 +00:00
Andrew Ozz 5263a96a4c Plugins and Themes Auto-Updates: update the state of the auto-update link on the themes screen after successfully saving the setting.
Props desrosj, pbiron, azaozz.
Fixes #50291.

git-svn-id: https://develop.svn.wordpress.org/trunk@47883 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-01 20:51:10 +00:00
Dominik Schilling 2fed7bf581 Build/Test Tools: Avoid an empty "title" heading if no title is set in `_wp_die_handler_exit()` and `_wp_die_handler_txt()`.
Fixes #50297.

git-svn-id: https://develop.svn.wordpress.org/trunk@47882 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-01 20:48:27 +00:00
Dominik Schilling 7a6b6e1153 Build/Test Tools: Add PHPUnit to Composer dev dependencies.
This helps setting up the correct version of PHPUnit to run WordPress core tests locally and for using it as source for code autocompletion in tests. Also introduces a new Composer script `test` to run the PHPUnit tests.

Props welcher, ayeshrajans, vinkla, johnbillion, Rarst, netweb, ocean90.
Fixes #46815.

git-svn-id: https://develop.svn.wordpress.org/trunk@47881 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-01 20:29:06 +00:00
Dominik Schilling 178eeaf57e Build/Test Tools: Let `WP_UnitTestCase_Base` extend the namespaced version of PHPUnit's test case class.
With the minimum PHP version requirement set to 5.6 we're now able to use namespaces by default. This replaces `PHPUnit_Framework_TestCase` with `PHPUnit\Framework\TestCase` for `WP_UnitTestCase_Base` to solve autocompletion issues with code editors when using more recent PHPUnit versions. `PHPUnit\Framework\TestCase` is available since PHPUnit 5.4 and now the minimum required PHPUnit version.

Fixes #50236.

git-svn-id: https://develop.svn.wordpress.org/trunk@47880 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-01 19:41:50 +00:00
Jake Spurlock 0cf715f55b Administration: Unify the date structure in list view and excerpt view.
Both views now show a full date string. Something like `Published 2020/05/27 at 10:25 pm`.

Fixes: #35391.
Props: afercia, ocean90, TimothyBlynJacobs, audrasjb, SergeyBiryukov, joedolson.



git-svn-id: https://develop.svn.wordpress.org/trunk@47879 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-01 19:13:54 +00:00
Jake Spurlock 0ad7471880 Canonical: Add the ability to disable `redirect_guess_404_permalink()`.
This also adds a few more filters to make adding redirects easier. Notably:

1. `do_redirect_guess_404_permalink`
2. `pre_redirect_guess_404_permalink`
3. `strict_redirect_guess_404_permalink`

Fixes: #16557.
Props: msafi, nacin, simonwheatley, westi, mboynes, joostdevalk, Lex_Robinson, MikeSchinkel, haukep, paulschreiber, DrewAPicture, ravenswd, esemlabel, stevegibson12, martychc23, DrLightman, jivanpal, neonkowy, laternastudio, apedog, audrasjb, davidbaumwald, Confridin, donmhico, ryotsun. 



git-svn-id: https://develop.svn.wordpress.org/trunk@47878 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-01 18:47:41 +00:00
Dominik Schilling 44d25453b6 Build/Test Tools: Improve Travis config to pass config validation.
* Add missing `os` and `dist` with the current default values.
* Replace the alias `matrix` with `jobs`.
* Remove unsupported `on_start` for `notifications.slack`.

Fixes #50296.

git-svn-id: https://develop.svn.wordpress.org/trunk@47877 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-01 16:37:03 +00:00
Dominik Schilling 028299ac79 Editor: Fix code style for constructor arguments added in [47875].
Also revert unintended changes to `WP_Block_Type::__construct()` DocBlock.

See #48529.

git-svn-id: https://develop.svn.wordpress.org/trunk@47876 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-01 16:25:18 +00:00
Greg Ziółkowski 822ca9ebc7 Add fields to WP_Block_Type
As part of #47620 and the RFC for block registeration. Server registered blocks are missing some fields. These changeset includes them.

Props spacedmonkey, aduth.

Fixes #48529.



git-svn-id: https://develop.svn.wordpress.org/trunk@47875 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-01 12:25:34 +00:00
Sergey Biryukov e0ede89881 Docs: Correct and clarify an inline comment about the `upload_url_path` and `upload_path` options in `wp-admin/options-media.php`.
Synchronize it with a similar comment in `wp-admin/options.php`.

See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@47874 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-01 11:20:16 +00:00
Sergey Biryukov bec349c649 Build/Test Tools: Bump `node-sass` and `webpack-dev-server` versions as a result of `npm audit`.
Props whyisjake.
See #49768.

git-svn-id: https://develop.svn.wordpress.org/trunk@47873 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-31 09:19:05 +00:00
Sergey Biryukov 649b0724ba Build/Test Tools: Switch to Node 12.16.0 (LTS) and npm 6.14.0.
See #49768.

git-svn-id: https://develop.svn.wordpress.org/trunk@47872 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-31 09:17:35 +00:00
Sergey Biryukov 4ae8bdf8c3 Upgrade/Install: Rename `wp_in_maintenance_mode()` to `wp_is_maintenance_mode()`, for consistency with `wp_is_recovery_mode()`.
While the former name might be a bit more accurate, the latter matches the existing naming pattern.

Follow-up to [47623].

Fixes #49959.

git-svn-id: https://develop.svn.wordpress.org/trunk@47871 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-30 15:11:02 +00:00
Sergey Biryukov 2e39930d71 Docs: Adjust the documentation for the new `ID` alias in `get_term_by()` for consistency with `get_user_by()`.
Follow-up to [47865].

See #45163.

git-svn-id: https://develop.svn.wordpress.org/trunk@47870 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-30 10:06:49 +00:00
Jake Spurlock c9ee3b828c Build/Test Tools: Revert some devDependency changes for 5.5.
After bumping some major updates, tests on Travis are failing. 

See: https://travis-ci.com/WordPress/wordpress-develop/builds/168839259 ##49768.
Unprops: whyisjake.



git-svn-id: https://develop.svn.wordpress.org/trunk@47869 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-30 06:08:18 +00:00
Jake Spurlock e1993cd3fb Build/Test Tools: Bump devDependencies for WordPress 5.5.
Bumping a few more dependencies as a result of `npm audit`.

Fixes #49768.
Props whyisjake.


git-svn-id: https://develop.svn.wordpress.org/trunk@47868 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-30 05:36:28 +00:00
Jake Spurlock 5c184116bf Build/Test Tools: Bump devDependencies for WordPress 5.5
There are several other changes that need to be made for the security audit, this is just the first pass.

Fixes #49768.
Props SergeyBiryukov, whyisjake.


git-svn-id: https://develop.svn.wordpress.org/trunk@47867 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-30 04:54:28 +00:00
Jake Spurlock 38744d8bd2 Code Standards: Clean up whitespace on the end of a file.
See: #45163.
Props: whyisjake.



git-svn-id: https://develop.svn.wordpress.org/trunk@47866 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-29 23:34:00 +00:00
Jake Spurlock 7b13f5abd8 Taxonomy: Extend `get_term_by` to accept `ID` as a term parameter.
Similar to `get_user_by`, both `ID` and `id` should be able to accepted.

Fixes #45163.
Props emrikol, esoj.
 


git-svn-id: https://develop.svn.wordpress.org/trunk@47865 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-29 22:41:25 +00:00
Sergey Biryukov 64a2e8d55e Docs: Improve documentation for functions in `wp-includes/category.php` per the documentation standards.
See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@47864 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-29 10:05:36 +00:00
Sergey Biryukov 0133a78dec Docs: Document that `get_category_by_slug()` returns `false` if the category doesn't exist.
Props stevenlinx.
Fixes #50277.

git-svn-id: https://develop.svn.wordpress.org/trunk@47863 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-29 10:00:32 +00:00
Sergey Biryukov 7f73f1a1e4 Coding Standards: Use strict comparison in `wp-admin/_index.php`.
See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@47862 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-28 10:00:44 +00:00
Sergey Biryukov cfc5b94f28 Docs: Remove unused `@global` declarations from `_WP_Editors::print_tinymce_scripts()`.
Follow-up to [47860].

See #45398.

git-svn-id: https://develop.svn.wordpress.org/trunk@47861 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-27 19:46:34 +00:00
Jake Spurlock d8b8495e8e Editor: Remove TinyMCE global version.
The global variable is not being used in the `editor_settings` method. 

Fixes #45398.
Props ishitaka, noisysocks, mista-flo.



git-svn-id: https://develop.svn.wordpress.org/trunk@47860 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-27 19:26:32 +00:00
Andrea Fercia 184118c3c9 Administration and Site Health: Make information on Search engine visibility more prominent.
- makes the "Search engines discouraged" message on the Dashboard more prominent
- adds "Search engine visibility" information under Site Health > Info > WordPress 
- removes title case in favor of sentence case in all the related strings 

Props audrasjb, swissspidy, emanuel_blagonic, Presskopp, karmatosed, valentinbora, melchoyce.
Fixes #35288.


git-svn-id: https://develop.svn.wordpress.org/trunk@47859 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-27 14:32:00 +00:00
Sergey Biryukov 45d8f6b9d0 Docs: Correct `@return` value for `WP_REST_Meta_Fields::get_value()`.
Props chrisvanpatten.
Fixes #50259.

git-svn-id: https://develop.svn.wordpress.org/trunk@47858 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-27 09:42:38 +00:00
Jake Spurlock 8efc5321c9 Coding Standards: Change auto-update filters to be more consistent.
* send_theme_auto_update_email 👉 auto_theme_update_send_email
* wp_plugins_auto_update_enabled 👉 plugins_auto_update_enabled
* wp_themes_auto_update_enabled 👉 themes_auto_update_enabled

Want to make sure that @ronalfy gets props for his work in #50052 too.

See #50052.
Props: ronalfy, pbiron, azaozz, audrasjb, whyisjake.



git-svn-id: https://develop.svn.wordpress.org/trunk@47857 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-26 18:01:18 +00:00
Dominik Schilling adcf5cf7a3 Posts, Post Types: Pass the post object to the `delete_attachment` action.
Also add the missing `$post` parameter to the `delete_post` and `deleted_post` actions in `wp_delete_attachment()`.

See #30940.

git-svn-id: https://develop.svn.wordpress.org/trunk@47856 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-26 14:47:26 +00:00
Sergey Biryukov 2c75752c88 Coding Standards: Fix instances of `Generic.WhiteSpace.ArbitraryParenthesesSpacing.FoundEmpty`.
See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@47855 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-26 09:35:34 +00:00
Sergey Biryukov 6ec9c9c446 Docs: Improve documentation for `add_existing_user_to_blog()`.
Props stevenlinx.
Fixes #50243.

git-svn-id: https://develop.svn.wordpress.org/trunk@47854 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-25 14:21:50 +00:00
Sergey Biryukov 219acea88f Coding Standards: Use strict comparison in `wp-admin/network` where static strings are involved.
Includes minor code layout fixes for better readability.

Follow-up to [47808].

See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@47853 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-24 09:14:21 +00:00
Sergey Biryukov 2919961c18 Coding Standards: Use strict comparison for `$wp_db_version` check in `wp-admin/network/upgrade.php`.
Follow-up to [47787], [47788].

See #50155, #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@47852 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-24 09:13:39 +00:00
Sergey Biryukov 3e2d77ae04 Coding Standards: Use strict comparison for more `count()` calls.
Follow-up to [47848].

Props mukesh27.
Fixes #50232. See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@47851 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-23 16:20:10 +00:00