Commit Graph

41857 Commits

Author SHA1 Message Date
Dominik Schilling 5b31b4eee4 Coding Standards: Fix code indentation in `post_submit_meta_box()` to improve readability.
See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@48041 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-14 16:29:33 +00:00
Sergey Biryukov 9c0fd94558 Coding Standards: Use strict comparison in `js/_enqueues/lib/ajax-response.js`.
Props ankitmaru.
Fixes #50320.

git-svn-id: https://develop.svn.wordpress.org/trunk@48040 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-14 11:26:22 +00:00
Sergey Biryukov d7b5385f04 Accessibility: Themes: Don't link to the home page in `get_custom_logo()` when it's displayed on the home page.
Props Soean, audrasjb, sabernhardt, FlorianBrinkmann, rianrietveld, afercia, joedolson, samful, knutsp, SergeyBiryukov.
See #37011.

git-svn-id: https://develop.svn.wordpress.org/trunk@48039 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-14 10:00:47 +00:00
Sergey Biryukov 73280035e6 External Libraries: Update Masonry to 4.2.2 and imagesLoaded to 4.1.4.
Notable changes include dropping support for IE 8 & 9, which are no longer supported by WordPress core either.

Release notes:
https://github.com/desandro/masonry/releases
https://github.com/desandro/imagesloaded/releases

Changelogs:
https://github.com/desandro/masonry/compare/v3.3.2...v4.2.2
https://github.com/desandro/imagesloaded/compare/v3.2.0...v4.1.4

Props pierlo, hareesh-pillai, grapplerulrich, pderksen, desrosj, garrett-eclipse, SergeyBiryukov.
Fixes #37675, #48031.

git-svn-id: https://develop.svn.wordpress.org/trunk@48038 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-13 18:51:07 +00:00
Sergey Biryukov d0268ece09 Themes: Ensure the theme slug is set before checking if the theme is installed or active.
This fixes an issue with every installed theme being marked as active on Themes screen.

The slug is set on Add Themes screen, but not on Themes.

Follow-up to [47924].

Props BackuPs, mukesh27, SergeyBiryukov.
Fixes #50381. See #50334.

git-svn-id: https://develop.svn.wordpress.org/trunk@48037 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-13 14:24:30 +00:00
Sergey Biryukov a0742854fa Coding Standards: Exclude the whole PHPMailer directory from WPCS checks, for consistency with other external libraries in their own directory.
Follow-up to [48033].

See #41750.

git-svn-id: https://develop.svn.wordpress.org/trunk@48036 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-13 12:34:12 +00:00
Sergey Biryukov de4d6b454b External Libraries: Add class aliases for `phpmailerException` and `SMTP` to deprecated files to account for the new namespace.
This ensures backward compatibility with plugins using the old `class-phpmailer.php` or `class-smtp.php` files.

Follow-up to [48033].

Props Otto42.
Fixes #50379. See #41750.

git-svn-id: https://develop.svn.wordpress.org/trunk@48035 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-12 21:40:52 +00:00
Timothy Jacobs eddef0565c External Libraries: Skip deprecated file warning for PHPMailer if the API is not loaded.
In [48033] the "class-phpmailer.php" file was deprecated. In test suites, this file is loaded before WordPress in order to setup a mock PHPMailer instance. This means that for test suites that are still loading that file, they'll experience fatal errors due to the undefined "_deprecated_file" function.

This commit skips issuing the deprecated file warning if the "_deprecated_file" function is not available.

Fixes #50380.


git-svn-id: https://develop.svn.wordpress.org/trunk@48034 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-12 21:08:08 +00:00
Jonathan Desrosiers 0933882c6e External Libraries: Upgrade PHPMailer to version 6.1.6.
Now that WordPress Core supports PHP >= 5.6, the PHPMailer library can be updated to the latest version.

The PHPMailer files now reside in a new directory, `wp-includes/PHPMailer`. These files are copied verbatim from the library upstream and will make updating in the future easier. For backwards compatibility, the old files will remain and trigger deprecated file warnings.

The PHPMailer class is also now under the `PHPMailer\PHPMailer\PHPMailer` namespace. The `PHPMailer` class in the global namespace has been aliased for a seamless transition.

This upgrade also clears up a handful of PHP compatibility issues detailed in #49922.

For a full list of changes, see the PHPMailer GitHub: https://github.com/PHPMailer/PHPMailer/compare/v5.2.27...v6.1.6.

Props Synchro, SergeyBiryukov, desrosj, donmhico, ayeshrajans.
Fixes #41750.

git-svn-id: https://develop.svn.wordpress.org/trunk@48033 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-12 15:45:30 +00:00
Ian Belanger 55f0a18c02 Bundled Themes: Twenty Nineteen long submenu item titles do not wrap.
Fixes the issue of long submenu item titles that do not wrap by adding a `max-width: 20rem;` and removing `white-space: nowrap;`.

Props kjellr, mukesh27, mohsinrasool, samful.
Fixes #45866.

git-svn-id: https://develop.svn.wordpress.org/trunk@48032 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-12 15:09:35 +00:00
Sergey Biryukov d32ec3352b Filesystem API: Avoid a PHP notice in `WP_Filesystem_Direct::owner()` and `::group()` methods and their `WP_Filesystem_SSH2` counterparts.
Although not officially documented in the PHP manual, `posix_getpwuid()` and `posix_getgrgid()` can return `false` in some circumstances.

Props logig.
Fixes #50373.

git-svn-id: https://develop.svn.wordpress.org/trunk@48031 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-12 12:33:12 +00:00
Ian Belanger 73669965a6 Bundled Themes: Twenty Seventeen CSS issue when using rowspan in tables.
Fixes CSS issue when using rowspan in tables. This issue does not apply to the Table Block, just tables inserted as custom html.

Props aussi, subrataemfluence, jainnidhi.
Fixes #44004.

git-svn-id: https://develop.svn.wordpress.org/trunk@48028 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-11 17:13:05 +00:00
Ian Belanger d5c3483f8c Bundled Themes: Twenty Seventeen add Telegram and Whatsapp support to Social Media Menu.
Adds Telegram and Whatsapp support and SVG's to Social Media Menu.

Props cpasqualini, audrasjb, laurelfulford, karmatosed, ibdz.
Fixes #43999.

git-svn-id: https://develop.svn.wordpress.org/trunk@48027 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-11 15:29:02 +00:00
Sergey Biryukov 96da995104 Canonical: Revert [47937] pending unit tests and further review.
Props needle.
See #12456.

git-svn-id: https://develop.svn.wordpress.org/trunk@48026 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-11 10:53:06 +00:00
Jake Spurlock 2efbc51712 Editor: Ensure latest comments can only be viewed from public posts.
Props: poena, xknown. 


git-svn-id: https://develop.svn.wordpress.org/trunk@47984 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-10 19:18:50 +00:00
Ian Belanger 35dffcf2ec Bundled Themes: Twenty Twenty and Twenty Nineteen version bump.
We are releasing new versions of Twenty Twenty & Twenty Nineteen today thus we need to bump the version.

Props ianbelanger.
Fixes #50359.

git-svn-id: https://develop.svn.wordpress.org/trunk@47952 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-10 17:30:43 +00:00
Jake Spurlock 74e30c3c46 Administration: Add a new filter to extend `set-screen-option`.
Props: xknown, SergeyBiryukov.


git-svn-id: https://develop.svn.wordpress.org/trunk@47951 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-10 16:54:21 +00:00
Jake Spurlock 6e0226be12 Themes: Ensure a broken theme name is returned properly.
Props: sstoqnov.


git-svn-id: https://develop.svn.wordpress.org/trunk@47950 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-10 16:46:50 +00:00
Jake Spurlock 9173df8e25 Formatting: Ensure that `wp_validate_redirect()` sanitizes a wider variety of characters.
Props: xknow, vortfu.



git-svn-id: https://develop.svn.wordpress.org/trunk@47949 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-10 16:44:14 +00:00
Jake Spurlock ad0a0a1ec1 Editor: Prevent HTML decoding on by setting the proper editor context.
Props: sstoqnov.


git-svn-id: https://develop.svn.wordpress.org/trunk@47948 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-10 16:39:31 +00:00
Jake Spurlock fe83aca573 Embeds: Ensure that the title attribute is set correctly on embeds.
Props xknown.


git-svn-id: https://develop.svn.wordpress.org/trunk@47947 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-10 16:34:18 +00:00
Sergey Biryukov 4d506a300f Docs: Add missing documentation for the `$group` parameter of `WP_Object_Cache::get_multiple()`.
Synchronize documentation between `wp_cache_get_multiple()`, its compat version, and the class method.

See #20875.

git-svn-id: https://develop.svn.wordpress.org/trunk@47944 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-10 09:55:56 +00:00
Timothy Jacobs ddf897db05 REST API: Fix updating "multiple" meta keys with non-string values.
Previously, the REST API would end up deleting each row of metadata and recreating it unnecessarily. This was caused by a type mismatch where the metadata API would always return a string value, and the REST API operated on a typed value.

The REST API now applies the same sanitization and type casting for "multiple" meta keys and "single" meta keys.

Fixes #49339.
Props renathoc.


git-svn-id: https://develop.svn.wordpress.org/trunk@47943 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-10 02:20:18 +00:00
Jonathan Desrosiers 45e9cb7066 Coding Standards: Cleans up some PHPCS issues introduced in [47938].
See #20875.

git-svn-id: https://develop.svn.wordpress.org/trunk@47942 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-09 22:40:50 +00:00
Ian Belanger 5097db06aa Bundled Themes: Twenty Twenty number of replies not translatable.
Fixes the issue by removing the single quote from around the `1` in the elseif conditional of the comments template.

Props Parvand, SergeyBiryukov, desrosj, juliobox, Mista-Flo, benjamingosset, audrasjb, opurockey.
Fixes #49058.

git-svn-id: https://develop.svn.wordpress.org/trunk@47941 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-09 20:00:47 +00:00
Ian Belanger 3b0920dd37 Bundled Themes: Twenty Twenty HTML in featured image caption is being escaped.
Fixes the issue by replacing `esc_html` with `wp_kses_post` in the caption in featured images.

Props pierlo, JavierCasares, audrasjb.
Fixes #49833.

git-svn-id: https://develop.svn.wordpress.org/trunk@47940 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-09 19:50:26 +00:00
Jake Spurlock 128b5b8491 Cache API: Include the `cache-compat` file.
This was missed during the prior commit.

See [47938].



git-svn-id: https://develop.svn.wordpress.org/trunk@47939 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-09 19:48:18 +00:00
Jake Spurlock d4d78e4ae7 Cache API: Introduce `wp_cache_get_multi()`.
Many caching backend have support for multiple gets in a single request. This brings that support to core, with a compatability fallback that will loop over requests if needed.

Fixes: #20875.
Props: nacin, tollmanz, wonderboymusic, ryan, jeremyfelt, spacedmonkey, boonebgorges, dd32, rmccue, ocean90, jipmoors, johnjamesjacoby, tillkruess, donmhico, davidbaumwald, SergeyBiryukov, whyisjake.



git-svn-id: https://develop.svn.wordpress.org/trunk@47938 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-09 19:45:27 +00:00
Jake Spurlock 78d1ab2ed4 Canonical: Ensure a redirect for posts missing `postname` in a query with an ID.
If a site is using `/%post_id%/%postname%/` as permalink structure, and is missing the `postname`, the site  won't redirect to the appropriate URL. This change ensure that the redirect happens.

Fixes: #12456.
Props: Frank.Prendergast, dd32, Otto42, hlanggo, wonderboymusic, atimmer, seth17, calvin_ngan, Niresh12495, anbumz, SergeyBiryukov, donmhico.




git-svn-id: https://develop.svn.wordpress.org/trunk@47937 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-09 19:24:23 +00:00
Sergey Biryukov 137443482c Docs: Fix typo in `WP_Widget::__construct()` and `::WP_Widget()` DocBlocks.
Props SUM1.
Fixes #50348.

git-svn-id: https://develop.svn.wordpress.org/trunk@47936 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-09 15:35:10 +00:00
Sergey Biryukov df3bd5ecb0 Docs: Improve documentation for `is_active_sidebar()`.
The function determines whether the sidebar contains widgets, not that it is loaded on the page.

Props SUM1.
Fixes #50347.

git-svn-id: https://develop.svn.wordpress.org/trunk@47935 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-09 15:29:57 +00:00
Ian Belanger 16c36e4d2e Bundled Themes: Twenty Fifteen bulleted list block appears too far to the left in the editor.
Fixes the issue by removing unnecessary margin rules for bulleted lists in the editor.

Props kjellr.
Fixes #50029.

git-svn-id: https://develop.svn.wordpress.org/trunk@47934 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-09 14:08:04 +00:00
Ian Belanger 6f03104cdc Bundled Themes: Twenty Twenty uses overly specific selector for button background.
Fixes the issue by removing `:not(.toogle)` from the `button` selector, as it is not needed.

Props flixos90.
Fixes #50271.

git-svn-id: https://develop.svn.wordpress.org/trunk@47933 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-09 13:50:38 +00:00
Sergey Biryukov 65f22692bb Networks and Sites: Ensure the site ID in `wp_insert_site()` is still correct after calling `clean_blog_cache()`.
By saving `$wpdb->insert_id` to a variable, we make sure the ID does not change if another database insert is performed on the `clean_site_cache` action.

Props trepmal.
Fixes #50324.

git-svn-id: https://develop.svn.wordpress.org/trunk@47932 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-09 12:39:09 +00:00
Sergey Biryukov eb1c55a7ac Docs: Document that `get_tags()` returns a `WP_Error` object if any of the specified taxonomies do not exist.
Props coffee2code.
Fixes #50344.

git-svn-id: https://develop.svn.wordpress.org/trunk@47930 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-09 11:12:57 +00:00
Jonathan Desrosiers ba994f6c09 Coding Standards: PHP short ternary operator syntax is not allowed.
WPCS 2.2.0 added a sniff for detecting short ternary operator syntax, which is not allowed per the Core handbook.

Follow up of [47927].
Fixes #50258.

git-svn-id: https://develop.svn.wordpress.org/trunk@47929 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-08 21:25:46 +00:00
Jonathan Desrosiers 7a64133821 Build/Test Tools: Update the `wp-coding-standards/wpcs` package.
This updates the version from 2.1.1 to 2.3.0, the latest version at this time.

Fixes #50258.

git-svn-id: https://develop.svn.wordpress.org/trunk@47927 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-08 20:09:53 +00:00
Jonathan Desrosiers f40f5885e5 General: Remove or add inline comments to `$HTTP_RAW_POST_DATA` occurrences.
The `$HTTP_RAW_POST_DATA` global was deprecated in PHP 5.6 and removed completely in PHP 7.0. In general, `php://input` should be used instead of `$HTTP_RAW_POST_DATA`.

Because WordPress Core still supports PHP 5.6, some plugins or sites may still rely on this variable being present and populated with the expected data. For that reason, occurrences of the variable will remain with updated inline documentation until support for PHP 5.6 is officially dropped in WordPress.

Props skoskie, jrf, desrosj, TimothyBlynJacobs.
See #49922.
Fixes #49810.

git-svn-id: https://develop.svn.wordpress.org/trunk@47926 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-08 19:53:19 +00:00
Jonathan Desrosiers 4e31dc573d Bundled Themes: Update several package versions in Twenty Twenty and Twenty Nineteen.
The following packages received version bumps:

Twenty Twenty
- `concurrently`
- `postcss-cli`
- `rtlcss`
- `stylelint-a11y`

Twenty Nineteen
- `node-sass`
- `postcss-cli`
- `rtlcss`

See #49768.

git-svn-id: https://develop.svn.wordpress.org/trunk@47925 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-08 18:45:08 +00:00
Sergey Biryukov 823b703fe9 Themes: Show a disabled "Activated" button instead of "Activate" for the active theme on Add Themes screen.
Additionally, switch the "Live Preview" label for the active theme to "Customize", for consistency with the Themes screen.

Props afercia, SergeyBiryukov.
Fixes #50334.

git-svn-id: https://develop.svn.wordpress.org/trunk@47924 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-08 18:14:19 +00:00
Timothy Jacobs f5dde31290 REST API: Support the (min|max)Items JSON Schema keywords.
A future commit will add support for the uniqueItems keyword.

Props sorenbronsted.
See #48821.


git-svn-id: https://develop.svn.wordpress.org/trunk@47923 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-07 22:40:16 +00:00
Sergey Biryukov d3387a2161 Posts, Post Types: Display a more specific error message when an attachment could not be inserted into the database.
Props shital-patel, Presskopp, ocean90.
Fixes #50325.

git-svn-id: https://develop.svn.wordpress.org/trunk@47922 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-07 09:22:07 +00:00
Timothy Jacobs 4fb1e58c50 REST API: Add additional fields to the themes controller.
When the themes controller was introduced it only returned a theme's supported features. This adds the majority of a theme's header information to the response.

Props ockham, spacedmonkey.
Fixes #49906.


git-svn-id: https://develop.svn.wordpress.org/trunk@47921 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-07 06:44:08 +00:00
Peter Wilson 602faebb0d Block Editor: Update `wp-includes/assets/script-loader-packages.php`.
Follow-up to [47765], [47766].
See #50094.


git-svn-id: https://develop.svn.wordpress.org/trunk@47920 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-07 01:27:39 +00:00
Sergey Biryukov 09aaa76452 Bootstrap/Load: Introduce `wp_get_environment_type()` to retrieve the current environment type.
The type can be set via the `WP_ENVIRONMENT_TYPE` global system variable, a constant of the same name, or the `wp_get_environment_type` filter.

Possible values include `development`, `stage`, `production'. If not set, the type defaults to `production`.

Props Clorith, krogsgard, joostdevalk, frank-klein, Maelacuna, nathanrice, grierson, jchristopher, davidvee, jackfungi, johnbillion, tabrisrp, knutsp, ev3rywh3re, Rastaban, danielbachhuber, pfefferle, audrasjb, SergeyBiryukov.
Fixes #33161.

git-svn-id: https://develop.svn.wordpress.org/trunk@47919 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-06 11:05:35 +00:00
adamsilverstein 803eab428d Media: remove any `attachment-filter` query param when switching views.
Fix an issue where the media attachment filter no longer worked after switching to list view, filtering by a media type then switching back to the grid view.

Props itzmekhokan, netsurfer2705, zodiac1978.
Fixes #43656.



git-svn-id: https://develop.svn.wordpress.org/trunk@47915 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-05 21:11:02 +00:00
Sergey Biryukov 2071347eac Networks and Sites: Update the link text for "Debugging a WordPress Network" support article in `ms_not_installed()`.
Props Presskopp.
Fixes #50326.

git-svn-id: https://develop.svn.wordpress.org/trunk@47914 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-05 09:11:20 +00:00
Sergey Biryukov d4d709856b Docs: Update the DocBlock for the `wp_media_attach_action` hook per the documentation standards.
Rename the `$att_id` variable to `$attachment_id` for clarity.

Follow-up to [47909].

See #49614.

git-svn-id: https://develop.svn.wordpress.org/trunk@47913 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-05 08:28:42 +00:00
Jonathan Desrosiers 05e1cb8b0b Docs: Fix a typo in the Docker compose file.
See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@47912 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-04 16:51:32 +00:00
Jake Spurlock e756de59e5 REST API: Ensure that all properties of `get_endpoint_args_for_item_schema` are listed.
* Add new var $valid_schema_properties to match rest_validate_value_from_schema()
* Unit test to ensure all valid properties exists, and non-valid properties are ignored

Fixes: #50301.
Props: pentatonicfunk, TimothyBlynJacobs.



git-svn-id: https://develop.svn.wordpress.org/trunk@47911 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-04 16:41:47 +00:00