Commit Graph

41564 Commits

Author SHA1 Message Date
John Blackbourn
c570d4409f Docs: Update inline documentation for the wpdb class.
Props theMikeD

Fixes #49477

git-svn-id: https://develop.svn.wordpress.org/trunk@47740 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-02 17:23:28 +00:00
Dominik Schilling
c09e2d21a7 Users: Don't reset user language preference on user update.
Props johnbillion.
Fixes #38665.

git-svn-id: https://develop.svn.wordpress.org/trunk@47739 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-02 16:27:34 +00:00
Sergey Biryukov
b7a8094d32 Query: Simplify the logic in WP::handle_404() to allow for easier modifications.
See #45337.

git-svn-id: https://develop.svn.wordpress.org/trunk@47738 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-02 08:46:39 +00:00
Jonathan Desrosiers
7e0a63f8c5 General: More PHP compatibility adjustments.
In this round:
- Removed references to `safe_mode` in `class-php3.php`. This was removed in PHP 5.4.
- Add inline exclude comments for compatibility checks in getID3.

Follow up of [47735-47736].

See #49922.

git-svn-id: https://develop.svn.wordpress.org/trunk@47737 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-01 20:10:58 +00:00
Jonathan Desrosiers
627b93f54d General: Fix typo within phpcs:ignore inline comment.
Follow up of [47735].

See #49922.

git-svn-id: https://develop.svn.wordpress.org/trunk@47736 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-01 19:34:05 +00:00
Jonathan Desrosiers
8e2de8212b General: Fix various issues flagged by the PHPCompatibilityWP PHPCS ruleset.
As part of the continued effort to improve PHP compatibility, the following improvments are being made:

- Removing deprecated PHP `safe_mode` checks not found in bundled external libraries.
- Change the remaining `while` loops using `each()` to `foreach` loops.
- Prevent false positives from being flagged for the `sodium_compat` library being caused by loading this in a non-standard way.
- Add inline comments to not flag deprecated PHP directives in the getID3 library.

Props desrosj, earnjam, dryanpress.
See #49922.

git-svn-id: https://develop.svn.wordpress.org/trunk@47735 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-01 19:05:04 +00:00
Sergey Biryukov
05423578d7 Taxonomy: Restore (un-deprecate) the tag_row_actions filter.
The filter provides a simple way for plugin authors to add actions generically for all taxonomy list tables without looping through each taxonomy individually.

Props joemcgill, delowardev.
Fixes #49808.

git-svn-id: https://develop.svn.wordpress.org/trunk@47734 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-01 16:43:46 +00:00
Jonathan Desrosiers
d12ad5050b External Libraries: Update the SimplePie library to the latest version (1.5.5).
This brings SimplePie in sync with the most up to date version, 1.5.5.

This update brings many bug fixes, small enhancements, and PHP compatibility fixes for newer versions of PHP.

For a full list of changes, see https://github.com/simplepie/simplepie/blob/master/CHANGELOG.md#155-may-1-2020.

Props dshanske, slushman, etruel, wpshades, dmenard, desrosj, hareesh-pillai, stevenkword, jrf, Ipstenu, johnbillion.
Fixes #36669.

git-svn-id: https://develop.svn.wordpress.org/trunk@47733 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-01 14:24:42 +00:00
Jonathan Desrosiers
aef50f979d Build/Test Tools: Introduce a command for restarting the local Docker environment.
This change introduces the `env:restart` command for easier restarting of the local Docker environment.

Props desrosj, ianbelanger.
Fixes #50039.


git-svn-id: https://develop.svn.wordpress.org/trunk@47730 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-30 20:20:18 +00:00
Jonathan Desrosiers
13d382f1ff Reverting [47728].
Unprops desrosj.
See #50039.

git-svn-id: https://develop.svn.wordpress.org/trunk@47729 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-30 20:16:00 +00:00
Jonathan Desrosiers
29563e5721 -username=desrosj
git-svn-id: https://develop.svn.wordpress.org/trunk@47728 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-30 19:53:02 +00:00
Sergey Biryukov
af596bcc5b Canonical: Redirect paged requests for non-paginated posts to the post permalink.
This avoids displaying duplicate content of the same post under different URLs and ensures the canonical URL is correct.

Previously, requests for invalid page numbers were only redirected to the post permalink if the post was actually paginated using the `<!--nextpage-->` marker.

Follow-up to [34492].

Props jeremyfelt, prografika, sachit.tandukar, subrataemfluence, hronak, ekatherine, henry.wright, chesio, dd32, SergeyBiryukov.
Fixes #40773. See #45337, #28081, #11694.

git-svn-id: https://develop.svn.wordpress.org/trunk@47727 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-30 12:03:11 +00:00
Sergey Biryukov
be8b8baec9 Help/About: Revert [47699] from trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@47706 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-29 18:41:12 +00:00
whyisjake
d27a3718d5 Update the about page for WordPress 5.4.1
git-svn-id: https://develop.svn.wordpress.org/trunk@47699 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-29 18:35:02 +00:00
Ian Belanger
8ba39ba9f6 Bundled Themes: Twenty Twenty image caption is not aligned center when image is, on the front-end.
Fixes the image caption alignment issue by adding `text-align: center;` to `.wp-block-image .aligncenter figcaption`.

Props markusthiel, SergeyBiryukov, garethgillman.
Fixes #49320.

git-svn-id: https://develop.svn.wordpress.org/trunk@47689 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-29 18:17:11 +00:00
Sergey Biryukov
c61e42db64 Coding Standards: Fix WPCS issues in tests/formatting/SanitizeFileName.php.
Follow-up to [47638].

git-svn-id: https://develop.svn.wordpress.org/trunk@47664 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-29 17:23:30 +00:00
Sergey Biryukov
514f7c4cc9 Docs: Correct @since versions, remove duplicate comment.
Follow-up to [47633].

git-svn-id: https://develop.svn.wordpress.org/trunk@47663 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-29 17:23:21 +00:00
Jake Spurlock
74d6f9613b Formatting: Expand sanitize_file_name to have better support for utf8 characters.
Props: xknown, peterwilsoncc.


git-svn-id: https://develop.svn.wordpress.org/trunk@47638 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-29 15:38:43 +00:00
Jake Spurlock
935ab39e8e Cache API: Ensure proper escaping around the stats method in the cache API.
Props: nickdaugherty, batmoo, whyisjake, westi.


git-svn-id: https://develop.svn.wordpress.org/trunk@47637 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-29 15:34:55 +00:00
Jake Spurlock
ec05c8b897 Block Editor: Coding standards, properly escape class names.
Props: aduth, noisysocks, pento, talldanwp, jorgefilipecosta, whyisjake, ellatrix, ehti.


git-svn-id: https://develop.svn.wordpress.org/trunk@47636 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-29 15:32:19 +00:00
Jake Spurlock
8e11facb67 Query: Ensure that only a single post can be returned on date/time based queries.
Props: sstoqnov, peterwilsoncc.


git-svn-id: https://develop.svn.wordpress.org/trunk@47635 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-29 15:26:56 +00:00
Jake Spurlock
4354d1fc5c User: Invalidate user_activation_key on password update.
Props: sstoqnov, sergeybiryukov.



git-svn-id: https://develop.svn.wordpress.org/trunk@47634 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-29 15:23:37 +00:00
Jake Spurlock
cfb690cb8e Customize: Add additional filters to Customizer to prevent JSON corruption.
This solution extends the wp_insert_post_data filter to pass in addition to the slashed/sanitized/processed data, and the slashed/sanitized/unprocessed data, to also pass the initial slashed/unsanitized/unprocessed data which was passed into wp_insert_post(). This then allows plugins to have complete control over how sanitization is performed based on the post type.

Props westonruter, peterwilsoncc, sstoqnov, whyisjake, xknown.
 


git-svn-id: https://develop.svn.wordpress.org/trunk@47633 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-29 15:12:50 +00:00
Sergey Biryukov
833ce3b15b Networks and Sites: Link to Nginx documentation on Network Setup screen when Nginx is in use.
Props lipathor, audrasjb, johnbillion, flixos90.
Fixes #41166.

git-svn-id: https://develop.svn.wordpress.org/trunk@47632 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-29 14:41:42 +00:00
Sergey Biryukov
3d932981e2 Docs: Correct @return type for WP_Theme::get_post_templates().
The method returns an array of strings, not a single string.

Props mayankmajeji, salvatore.formisano.
Fixes #50020.

git-svn-id: https://develop.svn.wordpress.org/trunk@47631 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-28 15:00:30 +00:00
Sergey Biryukov
e46d1cfc84 Site Health: Avoid a PHP notice in WP_Site_Health::wp_cron_scheduled_check() if async test response does not contain the expected result.
Additionally, avoid a PHP notice in `::get_test_php_version()` if the minimum recommended version of PHP could not be determined.

Props schlessera, oakesjosh.
Fixes #49943.

git-svn-id: https://develop.svn.wordpress.org/trunk@47628 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-27 21:59:10 +00:00
Timothy Jacobs
86cbde382a REST API: Support the (min|max)Length JSON Schema keywords.
Props sorenbronsted.
Fixes #48820.


git-svn-id: https://develop.svn.wordpress.org/trunk@47627 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-27 02:27:02 +00:00
Sergey Biryukov
3a229d0b47 Comments: Ensure that inserting a comment with an empty type results in correct comment type.
Add unit tests for `wp_handle_comment_submission()` and `wp_insert_comment()` receiving an empty type.

Follow-up to [47597].

Props ocean90, imath.
Fixes #49236.

git-svn-id: https://develop.svn.wordpress.org/trunk@47626 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-26 13:42:03 +00:00
Sergey Biryukov
aff2844d75 Comments: Restore inclusion of an empty comment type when building the WHERE clause in WP_Comment_Query::get_comment_ids().
This ensures that `get_comments( array( 'type' => 'comment' ) )` still includes comments that have not yet migrated to the `comment` type.

Follow-up to [47597].

Props ocean90.
See #49236.

git-svn-id: https://develop.svn.wordpress.org/trunk@47625 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-26 13:12:04 +00:00
Sergey Biryukov
c117fbe0cf Upgrade/Install: Introduce wp_in_maintenance_mode(), a helper function to check if WordPress is currently in maintenance mode.
Props Clorith.
Fixes #49959.

git-svn-id: https://develop.svn.wordpress.org/trunk@47623 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-25 20:18:00 +00:00
Sergey Biryukov
59433bb306 Administration: Remove right padding on form tables on smaller screens so that the spacing is equal on both sides.
Additionally, reduce the right margin on screen meta links (Help and Screen Options) to align with the tables.

Props jainnidhi, garrett-eclipse, ibdz, SergeyBiryukov.
Fixes #43279.

git-svn-id: https://develop.svn.wordpress.org/trunk@47622 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-25 12:25:54 +00:00
Ian Belanger
c629ae3180 Bundled Themes: Twenty Twenty remove unnecessary $css_dependencies variable in twentytwenty_block_editor_styles().
Removes the unnecessary `$css_dependencies` variable in `twentytwenty_block_editor_styles()`.

Props ocean90, Dency.
Fixes #49986.

git-svn-id: https://develop.svn.wordpress.org/trunk@47618 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-24 14:57:07 +00:00
Sergey Biryukov
055d1c6749 Code Modernization: Remove error suppression from parse_url() calls.
Previously, the `@` operator was used to prevent possible warnings emitted by `parse_url()` in PHP < 5.3.3 when URL parsing failed.

Now that the minimum version of PHP required by WordPress is 5.6.20, this is no longer needed.

Props netpassprodsr, Howdy_McGee.
Fixes #49980. See #24780.

git-svn-id: https://develop.svn.wordpress.org/trunk@47617 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-24 07:26:57 +00:00
Sergey Biryukov
d756c57432 Networks and Sites: Don't display an empty Menu Settings section in network admin if there are no items.
This accounts for returning an empty array from the `mu_menu_items` filter.

Props dlh.
Fixes #49977.

git-svn-id: https://develop.svn.wordpress.org/trunk@47616 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-23 18:56:40 +00:00
Sergey Biryukov
46aad811be Embeds: Fix incorrect usage of get_home_url() in oEmbed tests.
Switch to `home_url()` for consistency with other tests and to avoid confusion.

Props david.binda.
Fixes #49988.

git-svn-id: https://develop.svn.wordpress.org/trunk@47615 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-23 18:39:32 +00:00
Ian Belanger
e3a8f680d4 Bundled Themes: Twenty Twenty button styles produce inconsistent output and cannot be edited.
Fixes the issue with button styles not working when the Gutenberg plugin is activated while maintaining backwards compatibility.

Props nrqsnchz, poena, kjellr.
Fixes #49896.

git-svn-id: https://develop.svn.wordpress.org/trunk@47614 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-23 15:39:55 +00:00
Ian Belanger
c1bb2c2f74 Bundled Themes: Twenty Twenty resized images are centered inside the editor (with no alignment set) since WordPress 5.4.
Fixes the image alignment issue by removing `margin-left: auto;` and `margin-right: auto;` from `.editor-styles-wrapper .wp-block-image.is-resized`.

Props dianeco, JavierCasares.
Fixes #49600.

git-svn-id: https://develop.svn.wordpress.org/trunk@47613 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-22 19:23:54 +00:00
Jonathan Desrosiers
2b5b39931c Bootstrap/Load: Deprecate wp_unregister_GLOBALS().
The `register_globals` directive in PHP was deprecated in version 5.3 and removed entirely in 5.4.

Now that WordPress only supports PHP 5.6.20 and newer, the `wp_unregister_GLOBALS()` function can be deprecated.

Props ayeshrajans, desrosj, SergeyBiryukov.
Fixes #49938.

git-svn-id: https://develop.svn.wordpress.org/trunk@47612 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-22 15:40:41 +00:00
Sergey Biryukov
3659b767f1 Docs: Synchronize parameter documentation for various metadata functions, update per the documentation standards.
See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@47611 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-22 10:29:34 +00:00
Sergey Biryukov
b6391847b4 Docs: Document the default value of $single and $prev_value parameters in various metadata functions.
Props denisco.
See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@47610 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-22 09:38:12 +00:00
Ian Belanger
7016ad5a78 Bundled Themes: Twenty Twenty submenu items disappear underneath the Cover block.
Fixes the submenu issue by raising the z-index value of the site-header from 1 to 2.

Props kjellr, JavierCasares.
Fixes #49322.

git-svn-id: https://develop.svn.wordpress.org/trunk@47609 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-21 20:04:29 +00:00
Ian Belanger
134092ae54 Bundled Themes: Twenty Twenty missed license for images.
Fixes the image license in the readme by removing screenshot.png.

Props h71, poena.
Fixes #49316.

git-svn-id: https://develop.svn.wordpress.org/trunk@47608 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-21 19:41:26 +00:00
Ian Belanger
e658596ff6 Bundled Themes: Twenty Twenty block editor inserter is missing the +.
Fixes the disappearing `+` in the block editor when using the latest version of the Gutenberg plugin, by adding support for the native Gutenberg editor styles and removing `color: inherit;` from Twenty Twenty's style.css.

Props nrqsnchz, .
Fixes #49610.

git-svn-id: https://develop.svn.wordpress.org/trunk@47607 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-21 19:15:20 +00:00
Sergey Biryukov
5763451b44 Networks and Sites: Display the Site Address field on Add Site screen in left-to-right text direction.
Props ramiy.
Fixes #49949.

git-svn-id: https://develop.svn.wordpress.org/trunk@47606 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-21 11:24:15 +00:00
Sergey Biryukov
60b23a5cd0 Menus: Remove unused commented out code in wp-admin/nav-menus.php.
Props garrett-eclipse, audrasjb.
Fixes #49967.

git-svn-id: https://develop.svn.wordpress.org/trunk@47605 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-21 09:00:30 +00:00
Sergey Biryukov
2e126bda26 External Libraries: Revert [47603].
With the Docker image for PHP 7.4 updated to stable version, this should no longer be necessary.

See https://github.com/WordPress/wpdev-docker-images/pull/26

Props ocean90.
Fixes #49945.

git-svn-id: https://develop.svn.wordpress.org/trunk@47604 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-20 15:39:40 +00:00
Sergey Biryukov
a7624a3c43 External Libraries: Comment out magic quote functions in getID3().
For some reason, the `version_compare()` check does not work as expected on Travis.

Follow-up to [46113], [47601].

See #49945.

git-svn-id: https://develop.svn.wordpress.org/trunk@47603 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-20 12:10:49 +00:00
Sergey Biryukov
5f03485bc7 External Libraries: Backport a commit from getID3() trunk to fix a PHP 7.4+ notice.
This addresses a "Trying to access array offset on value of type bool" notice in the `getid3_mp3::MPEGaudioHeaderValid()` method.

Props schlessera.
Fixes #49945.

git-svn-id: https://develop.svn.wordpress.org/trunk@47602 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-20 11:32:37 +00:00
Sergey Biryukov
02e17123f9 External Libraries: Update getID3() to 1.9.19.
Changelog: https://github.com/JamesHeinrich/getID3/compare/v1.9.18...v1.9.19

Props ayeshrajans, schlessera.
See #49945.

git-svn-id: https://develop.svn.wordpress.org/trunk@47601 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-20 11:11:48 +00:00
Sergey Biryukov
5d5e3439e4 Users: Change "Your Profile" and "My Profile" links in admin menu and toolbar to just "Profile" for consistency.
Props donmhico, bcworkz, seanchayes, mikeschroder, garrett-eclipse, akhileshsabharwal, ScottSmith, nacin, jenmylo, afercia, swissspidy, felix-edelmann, helen, melchoyce, karmatosed.
Fixes #26769.

git-svn-id: https://develop.svn.wordpress.org/trunk@47600 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-20 08:37:31 +00:00