Commit Graph

41543 Commits

Author SHA1 Message Date
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
Dominik Schilling
f37a28858d Role/Capability: Use meta caps edit_post, read_post, and delete_post directly.
Rather than consulting the post type object, let `map_meta_cap()` handle that for us.

Props peterwilsoncc, ocean90.
Fixes #50128.
See #23226.

git-svn-id: https://develop.svn.wordpress.org/trunk@47850 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-23 15:22:53 +00:00
Dominik Schilling
584df2a169 Rest API: Ensure rest_ensure_response() upgrades WP_HTTP_Response to WP_REST_Response.
An instance of `WP_HTTP_Response` doesn't ensure that the required methods used in `WP_REST_Server::dispatch()` exist, currently causing a fatal error.

Props ali11007, TimothyBlynJacobs, ocean90.
Fixes #49495.

git-svn-id: https://develop.svn.wordpress.org/trunk@47849 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-23 14:34:38 +00:00
Sergey Biryukov
772a11b72a Coding Standards: Use strict comparison for count() calls.
See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@47848 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-23 11:36:36 +00:00
Jake Spurlock
a5baf8b9c6 Bundled Themes: Add missing RTL styles for to fix inconsistent margins on .alignwide and .alignfull items.
Fixes the inconsistent margins for alignwide and alignfull classes used on Cover Block when it is the first block on a page.

Props kthmd, utz119, nikhilbhansi, and sabernhardt.
Fixes #49435.


git-svn-id: https://develop.svn.wordpress.org/trunk@47846 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-23 06:21:37 +00:00
Sergey Biryukov
1ce6af5284 Coding Standards: Fix WPCS issues in wp-admin/plugin-editor.php and wp-admin/theme-editor.php.
See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@47845 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-22 23:59:10 +00:00
Sergey Biryukov
a6cb663c13 Theme Editor: Remove unused $has_templates boolean.
The variable is a remnant from when the Theme Editor still had the "Templates" heading and is unused in the current logic.

The condition it was a part of would always evaluate to true for a child theme, regardless of the `$has_templates` value.

Props dboy1988.
Fixes #50199.

git-svn-id: https://develop.svn.wordpress.org/trunk@47844 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-22 23:18:47 +00:00
Jake Spurlock
3ab28fd579 REST API: Ensure proper namespacing when registering routes.
The PR will corerce routes that have a leading slash and throwing a `_doing_it_wrong` notice while ensuring a proper namespace.

Fixes #49749.
Props TimothyBlynJacobs, skarabeq, afercia.



git-svn-id: https://develop.svn.wordpress.org/trunk@47842 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-22 20:46:03 +00:00
Sergey Biryukov
3fe58b173f Coding Standards: Fix WPCS issues in wp-admin/includes/class-wp-site-health-auto-updates.php.
See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@47841 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-22 17:54:50 +00:00