Commit Graph

41477 Commits

Author SHA1 Message Date
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
Sergey Biryukov b562537d98 Upload: Better align file input and buttons in plugin/theme upload form.
Follow-up to [47271].

Props seedsca, piyushmca.
Fixes #49914.

git-svn-id: https://develop.svn.wordpress.org/trunk@47599 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-19 09:45:33 +00:00
Sergey Biryukov d2deb5eba3 Accessibility: Widgets: Prevent checkboxes in widget control forms from overlapping on smaller screens.
Props jaz_on, milindmore22, passoniate, audrasjb, carriganvb, afercia, SergeyBiryukov.
Fixes #49228.

git-svn-id: https://develop.svn.wordpress.org/trunk@47598 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-18 07:01:58 +00:00
Sergey Biryukov d5a7a3a45d Comments: Use `comment` instead of an empty string for the `comment_type` DB field value in comments table.
This is the first step to bring support for custom comment types into WordPress.

Add a scheduled upgrade routine to update the type value for existing comments, in batches of 100 at a time.

Props imath, aaroncampbell, jeremyfelt, dshanske.
Fixes #49236.

git-svn-id: https://develop.svn.wordpress.org/trunk@47597 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-17 19:33:52 +00:00
Sergey Biryukov 02e7fc0c7e Coding Standards: Fix WPCS indentation issue in `wp-admin/nav-menus.php`.
This was causing a `PEAR.Functions.FunctionCallSignature.Indent` error if PHP_CodeSniffer 3.5.3 or newer is installed locally, despite the task passing on Travis.

See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@47596 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-17 18:53:33 +00:00
Sergey Biryukov 19ca20fbe2 Coding Standards: Fix WPCS indentation issue in `wp-admin/includes/class-wp-links-list-table.php`.
This was causing a `Generic.WhiteSpace.ScopeIndent.IncorrectExact` error if PHP_CodeSniffer 3.4.1 or newer is installed locally, despite the task passing on Travis.

See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@47595 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-17 18:29:06 +00:00
Ian Belanger c1aea8fd8a Bundled Themes: Twenty Twenty fix typo in readme.txt.
Fixed TikTok was misspelled as Tik Tok in the readme.txt.

Props Asif2BD.
Fixes #49932.

git-svn-id: https://develop.svn.wordpress.org/trunk@47594 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-17 15:45:56 +00:00
Sergey Biryukov bee5595311 Coding Standards: Format the markup of widget forms in a more consistent manner.
See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@47593 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-17 09:36:25 +00:00
Sergey Biryukov c9ba1876e1 Administration: Remove the smiley from overly happy "No activity yet!" message on Dashboard.
Props francoist, karmatosed, ibdz, estelaris, nrqsnchz, Presskopp.
Fixes #48387.

git-svn-id: https://develop.svn.wordpress.org/trunk@47592 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-17 07:55:33 +00:00
Ian Belanger 2370457175 Bundled Themes: Twenty Nineteen center and right-aligned heading accents appear broken.
Fixes the center and right aligned heading accents so that they align with the text, instead of just staying left-aligned.

Props kjellr, melchoyce.
Fixes #49699.

git-svn-id: https://develop.svn.wordpress.org/trunk@47591 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-16 19:45:19 +00:00
Ian Belanger 3d762adf5c Bundled Themes: Twenty Twenty inline images in list blocks are not positioned correctly.
Fixes the alignment of inline images in list blocks to match the way they look in the editor.

Props poena, mayankmajeji, JavierCasares.
Fixes #49793.

git-svn-id: https://develop.svn.wordpress.org/trunk@47590 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-16 19:36:03 +00:00
Ian Belanger 76dc390352 Bundled Themes: Twenty Twenty add TikTok to the social icon menu.
This adds TikTok as an option in the social icon menu.

Props mislavjuric, poena, audrasjb.
Fixes #49893.

git-svn-id: https://develop.svn.wordpress.org/trunk@47589 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-16 19:00:01 +00:00
Sergey Biryukov 9f5d9a932d Plugins: Add HTML ID attributes to plugin action links for easier targeting in browser-based testing.
Props roytanck, shooper.
Fixes #49916.

git-svn-id: https://develop.svn.wordpress.org/trunk@47588 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-16 17:00:58 +00:00
Ian Belanger 07bc94cc11 Bundled Themes: Twenty Nineteen editor style interferes with navigation menu block.
Update editor styles to prepare for changes coming to the editor in 5.5. Currently the issue is only present when using the latest version of the Gutenberg plugin.

Props kjellr, Joen.
Fixes #49613.

git-svn-id: https://develop.svn.wordpress.org/trunk@47587 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-16 14:54:37 +00:00
Ian Belanger 7b6e7babe4 Bundled Themes: Twenty Nineteen decrease the font size for widget titles.
Update styles to decrease the font size for widget titles.

Props kjellr, mukesh27.
Fixes #45865.

git-svn-id: https://develop.svn.wordpress.org/trunk@47586 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-16 14:36:20 +00:00
Sergey Biryukov cb29ca927c Site Health: Detect an active PHP session as a possible reason for HTTP requests timing out.
PHP sessions created by a `session_start()` function call may interfere with REST API and loopback requests.

An active session should be closed by `session_write_close()` before making any HTTP requests.

Props matthieumota, netweblogic, Clorith, afragen, vjik, SergeyBiryukov.
Fixes #47320.

git-svn-id: https://develop.svn.wordpress.org/trunk@47585 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-16 08:18:49 +00:00
Sergey Biryukov 90b0f49b1a Code Modernization: Remove conditional use of `stream_get_contents()` PHP function.
The function was introduced in PHP 5.0.0. Now that the minimum version of PHP required by WordPress is 5.6.20, these conditions are no longer needed.

Props jrf.
Fixes #48091.

git-svn-id: https://develop.svn.wordpress.org/trunk@47584 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-15 11:52:38 +00:00
Sergey Biryukov 72f54ba785 Comments: Clarify that "Comment Moderation" and "Comment Blocklist" options in Discussion Settings also apply to browser's user agent string for submitted comments.
Props zodiac1978.
Fixes #49902.

git-svn-id: https://develop.svn.wordpress.org/trunk@47583 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-15 06:38:03 +00:00
Dominik Schilling 165bcc506d Posts, Post Types: Pass the post object to the `before_delete_post`, `delete_post`, `deleted_post`, and `after_delete_post` actions.
Props jadpm.
Fixes #30940.

git-svn-id: https://develop.svn.wordpress.org/trunk@47582 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-14 19:24:49 +00:00
Sergey Biryukov 7ef97cfb10 Mail: Make the check for empty post title in `wp-mail.php` more resilient.
This addresses a regression in [47054], which caused posts sent via email to published with an empty title.

Props whyisjake, Otto42, MarkRH, MattyRob, mukesh27, afragen, pikamander2.
Fixes #49853.

git-svn-id: https://develop.svn.wordpress.org/trunk@47580 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-14 11:30:35 +00:00
Sergey Biryukov 4d601e57b6 Docs: Add a `@since` note for un-deprecated `category_link` and `tag_link` filters.
Follow-up to [47576].

See #49759.

git-svn-id: https://develop.svn.wordpress.org/trunk@47578 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-14 08:13:18 +00:00
Jake Spurlock 7d4a746f27 Taxonomy: Un-depracate `category_link` and `tag_link` filters.
Depracating these filter might have been an accident, so let's restore.

Props SergeyBiryukov, audrasjb, peterwilsoncc.
Fixes #49759. 


git-svn-id: https://develop.svn.wordpress.org/trunk@47576 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-14 00:31:18 +00:00
Sergey Biryukov d419b1b6d6 Plugins: Simplify the logic of `validate_plugin_requirements()`, update documentation.
This updates the function for consistency with `validate_theme_requirements()`.

Follow-up to [44978], [45546], [47573].

Fixes #43992.

git-svn-id: https://develop.svn.wordpress.org/trunk@47574 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-13 15:29:17 +00:00
Sergey Biryukov 286d672389 Themes: Block theme activation if it requires a higher version of PHP or WordPress.
Introduce `validate_theme_requirements()` for validating a theme's WordPress and PHP version requirements.

Follow-up to [44978] and [45546] for plugins.

Props afragen, audrasjb, SergeyBiryukov.
See #43992.

git-svn-id: https://develop.svn.wordpress.org/trunk@47573 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-13 15:26:37 +00:00
Sergey Biryukov d5df031e6f Privacy: Add an indication when the Copy action in Privacy Policy Guide is complete.
This adds a "Copied!" text near the "Copy this section to clipboard" button to provide direct feedback that the action was completed.

Props garrett-eclipse, nickylimjj, xkon, desrosj, birgire.
Fixes #44588.

git-svn-id: https://develop.svn.wordpress.org/trunk@47572 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-12 14:24:38 +00:00
Sergey Biryukov 63ac227863 Rewrite Rules: Use double quotes instead of backticks in `.htaccess` instructions about `# BEGIN/END` markers.
Previously, the backticks resulted in extra markup being added when posted on support forums.

Props mayankmajeji, knutsp.
Fixes #49868.

git-svn-id: https://develop.svn.wordpress.org/trunk@47571 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-11 15:07:27 +00:00
Sergey Biryukov eca3d5a2f3 Docs: Fix typo in `WP_Upgrader::__construct()` DocBlock.
Props mattrad.
Fixes #49856.

git-svn-id: https://develop.svn.wordpress.org/trunk@47570 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-10 09:46:21 +00:00
Jake Spurlock 3a2e24bab4 Site Health instantiation prevents use of some hooks by plugins.
As the WP_Site_Health class is instantiated prior to plugins being required and the `plugins_loaded` hook being fired, it prevents plugins from using the following hooks in the functions called by `maybe_create_scheduled_event()`.

Fixes #49824.
Props peterwilsoncc, whyisjake.



git-svn-id: https://develop.svn.wordpress.org/trunk@47568 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-10 03:55:08 +00:00
Jake Spurlock 8e016efcad Customize: Give the WordPress logo a white background for dark mode browsers.
The favicon is transparent, which would normally look fine, but on a dark background it washes out.

Props DhrRob, audrasjb.
Fixes 49798.


git-svn-id: https://develop.svn.wordpress.org/trunk@47564 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-10 02:48:51 +00:00
Jake Spurlock 6d586d4287 Privacy: Support additional elements (table, ol, ul) in privacy policy guide new styling
The privacy policy guide supports a lot of HTML, include rules for lists, and ensure proper styling for the rest.

Props garrett-eclipse. 
Fixes #49772.


git-svn-id: https://develop.svn.wordpress.org/trunk@47560 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-09 22:32:43 +00:00
K. Adam White 3abe80eea1 REST API: Handle parameter types consistently within set_param().
A request has multiple parameter types, including "query" and "json." Updating a parameter could previously modify a key's value in the wrong parameter type, leading to confusing and self-contradictory response objects.

Props mnelson4, TimothyBlynJacobs, vagios, jnylen0.
Fixes #40838.


git-svn-id: https://develop.svn.wordpress.org/trunk@47559 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-09 19:28:58 +00:00
Andrea Fercia e4b83cf509 Accessibility: Fix the headings hierarchy on the Freedoms page.
Props ryelle, afercia.
Fixes #49838.


git-svn-id: https://develop.svn.wordpress.org/trunk@47558 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-09 16:07:19 +00:00
Sergey Biryukov d8c502e966 Coding Standards: Use strict type check for `in_array()` and `array_search()`.
This addresses all the remaining `WordPress.PHP.StrictInArray.MissingTrueStrict` issues in core.

Includes minor code layout fixes for better readability.

Follow-up to [47550].

See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@47557 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-09 15:41:04 +00:00
Mike Schroder 3df79c3380 Tests: Pass API key to distributed test reporter.
Pass environment variable for test reporter API key to
`docker-compose` so that it can authenticate and submit results
to the hosting distributed tests.

Props SergeyBiryukov, mikeschroder.
Fixes #49846.

git-svn-id: https://develop.svn.wordpress.org/trunk@47556 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-09 06:06:02 +00:00
Sergey Biryukov adda585fb8 Privacy: Make the deprecated `wp_get_user_request_data()` function available on front end.
Previously, it was accidentally made available only in admin context.

Follow-up to [44606], [47245].

Props garrett-eclipse, johnjamesjacoby, r-a-y, Dono12.
Fixes #49802.

git-svn-id: https://develop.svn.wordpress.org/trunk@47555 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-08 18:31:21 +00:00
Andrew Ozz 7b5d78f82f Media: Enable lazy-loading of images by automatically adding the new `loading="lazy"` attribute to image tags on the front-end.
- Introduces `wp_lazy_loading_enabled()`, `wp_filter_content_tags()`, `wp_img_tag_add_loading_attr()`, and `wp_img_tag_add_srcset_and_sizes_attr()` functions.
- Introduces `wp_lazy_loading_enabled`, `wp_img_tag_add_loading_attr`, and `wp_img_tag_add_srcset_and_sizes_attr` filters.

Props flixos90, addyosmani, mor10, swissspidy, pierlo, westonruter, spacedmonkey, mikeschroder, jonoaldersonwp, peterwilsoncc, narwen, jeffpaul, OptimizingMatters, futtta, mukeshpanchal27, azaozz.

Fixes #44427.

git-svn-id: https://develop.svn.wordpress.org/trunk@47554 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-08 00:53:18 +00:00
Sergey Biryukov 4b79e69d89 Users: Pass the ID of the user that was logged out to the `wp_logout` action.
Props donmhico, figureone, TimothyBlynJacobs, rebasaurus.
Fixes #49533.

git-svn-id: https://develop.svn.wordpress.org/trunk@47553 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-07 16:12:22 +00:00
Sergey Biryukov b195a159e1 Coding Standards: Whitelist `date_default_timezone_set()` usage in `wp-settings.php`.
See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@47552 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-06 09:04:55 +00:00