Commit Graph

42285 Commits

Author SHA1 Message Date
Jake Spurlock
8c9b33c3b6 Mail: PHPMailer swap to use is_email for the default validator.
Prior to the PHPMailer update in 5.5, old version of the PHPMailer was setting the validator to 'auto' resulting in a sophisticated logic for determining what email address validation should be used. But the new version defaults to 'php', possibly leading to rejection of email addresses which were fine prior to the upgrade. Let's use the WordPress core function `is_email()` so that it can be fully pluggable.

Fixes #50720.
Props david.binda, ayeshrajans, Synchro, SergeyBiryukov, whyisjake.


git-svn-id: https://develop.svn.wordpress.org/trunk@48645 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-27 20:17:36 +00:00
Riad Benguella
e03be98644 Block Editor: Updated WordPress Packages for 5.5 beta 4
Updated packages:

 - @wordpress/annotations@1.20.3
 - @wordpress/block-directory@1.13.3
 - @wordpress/block-editor@4.3.3
 - @wordpress/block-library@2.22.3
 - @wordpress/blocks@6.20.3
 - @wordpress/components@10.0.3
 - @wordpress/compose@3.19.3
 - @wordpress/core-data@2.20.3
 - @wordpress/data-controls@1.16.3
 - @wordpress/data@4.22.3
 - @wordpress/e2e-test-utils@4.11.1
 - @wordpress/e2e-tests@1.20.3
 - @wordpress/edit-post@3.21.3
 - @wordpress/edit-site@1.11.3
 - @wordpress/editor@9.20.3
 - @wordpress/format-library@1.22.3
 - @wordpress/interface@0.7.3
 - @wordpress/keyboard-shortcuts@1.9.3
 - @wordpress/list-reusable-blocks@1.21.3
 - @wordpress/notices@2.8.3
 - @wordpress/nux@3.20.3
 - @wordpress/plugins@2.20.3
 - @wordpress/rich-text@3.20.3
 - @wordpress/server-side-render@1.16.3
 - @wordpress/viewport@2.21.3

Fixes #50791.


git-svn-id: https://develop.svn.wordpress.org/trunk@48644 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-27 20:08:53 +00:00
Riad Benguella
f660784d43 Administration: Fix the red links on the Media Modal.
The custom link colors for admin scheme colors were overriding the danger color.

Props kebbet, dlh.
Fixes #50547.


git-svn-id: https://develop.svn.wordpress.org/trunk@48643 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-27 19:15:55 +00:00
Timothy Jacobs
5149a7efd5 REST API: Fix warning when using set_param() on a JSON request with no body.
In [47559] the `WP_REST_Request::set_param()` method was adjusted to try and overwrite an existing parameter definition before forcing the value in the first parameter slot. If `set_param()` was called on a request with an `application/json` content type and an empty body, a PHP warning would be issued. This was due to the JSON parameter type not being set to an array when the body is empty.

This commit avoids the warning by adding an `is_array()` check before calling `array_key_exists`. Ideally, `WP_REST_Reuest::parse_json_params()` would set the JSON parameter type to an empty array in this case, but that is too large of a change at this point in the cycle.

Props manooweb.
Fixes #50786.


git-svn-id: https://develop.svn.wordpress.org/trunk@48642 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-27 18:44:14 +00:00
Jake Spurlock
beba4bb73a REST API: Install plugin translations after the plugin install. This only installs for the plugin in question, not all plugins.
Support for retrieving the langauge pack alongside the install API request was added in https://meta.trac.wordpress.org/changeset/10091 to avoid having to make a plugin update check during the REST API check.

Fixes #50732.
Props dd32, ocean90, ryelle, swissspidy, tellyworth, whyisjake, TimothyBlynJacobs.


git-svn-id: https://develop.svn.wordpress.org/trunk@48641 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-27 18:29:43 +00:00
Sergey Biryukov
598a5a5bc2 Themes: Display a message in theme grid if a theme requires a higher version of PHP or WordPress.
This applies to the Themes screen fallback used when JS is turned off.

Props afragen, desrosj, SergeyBiryukov.
See #48491.

git-svn-id: https://develop.svn.wordpress.org/trunk@48640 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-27 15:19:09 +00:00
Riad Benguella
6475d32964 Block Editor: Update the Core Block Patterns.
Backport the latest block patterns from the Gutenberg plugin.
The new patterns adapt properly to Core themes.

Props nrqsnchz.
Fixes #50550, #50594.


git-svn-id: https://develop.svn.wordpress.org/trunk@48639 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-27 15:12:13 +00:00
Sergey Biryukov
782454b39c Themes: Display a message in theme grid if a theme requires a higher version of PHP or WordPress.
This applies to the Themes screen, Add Themes screen, and the Customizer theme browser.

Props afragen, desrosj, SergeyBiryukov.
See #48491.

git-svn-id: https://develop.svn.wordpress.org/trunk@48638 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-27 15:02:19 +00:00
Sergey Biryukov
332ce58d5c Themes: Display a message in Details & Preview modal on Add Themes screen if a theme requires a higher version of PHP or WordPress.
Props afragen, desrosj, SergeyBiryukov.
See #48491.

git-svn-id: https://develop.svn.wordpress.org/trunk@48637 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-27 14:24:19 +00:00
Sergey Biryukov
3b0b11acc6 Themes: Display a message in Theme Details modal if a theme requires a higher version of PHP or WordPress.
Props afragen, desrosj, SergeyBiryukov.
See #48491.

git-svn-id: https://develop.svn.wordpress.org/trunk@48636 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-27 13:10:04 +00:00
Sergey Biryukov
38cf369a7a Posts, Post Types: Pass correct variable to the get_lastpostdate filter.
Follow-up to [48634].

See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@48635 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-27 11:36:27 +00:00
Sergey Biryukov
382834e730 Docs: Synchronize documentation for get_lastpostdate() and get_lastpostmodified().
See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@48634 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-27 11:15:44 +00:00
Sergey Biryukov
fc62131e31 Tests: Add more fixtures to get_lastpostdate() and get_lastpostmodified() tests.
Follow-up to [48631].

Props munyagu.
See #47777.

git-svn-id: https://develop.svn.wordpress.org/trunk@48633 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-27 11:15:04 +00:00
Mike Schroder
838f9884d7 Docs: Correct wp_opcache_invalidate_file filter docs.
Changes incorrectly named `$filename` variable to `$filepath` and adjusts wording to align with PHP docs.

See #36455.

git-svn-id: https://develop.svn.wordpress.org/trunk@48632 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-27 09:06:58 +00:00
Sergey Biryukov
581deff371 Posts, Post Types: Pass the post type to get_lastpostdate() in get_lastpostmodified().
This ensures that the correct values are being compared when retrieving the result for custom post types.

Additionally, pass the `$post_type` parameter to `get_lastpostdate` and `get_lastpostmodified` filters.

Props mikaumoto, munyagu, donmhico, johnbillion, SergeyBiryukov.
Fixes #47777.

git-svn-id: https://develop.svn.wordpress.org/trunk@48631 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-27 02:16:46 +00:00
Sergey Biryukov
a1c40b346c Docs: Improve documentation for WP_Http::processHeaders().
Document the `@return` value using hash notation.

Props marekdedic, valchovski, davidbaumwald, deepaklalwani, thimalw, SergeyBiryukov.
Fixes #48350.

git-svn-id: https://develop.svn.wordpress.org/trunk@48630 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-26 22:43:47 +00:00
Sergey Biryukov
10563ae9e7 Docs: Add a note that the $args parameter of register_block_type() accepts any public property of WP_Block_Type.
Follow-up to [47754].

Props ediamin.
See #48640.

git-svn-id: https://develop.svn.wordpress.org/trunk@48629 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-26 22:15:20 +00:00
Sergey Biryukov
01d58943a1 REST API: Use a consistent description for the textdomain schema property between plugins and themes controllers.
Follow-up to [48242], [48627].

Props audrasjb.
Fixes #50776. See #50321.

git-svn-id: https://develop.svn.wordpress.org/trunk@48628 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-26 21:52:41 +00:00
Sergey Biryukov
40dd42c35d REST API: Use a consistent name for the textdomain schema property between plugins, themes, and block directory controllers.
Follow-up to [48242].

See #50321, #50776.

git-svn-id: https://develop.svn.wordpress.org/trunk@48627 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-26 21:47:56 +00:00
Sergey Biryukov
dbb88efe5c Docs: Correct @since version for WP_REST_Plugins_Controller::get_item_schema().
Follow-up to [48242].

See #50321.

git-svn-id: https://develop.svn.wordpress.org/trunk@48626 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-26 21:40:43 +00:00
Sergey Biryukov
0dd00badb2 Revisions: Ensure the global $post remains the same after revision is restored.
Because `wp_insert_post()` and `wp_transition_post_status()` are called during the process, plugins can unexpectedly modify `$post`.

Props markparnell, tofandel, archon810, SergeyBiryukov.
Fixes #46671.

git-svn-id: https://develop.svn.wordpress.org/trunk@48625 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-26 21:24:00 +00:00
Sergey Biryukov
5c064bb139 Docs: Synchronize some comments in wp-admin/revision.php.
See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@48624 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-26 20:41:13 +00:00
Sergey Biryukov
565de1735c Docs: Improve documentation for various category functions.
Props atachibana.
Fixes #48394.

git-svn-id: https://develop.svn.wordpress.org/trunk@48623 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-26 17:16:32 +00:00
Sergey Biryukov
5ca5435aa9 Coding Standards: Rename the $id parameter in various category functions for clarity.
See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@48622 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-26 16:05:39 +00:00
Sergey Biryukov
6fa3286a1b Pings/Trackbacks: Avoid a PHP notice in do_enclose() when encountering a URL without a path in post content.
Props jbouganim, mukesh27, Otto42, SergeyBiryukov.
Fixes #49872.

git-svn-id: https://develop.svn.wordpress.org/trunk@48621 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-26 14:06:03 +00:00
Sergey Biryukov
5006831979 Posts, Post Types: Move get_post_states() back to the admin for now, require the file in WP_Customize_Nav_Menus::customize_register() instead.
This provides a minor performance improvement by only running the function in contexts where it's needed.

Follow-up to [47211], [47213], [47763], [48619].

See #46829, #49374.

git-svn-id: https://develop.svn.wordpress.org/trunk@48620 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-26 10:49:07 +00:00
Sergey Biryukov
9950b3668b Posts, Post Types: Make get_post_states() available on frontend.
This allows special pages to be denoted as such when editing a menu in the Customizer.

This applies to the Front Page, Posts Page, and Privacy Policy Page.

Follow-up to [47211], [47213], [47763].

Props dlh, whyisjake, SergeyBiryukov.
Fixes #46829. See #49374.

git-svn-id: https://develop.svn.wordpress.org/trunk@48619 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-26 01:12:51 +00:00
Sergey Biryukov
1175600b1f I18N: Merge duplicate "List view" and "Grid view" strings.
Props ramiy.
Fixes #50757.

git-svn-id: https://develop.svn.wordpress.org/trunk@48618 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-25 21:30:32 +00:00
Sergey Biryukov
f6b24a02f8 Docs: Add a reference to WP_Customize_Partial::__construct() for information on accepted arguments in WP_Customize_Selective_Refresh::add_partial().
Synchronize the documentation between two places, use `WP_Customize_Partial::__construct()` as the canonical source.

Props marekdedic.
See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@48617 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-25 19:38:34 +00:00
Sergey Biryukov
4acb5a7ce8 Docs: Correct @see references for privacy hooks:
* `wp_privacy_personal_data_export_page`
* `wp_privacy_personal_data_erasure_page`

Hooks should be single-quoted when referenced.

Props pbiron, coffee2code.
See #49572, #meta5318.

git-svn-id: https://develop.svn.wordpress.org/trunk@48616 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-25 19:12:15 +00:00
Sergey Biryukov
fd68c17318 Docs: Correct @since tags for some WP_List_Table hooks:
* `views_{$this->screen->id}`
* `bulk_actions-{$this->screen->id}`
* `manage_{$this->screen->id}_sortable_columns`

Follow-up to [15491], [15578], [26401].

See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@48615 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-25 18:53:29 +00:00
Sergey Biryukov
c6e0b57ab7 Docs: Remove outdated statement in bulk_actions-{$this->screen->id} filter description.
As of WordPress 4.7, developers can register their own bulk actions on list table screens.

Follow-up to [17297], [38647].

Props joyously, pbiron.
See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@48614 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-25 18:11:20 +00:00
Sergey Biryukov
9fadf9f500 I18N: Remove <code> tags in an error message in WP_REST_Posts_Controller::get_item_schema() for consistency with other strings.
Follow-up to [48610].

See #50759.

git-svn-id: https://develop.svn.wordpress.org/trunk@48613 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-25 16:39:59 +00:00
Sergey Biryukov
160b99b724 I18N: Remove <code> tags in invalid_rest_prepare_callback error message in register_theme_feature() for consistency with other strings.
Follow-up to [48611].

See #50758.

git-svn-id: https://develop.svn.wordpress.org/trunk@48612 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-25 16:37:34 +00:00
Sergey Biryukov
34872f1a94 I18N: Move code out of a translatable string in register_theme_feature().
Props ramiy.
Fixes #50758.

git-svn-id: https://develop.svn.wordpress.org/trunk@48611 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-25 16:29:29 +00:00
Sergey Biryukov
5edc4e9cbc I18N: Move code out of a translatable string in WP_REST_Posts_Controller::get_item_schema().
Props ramiy.
Fixes #50759.

git-svn-id: https://develop.svn.wordpress.org/trunk@48610 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-25 16:26:44 +00:00
Sergey Biryukov
56c30a4ce7 I18N: Move code out of a translatable string in WP_Customize_Manager::customize_preview_init().
Props ramiy.
Fixes #50760.

git-svn-id: https://develop.svn.wordpress.org/trunk@48609 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-25 15:59:01 +00:00
Sergey Biryukov
8310c5eeec Site Health: Escape the displayed result of the request in REST API availability test.
Props siliconforks, gisselfeldt.
Fixes #50588.

git-svn-id: https://develop.svn.wordpress.org/trunk@48608 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-25 15:36:07 +00:00
Sergey Biryukov
093147e413 I18N: Respect the passed text_direction argument in wp_die().
Previously, the passed value was only used as a fallback if `get_language_attributes()` is not yet available.

Props apedog.
Fixes #49060.

git-svn-id: https://develop.svn.wordpress.org/trunk@48607 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-25 15:24:21 +00:00
Sergey Biryukov
c8bb1f5cfd Docs: Improve description for wp_unique_filename().
Props stevenlinx.
Fixes #50762.

git-svn-id: https://develop.svn.wordpress.org/trunk@48606 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-25 12:29:13 +00:00
Sergey Biryukov
3127db3470 Bundled Themes: Rebuild Twenty Nineteen’s RTL stylesheet.
This adds the changes from [48073] to the `style-rtl.css` file.

Previously committed in [48514], accidentally reverted in [48602].

See #45912, #49843.

git-svn-id: https://develop.svn.wordpress.org/trunk@48605 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-24 18:30:55 +00:00
Sergey Biryukov
674e7a2283 Tests: Update wp_unique_filename() unit tests to account for sanitize_file_name() removing accents.
Follow-up to [48603].

See #22363.

git-svn-id: https://develop.svn.wordpress.org/trunk@48604 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-24 18:17:49 +00:00
Sergey Biryukov
c7783dc49a Media: Remove accents in sanitize_file_name().
This brings some consistency with `sanitize_title()` and `sanitize_user()`.

Props tar.gz, NumidWasNotAvailable, juliobox, p_enrique, cristovaov, zodiac1978, mikeschroder, markoheijnen, chriscct7, swissspidy, DrProtocols, pento, gitlost, joemcgill, dustinbolton, programmin, Vayu, MaximeCulea, lucasbustamante, nilovelez, RavanH, audrasjb, SergeyBiryukov.
See #22363.

git-svn-id: https://develop.svn.wordpress.org/trunk@48603 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-24 18:01:48 +00:00
Jake Spurlock
2f98829e41 Bundled Theme: Ensure parity between the block editor and the front-end in twentynineteen.
Alignments and blocks were not always appearing as they should in the admin.

- Wide alignments sometimes appear only as wide as the text column.
- Full and wide appear centered on the text column
- Full-width blocks sometimes do not take up the full width of the page, and other times they cause a horizontal scroll.
- Wide and full group block children take up the full width of the block by default.

Fixes #49843.
Props kjellr, Joen, poena.


git-svn-id: https://develop.svn.wordpress.org/trunk@48602 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-24 17:46:20 +00:00
Jake Spurlock
75048987d8 Mail: Ensure that a server hostname can be set by using network_home_url().
Due to the varying server setups, `$_SERVER['SERVER_NAME'];` can't reliably ensure that there will be a relevant host that could be used as the hostname in an email. Since the `network_home_url()` is set at this point, and is filterable, this should better enable emails to be sent from the server.

Fixes #25239.
Props layotte, SergeyBiryukov, nacin, sreedoap, szepe.viktor, jesin, kitchin, mensmaximus, mt8.biz, Grzegorz.Janoszka, cbutlerjr, dd32, BjornW, neodjandre, BjornW, Ipstenu, ocean90, danielbachhuber, desmith, joemcgill, jdgrimes, riasat, derekakelly, swissspidy, lilmike, tsimmons, robert.peake, DavidAnderson, cloudstek, pigdog234, BjornW, rawrly, pessoft, RedSand, seayou, dvershinin, bastho, chesio, Starbuck, afragen, ocean90, whyisjake.


git-svn-id: https://develop.svn.wordpress.org/trunk@48601 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-24 17:38:27 +00:00
Sergey Biryukov
9bd4234bf6 Docs: Correct documentation for wp_insert_term().
The function is used for adding a new term, not updating an existing one.

Props audrasjb, bmartinent.
Fixes #50753.

git-svn-id: https://develop.svn.wordpress.org/trunk@48600 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-24 12:17:54 +00:00
Sergey Biryukov
fc1e77f42b Docs: Correct some documentation for wp_update_term().
See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@48599 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-24 12:02:47 +00:00
Sergey Biryukov
6b24e352a0 Docs: Add a mention of core-block-patterns as a possible value for add_theme_support().
Follow-up to [48492].

See #50669.

git-svn-id: https://develop.svn.wordpress.org/trunk@48598 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-24 01:19:03 +00:00
Sergey Biryukov
53657ffc52 Docs: Improve documentation for wp_list_comments().
Note that passing `div` to the `style` parameter will result in no additional list markup.

Props liuhaibin, jeremyfelt, functionalrhyme.
Fixes #49181.

git-svn-id: https://develop.svn.wordpress.org/trunk@48597 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-24 01:09:07 +00:00
Sergey Biryukov
3ebdc35d36 Media: Filter out a few more special characters in sanitize_file_name().
Props audrasjb.
Fixes #50231.

git-svn-id: https://develop.svn.wordpress.org/trunk@48596 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-24 00:57:26 +00:00