Commit Graph

13988 Commits

Author SHA1 Message Date
Sergey Biryukov
995c51380b Tests: Replace "blog" reference in a comment about DISABLE_WP_CRON usage with "site".
Props davidbaumwald.
Fixes #48089.
Built from https://develop.svn.wordpress.org/trunk@46213


git-svn-id: http://core.svn.wordpress.org/trunk@46025 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-20 21:59:58 +00:00
desrosj
594f77dbae Docs: Add missing $which parameter descriptions.
Follow up of [46211].

See #45954.
Built from https://develop.svn.wordpress.org/trunk@46212


git-svn-id: http://core.svn.wordpress.org/trunk@46024 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-20 20:57:57 +00:00
desrosj
ba2700068d Networks and Sites: Add support for the extra_tablenav() method in WP_MS_Sites_List_Table.
This method allows additional filters or other UI components to be added to the top and bottom of the `WP_List_Table` between the bulk actions dropdown and search input field.

Fixes #45954.
Props pbiron, desrosj.
Built from https://develop.svn.wordpress.org/trunk@46211


git-svn-id: http://core.svn.wordpress.org/trunk@46023 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-20 20:53:58 +00:00
Sergey Biryukov
a9aefc83bc Code Modernization: Remove conditional use of PHP realpath().
The `realpath()` function was introduced in PHP 4.0.0. There's no point in checking if the function exists in PHP 5.6+, in only 2 instances out of 29.

Props jrf.
Fixes #48075.
Built from https://develop.svn.wordpress.org/trunk@46210


git-svn-id: http://core.svn.wordpress.org/trunk@46022 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-20 20:46:56 +00:00
Sergey Biryukov
d2ebf7d0e4 Privacy: Display group items count in the personal data export file if there's more than one item in the group.
Props birgire, garrett-eclipse, pputzer.
Fixes #46895.
Built from https://develop.svn.wordpress.org/trunk@46209


git-svn-id: http://core.svn.wordpress.org/trunk@46021 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-20 20:30:58 +00:00
desrosj
e589297afc Code Modernization: Remove JSON related polyfills.
The PHP native JSON extension has been bundled and compiled with PHP by default since version 5.2.0. Because the minimum version of PHP required by WordPress is now 5.6.20 (see #46594 and [45058]), JSON extension related polyfills and backwards compatibility code can now be removed.

This change removes the `json_last_error_msg()` and `JsonSerializable` polyfills included in WordPress for full JSON extension support in PHP < 5.6.

Follow up of [46205-46206].

See #47699.
Props jrf, Clorith, pento.
Built from https://develop.svn.wordpress.org/trunk@46208


git-svn-id: http://core.svn.wordpress.org/trunk@46020 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-20 20:16:58 +00:00
Adam Silverstein
a2f45dc9eb Media: make search input full width on mobile. Take two.
Props m1tk00.
Fixes #40130.


Built from https://develop.svn.wordpress.org/trunk@46207


git-svn-id: http://core.svn.wordpress.org/trunk@46019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-20 20:09:54 +00:00
desrosj
3cf6276ed0 Code Modernization: Remove JSON extension workarounds for PHP < 5.6.
The PHP native JSON extension has been bundled and compiled with PHP by default since version 5.2.0. Because the minimum version of PHP required by WordPress is now 5.6.20 (see #46594 and [45058]), JSON extension related polyfills and backwards compatibility code can now be removed.

This change removes code that supported JSON related functionality on older versions of PHP. This includes (but is not limited to) checks that `json_last_error()` exists, checking and setting the `JSON_UNESCAPED_SLASHES` and `JSON_PRETTY_PRINT` constants if not previously defined, and deprecating the `_wp_json_prepare_data()` function (which was 100% workaround code).

Follow up of [46205].

See #47699.
Props jrf, Clorith, pento.
Built from https://develop.svn.wordpress.org/trunk@46206


git-svn-id: http://core.svn.wordpress.org/trunk@46018 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-20 20:08:57 +00:00
desrosj
83b0086fca Code Modernization: Deprecate the Services_JSON and Services_JSON_Error classes.
The PHP native JSON extension has been bundled and compiled with PHP by default since version 5.2.0. Because the minimum version of PHP required by WordPress is now 5.6.20 (see #46594 and [45058]), JSON extension related polyfills and backwards compatibility code can now be removed.

Since there are still some plugins and themes that utilize the `Services_JSON` class, these classes will remain for the time being, but including the `wp-includes/class-json.php` file and creating `Services_JSON` instances will now throw deprecated notices.

See #47699.
Props jrf, Clorith, pento.
Built from https://develop.svn.wordpress.org/trunk@46205


git-svn-id: http://core.svn.wordpress.org/trunk@46017 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-20 19:53:57 +00:00
Andrew Ozz
ea27759d2b Remove left-over debug code after [46203].
See #46349.
Built from https://develop.svn.wordpress.org/trunk@46204


git-svn-id: http://core.svn.wordpress.org/trunk@46016 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-20 19:27:57 +00:00
Andrew Ozz
0628245170 Admin email verification:
- Fix wording of the HTML title.
- Add hidden `(opens in a new tab)` to links that need it.
- Add the `screen-reader-text` CSS class to login.css.
- Add another translator comment.

Props afercia.
See #46349.

Built from https://develop.svn.wordpress.org/trunk@46203


git-svn-id: http://core.svn.wordpress.org/trunk@46015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-20 18:51:56 +00:00
Andrew Ozz
29ea4c6a4c Media/Upload: rotate images on upload according to EXIF Orientation.
Props msaggiorato, wpdavis, markoheijnen, dhuyvetter, msaggiorato, n7studios, triplejumper12, pbiron, mikeschroder, joemcgill, azaozz.

Fixes #14459.
Built from https://develop.svn.wordpress.org/trunk@46202


git-svn-id: http://core.svn.wordpress.org/trunk@46014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-20 18:21:57 +00:00
Sergey Biryukov
86f7ac6669 Docs: Correct @since tag for comments_popup public query variable removed in [35848].
Props hareesh-pillai.
Fixes #48080.
Built from https://develop.svn.wordpress.org/trunk@46201


git-svn-id: http://core.svn.wordpress.org/trunk@46013 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-20 17:44:59 +00:00
desrosj
b66a8c15bd Build/Test Tools: Specify PHP 5.6 as the required version of PHP in Composer.
Props ayeshrajans, jrf, netweb.
Fixes #48081.
Built from https://develop.svn.wordpress.org/trunk@46200


git-svn-id: http://core.svn.wordpress.org/trunk@46012 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-20 17:33:57 +00:00
desrosj
38254bdc6f Site Health: Use sentence casing consistently in header tags.
Props SergeyBiryukov, ajayghaghretiya1, ronakganatra, mukesh27, Clorith.
Fixes #47298.
Built from https://develop.svn.wordpress.org/trunk@46199


git-svn-id: http://core.svn.wordpress.org/trunk@46011 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-20 17:26:57 +00:00
Sergey Biryukov
d968a74e2a Docs: Add @since tag for the new $position argument added to add_submenu_page() and related functions in [46197].
See #39776.
Built from https://develop.svn.wordpress.org/trunk@46198


git-svn-id: http://core.svn.wordpress.org/trunk@46010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-20 17:06:57 +00:00
Adam Silverstein
6ca808129c Menus: add a position argument to add_submenu_page and the helper functions that use it.
Add a position argument to the `add_submenu_page` function similar to the one already in `add_menu_page`. When adding sub menus enables setting the position in the sub menu where the item should appear.

In addition, add the position argument to functions that call `add_submenu_page` under the hood: `add_management_page`, `add_options_page`, `add_theme_page`, `add_plugins_page`, `add_users_page`, `add_dashboard_page`, `add_posts_page`, `add_media_page`, `add_links_page`, `add_pages_page` and `add_comments_page`.

Props welcher, birgire, alexvorn2.
Fixes #39776.


Built from https://develop.svn.wordpress.org/trunk@46197


git-svn-id: http://core.svn.wordpress.org/trunk@46009 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-20 15:00:59 +00:00
Sergey Biryukov
6354f6dcdc Docs: Clarify that $show_in_rest parameter of register_post_type() and register_taxonomy() should be enabled for the post type or taxonomy to be available in the block editor.
Props ramon-fincken.
Fixes #48084.
Built from https://develop.svn.wordpress.org/trunk@46196


git-svn-id: http://core.svn.wordpress.org/trunk@46008 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-20 13:05:57 +00:00
Andrea Fercia
c4b1daa1f2 Accessibility: Bundled Theme: Make the TwentyEleven skip link the first focusable element within the body.
Props poena, williampatton.
Fixes #47891.

Built from https://develop.svn.wordpress.org/trunk@46195


git-svn-id: http://core.svn.wordpress.org/trunk@46007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-20 11:42:00 +00:00
whyisjake
a014bd21c1 Multisite: Remove the redundant blog_versions table.
As part of the Multisite installation process, a `blog_versions` table is created. This table is never read from (except immediately prior to updating it), it's only ever inserted into or updated. It is not used to determine which blogs need to be upgraded.
This table was introduced in 3.0 when the WPMU schema was merged #11644 and it appears the table has never been used in core and is therefore redundant and may as well be removed.

Props johnbillion, nacin, ryan, johnjamesjacoby, whyisjake.

Fixes #19755. See #41685.


Built from https://develop.svn.wordpress.org/trunk@46194


git-svn-id: http://core.svn.wordpress.org/trunk@46006 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-19 22:07:57 +00:00
whyisjake
250eb42802 Networks and Sites: Save database version in site meta (Multisite)
Currently there is there a table in multisite called blog_versions. All this table stores is the database version as number and the date updated. With plans to add site meta in #37923 this new table should be used. This has a number of benefits, including functions to CRUD these values in the database. Once this data is in the blogmeta, table, the blog_versions table can be removed all together. If require a SQL view can be used blog_versions from data stored in blogmeta.

Props spacedmonkey, leogermani.

Fixes #41685. See #19755.


Built from https://develop.svn.wordpress.org/trunk@46193


git-svn-id: http://core.svn.wordpress.org/trunk@46005 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-19 21:42:58 +00:00
desrosj
3bd9e18930 Login and Registration: Detect JavaScript on the login screen.
This allows the login screen to be targeted with CSS when JavaScript is disabled.

Props Nikschavan.
Fixes #38088.
Built from https://develop.svn.wordpress.org/trunk@46192


git-svn-id: http://core.svn.wordpress.org/trunk@46004 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-19 19:22:58 +00:00
K. Adam White
6c931ed61a REST API: Revert [45687].
This change may not be needed and further investigation is required before we accept it into a release.

See #46907.


Built from https://develop.svn.wordpress.org/trunk@46191


git-svn-id: http://core.svn.wordpress.org/trunk@46003 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-19 15:50:59 +00:00
gziolo
1fb85addf9 Block Editor: Fixes failing unit tests related to Social Link blocks
Follow-up for #47843 - update the WordPress Packages to the ones used in the Gutenberg 6.5 release.

Props desrosj.

Fixes #47843.



Built from https://develop.svn.wordpress.org/trunk@46190


git-svn-id: http://core.svn.wordpress.org/trunk@46002 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-19 15:47:58 +00:00
gziolo
03390f00c5 Block Editor: Update the WordPress Packages to the ones used in the Gutenberg 6.5 release
Updated Packages:

In version 6.2:

@wordpress/a11y@2.5.0
@wordpress/annotations@1.5.0
@wordpress/api-fetch@3.4.0
@wordpress/autop@2.4.0
@wordpress/babel-plugin-import-jsx-pragma@2.3.0
@wordpress/babel-plugin-makepot@3.2.0
@wordpress/babel-preset-default@4.4.0
@wordpress/blob@2.5.0
@wordpress/block-editor@3.0.0
@wordpress/block-library@2.7.0
@wordpress/block-serialization-default-parser@3.3.0
@wordpress/block-serialization-spec-parser@3.2.0
@wordpress/blocks@6.5.0
@wordpress/browserslist-config@2.6.0
@wordpress/components@8.1.0
@wordpress/compose@3.5.0
@wordpress/core-data@2.5.0
@wordpress/custom-templated-path-webpack-plugin@1.5.0
@wordpress/data-controls@1.1.0
@wordpress/data@4.7.0
@wordpress/date@3.4.0
@wordpress/dependency-extraction-webpack-plugin@1.1.0
@wordpress/deprecated@2.5.0
@wordpress/docgen@1.3.0
@wordpress/dom-ready@2.5.0
@wordpress/dom@2.4.0
@wordpress/e2e-test-utils@2.2.0
@wordpress/e2e-tests@1.4.0
@wordpress/edit-post@3.6.0
@wordpress/editor@9.5.0
@wordpress/element@2.6.0
@wordpress/escape-html@1.5.0
@wordpress/eslint-plugin@2.4.0
@wordpress/format-library@1.7.0
@wordpress/hooks@2.5.0
@wordpress/html-entities@2.5.0
@wordpress/i18n@3.6.0
@wordpress/is-shallow-equal@1.5.0
@wordpress/jest-console@3.2.0
@wordpress/jest-preset-default@4.3.0
@wordpress/jest-puppeteer-axe@1.2.0
@wordpress/keycodes@2.5.0
@wordpress/library-export-default-webpack-plugin@1.4.0
@wordpress/list-reusable-blocks@1.6.0
@wordpress/media-utils@1.0.0
@wordpress/notices@1.6.0
@wordpress/npm-package-json-lint-config@2.1.0
@wordpress/nux@3.5.0
@wordpress/plugins@2.5.0
@wordpress/postcss-themes@2.2.0
@wordpress/priority-queue@1.3.0
@wordpress/redux-routine@3.5.0
@wordpress/rich-text@3.5.0
@wordpress/scripts@3.4.0
@wordpress/server-side-render@1.1.0
@wordpress/shortcode@2.4.0
@wordpress/token-list@1.5.0
@wordpress/url@2.7.0
@wordpress/viewport@2.6.0
@wordpress/wordcount@2.5.0

In version 6.4:
@wordpress/annotations@1.6.0
@wordpress/api-fetch@3.5.0
@wordpress/autop@2.5.0
@wordpress/babel-preset-default@4.5.0
@wordpress/block-editor@3.1.0
@wordpress/block-library@2.8.0
@wordpress/block-serialization-default-parser@3.4.0
@wordpress/block-serialization-spec-parser@3.3.0
@wordpress/blocks@6.6.0
@wordpress/components@8.2.0
@wordpress/compose@3.6.0
@wordpress/core-data@2.6.0
@wordpress/data-controls@1.2.0
@wordpress/data@4.8.0
@wordpress/date@3.5.0
@wordpress/dependency-extraction-webpack-plugin@1.2.0
@wordpress/deprecated@2.6.0
@wordpress/docgen@1.4.0
@wordpress/dom@2.5.0
@wordpress/e2e-test-utils@2.3.0
@wordpress/e2e-tests@1.5.0
@wordpress/edit-post@3.7.0
@wordpress/editor@9.6.0
@wordpress/element@2.7.0
@wordpress/eslint-plugin@3.0.0
@wordpress/format-library@1.8.0
@wordpress/hooks@2.6.0
@wordpress/is-shallow-equal@1.6.0
@wordpress/jest-console@3.3.0
@wordpress/jest-preset-default@5.0.0
@wordpress/jest-puppeteer-axe@1.3.0
@wordpress/keycodes@2.6.0
@wordpress/list-reusable-blocks@1.7.0
@wordpress/media-utils@1.1.0
@wordpress/notices@1.7.0
@wordpress/nux@3.6.0
@wordpress/plugins@2.6.0
@wordpress/project-management-automation@1.0.0
@wordpress/redux-routine@3.6.0
@wordpress/rich-text@3.6.0
@wordpress/scripts@4.0.0
@wordpress/server-side-render@1.2.0
@wordpress/token-list@1.6.0
@wordpress/viewport@2.7.0
@wordpress/wordcount@2.6.0

In version 6.5:
@wordpress/annotations@1.7.0
@wordpress/api-fetch@3.6.0
@wordpress/babel-preset-default@4.6.0
@wordpress/block-directory@1.0.0
@wordpress/block-editor@3.2.0
@wordpress/block-library@2.9.0
@wordpress/blocks@6.7.0
@wordpress/components@8.3.0
@wordpress/compose@3.7.0
@wordpress/core-data@2.7.0
@wordpress/data-controls@1.3.0
@wordpress/data@4.9.0
@wordpress/dependency-extraction-webpack-plugin@2.0.0
@wordpress/e2e-test-utils@2.4.0
@wordpress/e2e-tests@1.7.0
@wordpress/edit-post@3.8.0
@wordpress/editor@9.7.0
@wordpress/element@2.8.0
@wordpress/eslint-plugin@3.1.0
@wordpress/format-library@1.9.0
@wordpress/list-reusable-blocks@1.8.0
@wordpress/media-utils@1.2.0
@wordpress/notices@1.8.0
@wordpress/nux@3.7.0
@wordpress/plugins@2.7.0
@wordpress/rich-text@3.7.0
@wordpress/scripts@5.0.0
@wordpress/server-side-render@1.3.0
@wordpress/url@2.8.0
@wordpress/viewport@2.8.0

Props youknowriad desrosj noisysocks pento jorgefilipecosta iseulde

Fixes: #47843


Built from https://develop.svn.wordpress.org/trunk@46189


git-svn-id: http://core.svn.wordpress.org/trunk@46001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-19 15:19:18 +00:00
Boone Gorges
b8e45e2531 Query: Expand the list of operators available to compare_key in WP_Meta_Query.
`compare_key`, introduced in #42409, previously supported only `=` and `LIKE`
operators. This changeset introduces a number of other operators: `!=`, `IN`,
`NOT IN`, `NOT LIKE`, `RLIKE`, `REGEXP`, `NOT REGEXP`, `EXISTS`, and `NOT EXISTS`
(the latter two aliased to `=` and `!=`, respectively). To support case-sensitive
regular expression key comparisons, the new `type_key` parameter will force
a MySQL `CAST` when 'BINARY' is passed.

Props soulseekah.
Fixes #43346.
Built from https://develop.svn.wordpress.org/trunk@46188


git-svn-id: http://core.svn.wordpress.org/trunk@46000 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-19 15:03:56 +00:00
desrosj
c38e52afe6 Build/Test Tools: Improvements to Composer scripts.
Prefixing a script command with `@php ` ensures that the script runs with the same version of PHP that Composer is installed with (and not the system default).

This change also updates the `phpcs` and `phpcbf` commands to use the version of PHPCS installed by Composer.

The `—standard` is no longer explicitly passed to the command. By default, PHPCS will look for `phpcs.xml.dist`, which is the name of the custom standards file currently in Core.

Props dingo_d, jrf.
Fixes #47853.
Built from https://develop.svn.wordpress.org/trunk@46187


git-svn-id: http://core.svn.wordpress.org/trunk@45999 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-19 15:01:55 +00:00
K. Adam White
9457896429 REST API: Issue warning if array meta is registered without item schema.
The purpose of meta registration is to assert that the meta key will contain a predictable value conforming to a schema, so the schema is therefore considered to be required.

Props TimothyBlynJacobs, grapplerulrich.
Fixes #43392.

Built from https://develop.svn.wordpress.org/trunk@46186


git-svn-id: http://core.svn.wordpress.org/trunk@45998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-19 14:36:55 +00:00
desrosj
3d06de26a3 PHP 7.4: Fix another instance of array access on a datatype that cannot be accessed as an array.
PHP 7.4 adds a warning when trying access a null/bool/int/float/resource (everything but array, string and object) as if it were an array.

Follow up of [45639].

Props desrosj, jrf.
See #47704.
Built from https://develop.svn.wordpress.org/trunk@46185


git-svn-id: http://core.svn.wordpress.org/trunk@45997 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-19 14:30:56 +00:00
K. Adam White
66f907b2eb REST API: Support dot.nested hierarchical properties in _fields query parameter.
Enable clients to opt-in to receipt of one or more specific sub-properties within a response, and not other sub-properties.
Skip potentially expensive filtering and processing for post resources which were explicitly not requested.

Props kadamwhite, TimothyBlynJacobs, dlh.
Fixes #42094.

Built from https://develop.svn.wordpress.org/trunk@46184


git-svn-id: http://core.svn.wordpress.org/trunk@45996 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-19 14:05:55 +00:00
Sergey Biryukov
7c9d4950b7 Bootstrap/Load: Reorganize the initialization flow so that the check for PHP and MySQL requirements could run as early as possible.
This allows us to use PHP 5.6+ syntax in more files, and display a proper error message on older PHP versions, instead of causing a parse error.

Fixes #48059.
Built from https://develop.svn.wordpress.org/trunk@46183


git-svn-id: http://core.svn.wordpress.org/trunk@45995 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-19 12:02:58 +00:00
Sergey Biryukov
06b4278933 Tests: Replace join() with implode() in do_enclose() tests introduced in [46175], and ensure the arguments passed are in the correct order.
The `implode()` function accepts two parameters, `$glue` and `$pieces`. For historical reasons, these parameters have been accepted in any order, though it was recommended that the documented order of `$glue, $pieces` be used. It is also generally considered best practice to use the canonical function rather than an alias.

Starting in PHP 7.4, specifying the parameters in the reverse order will trigger a deprecation notice with the plan to remove this tolerance in PHP 8.0.

Props jrf.
Fixes #36824. See #47746.
Built from https://develop.svn.wordpress.org/trunk@46182


git-svn-id: http://core.svn.wordpress.org/trunk@45994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-19 11:46:56 +00:00
Sergey Biryukov
aaf6dc45a9 Docs: Format multi-line comment in [46180] per the documentation standards.
See #45066.
Built from https://develop.svn.wordpress.org/trunk@46181


git-svn-id: http://core.svn.wordpress.org/trunk@45993 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-19 11:40:55 +00:00
Sergey Biryukov
c4320f58d8 Tests: Update unit tests to account for the removal of old wp-a11y from the loaded scripts in [46179].
Props sstoqnov.
See #45066, #48071.
Built from https://develop.svn.wordpress.org/trunk@46180


git-svn-id: http://core.svn.wordpress.org/trunk@45992 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-19 11:15:55 +00:00
Andrea Fercia
a4daffb0b4 Script Loader: Remove old wp-a11y from the loaded scripts after [46167] and [46169].
Props garrett-eclipse, sstoqnov.
See #45066.
Fixes #48071.

Built from https://develop.svn.wordpress.org/trunk@46179


git-svn-id: http://core.svn.wordpress.org/trunk@45991 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-19 09:54:55 +00:00
Boone Gorges
da8a602ad6 Improve performance of trackback query in do_all_pings().
Previously, the direct SQL query used to identify trackbacks in
`do_all_pings()` performed poorly, due to an unindexed query against the
`to_ping` column. We improve performance in two ways. First, we switch
to using a postmeta flag for posts that require trackbacks to be sent;
queries joining against the postmeta table that check only the `meta_key`
are generally quite fast. Second, we switch to the use of `WP_Query`,
making the query cacheable and filterable using standard methods.

Props dshanske, spacedmonkey, janw.oostendorp, mrmadhat, birgire.
Fixes #36824.
Built from https://develop.svn.wordpress.org/trunk@46178


git-svn-id: http://core.svn.wordpress.org/trunk@45990 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-19 02:06:56 +00:00
Boone Gorges
aa7d063af2 Use WP_Query when sending pingbacks.
Props dshanske, spacedmonkey, janw.oostendorp, mrmadhat, birgire.
See #36824.
Built from https://develop.svn.wordpress.org/trunk@46177


git-svn-id: http://core.svn.wordpress.org/trunk@45989 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-19 02:00:55 +00:00
Boone Gorges
2b92bcab85 PHPCS: Fix coding standards violations in do_enclose().
* Use strict checking when appropriate in `in_array()` checks.
* Improved comment formatting.
* Yoda and strict equality checks where appropriate.

See #36824.
Built from https://develop.svn.wordpress.org/trunk@46176


git-svn-id: http://core.svn.wordpress.org/trunk@45988 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-19 01:54:56 +00:00
Boone Gorges
7c56b972cc Improve do_enclose() logic on post publish.
Removing the direct SQL query in `do_all_pings()` improves filterability.

As part of this change, the signature of `do_enclose()` is changed so that
a null `$content` parameter can be passed, with the `$content` then inferred
from the `$post` passed in the second parameter. In addition, the second
parameter was modified so that a post ID or a `WP_Post` object can be
provided. These changes make it possible to trigger enclosure checks with
a post ID alone (as in `do_all_pings()`) and also brings the function
signature in line with `do_trackbacks()` and `pingback()`.

Props dshanske, spacedmonkey, janw.oostendorp, mrmadhat, birgire.
See #36824.
Built from https://develop.svn.wordpress.org/trunk@46175


git-svn-id: http://core.svn.wordpress.org/trunk@45987 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-19 01:49:56 +00:00
Andrew Ozz
463e050b25 Uploads: add helper functions for setting, getting, and deleting the temp upload reference used to the attachment_id when retrying to make image sub-sizes.
See #47872.
Built from https://develop.svn.wordpress.org/trunk@46174


git-svn-id: http://core.svn.wordpress.org/trunk@45986 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-19 01:26:55 +00:00
Andrew Ozz
308e616baf TinyMCE: update to version 4.9.6. Changelog: https://github.com/tinymce/tinymce/blob/4.x/changelog.txt. Includes fix for the Permission denied to access property "nodeType" error.
Fixes #47437.
Built from https://develop.svn.wordpress.org/trunk@46173


git-svn-id: http://core.svn.wordpress.org/trunk@45985 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-19 01:00:57 +00:00
whyisjake
471cf58049 Add SMS to the list of allowed protocols.
This commit expands the list of allowed protocols. It adds the `sms://` which can be used to open meessaging clients for mobile users.

Props rilwis, kraftbj

Fixes #39415

Built from https://develop.svn.wordpress.org/trunk@46172


git-svn-id: http://core.svn.wordpress.org/trunk@45984 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-18 23:38:55 +00:00
Sergey Biryukov
44b49c6fc3 Script Loader: Move the current_theme_supports() check above the wp_default_(scripts|styles) action, for consistency.
See #42804.
Built from https://develop.svn.wordpress.org/trunk@46171


git-svn-id: http://core.svn.wordpress.org/trunk@45983 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-18 22:42:55 +00:00
Sergey Biryukov
e9b6e9619e Script Loader: Only check current theme's HTML5 support for scripts and styles on front end.
Avoids a fatal error in the admin if `SCRIPT_DEBUG` is disabled.

Props azaozz.
See #42804.
Built from https://develop.svn.wordpress.org/trunk@46170


git-svn-id: http://core.svn.wordpress.org/trunk@45982 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-18 22:34:56 +00:00
whyisjake
16c9095e33 Accesibility: Replace wp-a11y.js with @wordpress/a11y package
Continuation of [46167]. This fixes the tests that ended up broken following the previous commit.

We've extracted wp-includes/wp-a11y.js to a reusable package wordpress/a11y which is published on NPM. Let's make sure this package is also 
used in WordPress core. Once all the JavaScript is built using webpack, we can also import this package wherever it is used and configure 
webpack to load is an external.

Props, garrett-eclipse

Fixes #45066


Built from https://develop.svn.wordpress.org/trunk@46169


git-svn-id: http://core.svn.wordpress.org/trunk@45981 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-18 22:30:55 +00:00
Andrea Fercia
c4267f663c Media: remove leftover test string change after [45499].
Props imath, audrasjb.
Fixes #48067.

Built from https://develop.svn.wordpress.org/trunk@46168


git-svn-id: http://core.svn.wordpress.org/trunk@45980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-18 19:33:54 +00:00
whyisjake
08a077658d Accessibility: Replace wp-a11y.js with @wordpress/a11y package
We've extracted wp-includes/wp-a11y.js to a reusable package wordpress/a11y which is published on NPM. Let's make sure this package is also used in WordPress core. Once all the JavaScript is built using webpack, we can also import this package wherever it is used and configure webpack to load is an external.

Props omarreiss, herregroen, desrosj, ocean90, afercia, sstoqnov


Built from https://develop.svn.wordpress.org/trunk@46167


git-svn-id: http://core.svn.wordpress.org/trunk@45979 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-18 17:41:55 +00:00
Aaron Jorbin
9ed7b79387 External Library: Update getid3 to 1.9.18
Follow up to r46112 as getid3 has tagged an official release.

Changes: 00f3fbfd77...v1.9.18

Props desrosj, jkitchen.
Fixes #47751 #40883 #43836.

Built from https://develop.svn.wordpress.org/trunk@46166


git-svn-id: http://core.svn.wordpress.org/trunk@45978 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-18 14:54:57 +00:00
Sergey Biryukov
42d52ce080 Bundled Themes: Declare HTML5 support for scripts and styles.
Fixes #42804.
Built from https://develop.svn.wordpress.org/trunk@46165


git-svn-id: http://core.svn.wordpress.org/trunk@45977 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-18 14:51:56 +00:00
Sergey Biryukov
252628652e Script Loader: Introduce HTML5 support for scripts and styles.
When a theme declares HTML5 support for script and styles via `add_theme_support( 'html5', array( 'script', 'style' ) )`, the `type="text/javascript"` and `type="text/css"` attributes are omitted.

These attributes are unnecessary in HTML5 and cause warnings in the W3C Markup Validation Service.

Props sasiddiqui, swissspidy, knutsp, SergeyBiryukov.
See #42804.
Built from https://develop.svn.wordpress.org/trunk@46164


git-svn-id: http://core.svn.wordpress.org/trunk@45976 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-18 14:50:56 +00:00
Andrea Fercia
095805b5e6 Accessibility: Add aria-current to the Archives, Categories, and Recent Posts widgets output.
The `aria-current` attribute is a simple, effective, way to help assistive technology users orientate themselves within a list of items.

Continues the introduction in core of the `aria-current` attribute after [41359] and following changes.

Props audrasjb, melchoyce.
Fixes #47094.

Built from https://develop.svn.wordpress.org/trunk@46163


git-svn-id: http://core.svn.wordpress.org/trunk@45975 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-18 12:25:56 +00:00
John Blackbourn
b4ac30c19c Docs: Improve docs for upload and wp_die() related functions.
See #47110 

Built from https://develop.svn.wordpress.org/trunk@46162


git-svn-id: http://core.svn.wordpress.org/trunk@45974 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-17 21:03:54 +00:00
desrosj
5a477b5715 Docs: Add missing descriptions for functions in wp-admin/update-core.php.
Also, fix the `@since` annotation added in [45480] to include the correct version.

Props SergeyBiryukov, ajayghaghretiya1.
Fixes #47424.
Built from https://develop.svn.wordpress.org/trunk@46161


git-svn-id: http://core.svn.wordpress.org/trunk@45973 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-17 20:43:56 +00:00
desrosj
a969ce8edf Posts, Post Types: Allow support arguments to be specified when registering post types.
The `add_post_type_support()` function accepts an optional third parameter that allows extra arguments to be supplied to configure post type support for a given feature. However, because of how `register_post_type()` and `WP_Post_Type->add_supports()` work, it is currently impossible to pass these additional arguments when initially registering a post type with `register_post_type()`.

This change makes it possible to supply additional arguments for a feature using the `supports` argument of `register_post_type()`.

Props MaximeCulea, seuser, desrosj, johnbillion.
Fixes #40413.
Built from https://develop.svn.wordpress.org/trunk@46160


git-svn-id: http://core.svn.wordpress.org/trunk@45972 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-17 19:58:56 +00:00
desrosj
d4928fb9cd Build/Test Tools: Improve test coverage for wp_validate_boolean().
This change also reworks the test class to use a data provider.

Props pbearne, desrosj
Fixes #39868
Built from https://develop.svn.wordpress.org/trunk@46159


git-svn-id: http://core.svn.wordpress.org/trunk@45971 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-17 18:49:55 +00:00
Adam Silverstein
3b1f90886c Build/Test Tools: fix source map loading in Firefox.
Fix an issue that prevented source maps from loading correctly in Firefox developer tools. Matches a fix introduced in Gutenberg build in PR:17024.

Props pierlo, andraganescu.
Fixes #47870.


Built from https://develop.svn.wordpress.org/trunk@46158


git-svn-id: http://core.svn.wordpress.org/trunk@45970 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-17 17:27:55 +00:00
Adam Silverstein
0cb3860138 External Libraries: Update Backbone.js to 1.4.0.
Upgrade Backbone to the latest stable version. Fix some issues in Media with `listenTo` which changed in this version, see https://backbonejs.org/#changelog.

Props desrosj, priyankkpatel, pierlo.
Fixes #47478.


Built from https://develop.svn.wordpress.org/trunk@46157


git-svn-id: http://core.svn.wordpress.org/trunk@45969 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-17 17:19:54 +00:00
Sergey Biryukov
222b400a7d Docs: Correct accepted values for search_columns parameter in WP_User_Query.
Props meloniq.
Fixes #48057.
Built from https://develop.svn.wordpress.org/trunk@46156


git-svn-id: http://core.svn.wordpress.org/trunk@45968 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-17 15:43:56 +00:00
desrosj
5329411f6d General: Ensure the arguments passed to implode() are in the correct order.
The `implode()` function accepts two. parameters, `$glue` and `$pieces`. For historical reasons, these parameters have been accepted in any order, though it was recommended that the documented order of `$glue, $pieces` be used.

Starting in PHP 7.4, specifying the parameters in the reverse order will trigger a deprecation notice with the plan to remove this tolerance in PHP 8.0.

This change fixes the occurrences of reversed arguments in Core with the exception of those contained in included external libraries. These will be handled separately.

Props jrf, jorbin.
See #47746.
Built from https://develop.svn.wordpress.org/trunk@46155


git-svn-id: http://core.svn.wordpress.org/trunk@45967 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-17 13:40:57 +00:00
Sergey Biryukov
b2a384461e Date/Time: Introduce get_post_datetime() to retrieve post published or modified time as a DateTimeImmutable object instance.
Introduce `get_post_timestamp()` to retrieve post published or modified time as a Unix timestamp.

Use `get_post_datetime()` in `get_post_time()` and `get_post_modified_time()` to return correct GMT time if default timezone is changed from UTC.

Props Rarst, johnregan3.
Fixes #25002.
Built from https://develop.svn.wordpress.org/trunk@46154


git-svn-id: http://core.svn.wordpress.org/trunk@45966 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-17 11:14:54 +00:00
johnjamesjacoby
757d077669 Network Admin: Allow Sites to have filterable States in List Table rows.
This change introduces a new `site_states()` method to the Sites List Table class (with a new `display_site_states` filter inside of it) following the pattern popularized in other List Table classes before it (Posts, Media, etc...)

Fixes #37684. Props mnelson4, pbiron, jeremyfelt, johnjamesjacoby.
Built from https://develop.svn.wordpress.org/trunk@46153


git-svn-id: http://core.svn.wordpress.org/trunk@45965 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-16 23:34:55 +00:00
Sergey Biryukov
a1a5df805c Docs: Improve documentation for get_bookmarks().
Props pbiron.
Fixes #48053.
Built from https://develop.svn.wordpress.org/trunk@46152


git-svn-id: http://core.svn.wordpress.org/trunk@45964 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-16 19:55:56 +00:00
Sergey Biryukov
a3e747990c Site Health: Add a link to "Debugging in WordPress" support article to fatal PHP error handler's default message.
Props garrett-eclipse, tobifjellner, dkarfa, hareesh-pillai.
Fixes #47681.
Built from https://develop.svn.wordpress.org/trunk@46151


git-svn-id: http://core.svn.wordpress.org/trunk@45963 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-16 17:23:55 +00:00
Sergey Biryukov
a86fde414b Docs: Improve @return value description for wp_xmlrpc_server::minimum_args().
See #47110.
Built from https://develop.svn.wordpress.org/trunk@46150


git-svn-id: http://core.svn.wordpress.org/trunk@45962 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-16 16:32:55 +00:00
Sergey Biryukov
a86711e28e Code Modernisation: Remove redundant PHP 4 code from do_action().
As of PHP 5, objects are always passed by reference, so this has not been needed for quite some time.

Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46149


git-svn-id: http://core.svn.wordpress.org/trunk@45961 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-16 14:48:54 +00:00
Sergey Biryukov
dc305e9e0a XML-RPC: Avoid a PHP warning in wp_xmlrpc_server::minimum_args() if $args is not an array.
Correct the documentation to clarify that array is the only acceptable type for `$args`.

Props bitcomplex, dkarfa.
Fixes #48046.
Built from https://develop.svn.wordpress.org/trunk@46148


git-svn-id: http://core.svn.wordpress.org/trunk@45960 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-16 09:58:56 +00:00
Sergey Biryukov
1060f7e167 Widgets: Introduce register_sidebar_defaults filter for default arguments in register_sidebar().
Props patilvikasj, powerbuoy.
Fixes #48033.
Built from https://develop.svn.wordpress.org/trunk@46147


git-svn-id: http://core.svn.wordpress.org/trunk@45959 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-16 09:13:54 +00:00
Sergey Biryukov
f3f1d530f4 Code Modernisation: Simplify some logic in apply_filters().
Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46146


git-svn-id: http://core.svn.wordpress.org/trunk@45958 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 12:04:55 +00:00
Sergey Biryukov
3b43f6dfbf Code Modernisation: Replace call_user_func_array() in tests/phpunit/tests/db.php with dynamic function calls.
Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46145


git-svn-id: http://core.svn.wordpress.org/trunk@45957 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 11:56:54 +00:00
Sergey Biryukov
e6bbff13c5 Code Modernisation: Replace call_user_func_array() in various __call() methods with dynamic function calls.
The callback in these functions is always checked against a limited list of valid callbacks that can be safely changed to dynamic function calls.

Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46144


git-svn-id: http://core.svn.wordpress.org/trunk@45956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 11:53:56 +00:00
Sergey Biryukov
2a35b3e7df Code Modernisation: Replace call_user_func_array() in wp-includes/class-wp-walker.php with dynamic function calls.
Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46143


git-svn-id: http://core.svn.wordpress.org/trunk@45955 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 11:50:55 +00:00
Sergey Biryukov
3daef6260b Code Modernisation: Replace call_user_func_array() in wp-cron.php with a direct function call.
Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46142


git-svn-id: http://core.svn.wordpress.org/trunk@45954 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 11:48:54 +00:00
Sergey Biryukov
c32fb1dbee Code Modernisation: Remove redundant call to func_get_arg() in wp-includes/class-wp-rewrite.php.
Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46141


git-svn-id: http://core.svn.wordpress.org/trunk@45953 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 11:47:54 +00:00
Sergey Biryukov
92ba2cc95d Code Modernisation: Remove redundant calls to func_get_arg() in wp-includes/class-wp-admin-bar.php.
Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46140


git-svn-id: http://core.svn.wordpress.org/trunk@45952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 11:46:54 +00:00
Sergey Biryukov
60f027a378 Code Modernisation: Replace call_user_func_array() in combination with an empty array in wp-includes/class-wp-hook.php with call_user_func().
Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46139


git-svn-id: http://core.svn.wordpress.org/trunk@45951 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 11:45:56 +00:00
Sergey Biryukov
8ee3790851 Code Modernisation: Replace call_user_func_array() in wp-admin/includes/widgets.php and associated unit tests with a direct function call.
Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46138


git-svn-id: http://core.svn.wordpress.org/trunk@45950 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 11:41:55 +00:00
Sergey Biryukov
f166554882 Code Modernisation: Replace call_user_func_array() in wp-admin/includes/template.php with a dynamic function call.
Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46137


git-svn-id: http://core.svn.wordpress.org/trunk@45949 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 11:35:56 +00:00
Sergey Biryukov
7c370fa9d0 Code Modernisation: Replace call_user_func_array() in wp-admin/includes/ajax-actions.php with a dynamic function call.
Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46136


git-svn-id: http://core.svn.wordpress.org/trunk@45948 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 11:34:57 +00:00
Sergey Biryukov
4bcec84309 Code Modernisation: Replace call_user_func_array() in wp-includes/post-template.php with a dynamic function call.
Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46135


git-svn-id: http://core.svn.wordpress.org/trunk@45947 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 11:32:54 +00:00
Sergey Biryukov
4b3df8e846 Code Modernisation: Replace call_user_func_array() in wp-includes/nav-menu-template.php with a dynamic function call.
Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46134


git-svn-id: http://core.svn.wordpress.org/trunk@45946 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 11:31:57 +00:00
Sergey Biryukov
6e39938fb5 Code Modernisation: Replace call_user_func_array() in wp-includes/class-wp-customize-*.php with direct function calls in combination with the spread operator.
Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46133


git-svn-id: http://core.svn.wordpress.org/trunk@45945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 11:27:55 +00:00
Sergey Biryukov
d55f1f81c7 Code Modernisation: Replace call_user_func_array() in wp-includes/capabilities.php with a direct function call.
Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46132


git-svn-id: http://core.svn.wordpress.org/trunk@45944 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 11:23:56 +00:00
Sergey Biryukov
30fe3f5d4f Code Modernisation: Introduce the spread operator in wp-admin/includes/media.php.
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.

Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46131


git-svn-id: http://core.svn.wordpress.org/trunk@45943 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 11:12:55 +00:00
Sergey Biryukov
7093392099 Code Modernisation: Introduce the spread operator in wp-admin/includes/dashboard.php.
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.

Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46130


git-svn-id: http://core.svn.wordpress.org/trunk@45942 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 11:11:56 +00:00
Sergey Biryukov
efe18c3604 Code Modernisation: Introduce the spread operator in wp-includes/deprecated.php.
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.

While these functions are deprecated, they can still get a minor performance boost in case they are being called.

Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46129


git-svn-id: http://core.svn.wordpress.org/trunk@45941 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 11:09:54 +00:00
Sergey Biryukov
6a039a5731 Code Modernisation: Introduce the spread operator in wp-includes/formatting.php.
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.

Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46128


git-svn-id: http://core.svn.wordpress.org/trunk@45940 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 11:06:55 +00:00
Sergey Biryukov
9e2c6eb624 Code Modernisation: Introduce the spread operator in tests/phpunit/*.
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.

Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46127


git-svn-id: http://core.svn.wordpress.org/trunk@45939 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 11:04:55 +00:00
Sergey Biryukov
7a6d74e28a Code Modernisation: Introduce the spread operator in wp-includes/functions.php.
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.

Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46126


git-svn-id: http://core.svn.wordpress.org/trunk@45938 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 10:45:56 +00:00
Sergey Biryukov
340b7b53c8 Code Modernisation: Introduce the spread operator in wp-admin/includes/class-*-upgrader-skin.php.
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.

Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46125


git-svn-id: http://core.svn.wordpress.org/trunk@45937 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 10:42:54 +00:00
Sergey Biryukov
300b14e1ca Code Modernisation: Introduce the spread operator in wp-includes/class-wp-dependency.php.
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.

Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46124


git-svn-id: http://core.svn.wordpress.org/trunk@45936 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 10:36:56 +00:00
Sergey Biryukov
654f8a8677 Code Modernisation: Introduce the spread operator in wp-includes/category-template.php.
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.

Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46123


git-svn-id: http://core.svn.wordpress.org/trunk@45935 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 10:33:55 +00:00
Sergey Biryukov
7322d3f35e Code Modernisation: Use the spread operator in wp_register_sidebar_widget().
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.

Missed in [45629].

Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46122


git-svn-id: http://core.svn.wordpress.org/trunk@45934 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 10:31:54 +00:00
Sergey Biryukov
d46f9b4fb8 Coding Standards: Fix WPCS issue in [46120].
See #47820.
Built from https://develop.svn.wordpress.org/trunk@46121


git-svn-id: http://core.svn.wordpress.org/trunk@45933 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 02:07:55 +00:00
Sergey Biryukov
7a3e224e8d Docs: Clarify in update_option() description that it's plugin author's responsibility to check the current user's capabilities before saving any option changes.
Props dinhtungdu, lllor.
Fixes #47820.
Built from https://develop.svn.wordpress.org/trunk@46120


git-svn-id: http://core.svn.wordpress.org/trunk@45932 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 01:29:54 +00:00
Sergey Biryukov
142efedee0 Site Health: Show a more specific fatal error message when in Recovery Mode with headers already sent.
Props garrett-eclipse, TimothyBlynJacobs, mukesh27, marybaum, afragen, Clorith, mdwolinski, SergeyBiryukov.
Fixes #47321.
Built from https://develop.svn.wordpress.org/trunk@46119


git-svn-id: http://core.svn.wordpress.org/trunk@45931 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-15 01:18:55 +00:00
Sergey Biryukov
8988c1ce38 Mail: Add a unit test to make sure wp_mail() does not duplicate the MIME-Version header added automatically by PHPMailer.
See #43542.
Built from https://develop.svn.wordpress.org/trunk@46118


git-svn-id: http://core.svn.wordpress.org/trunk@45930 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-14 21:35:57 +00:00
Sergey Biryukov
8e29221da4 Bundled Themes: Update the message shown when a comment is awaiting moderation.
If the commenter doesn't have cookies set, they won't see the comment preview again. Showing an expanded message will help offset any confusion if they revisit the site later, and their comment is still in moderation, but they can't see it anymore.

Props birgire, superpoincare.
Fixes #47461. See #43857.
Built from https://develop.svn.wordpress.org/trunk@46117


git-svn-id: http://core.svn.wordpress.org/trunk@45929 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-14 21:00:56 +00:00
Sergey Biryukov
c5fe7878ec Coding Standards: Fix WPCS issue in [46115].
See #43542.
Built from https://develop.svn.wordpress.org/trunk@46116


git-svn-id: http://core.svn.wordpress.org/trunk@45928 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-14 20:42:56 +00:00
Sergey Biryukov
18bf922527 Mail: Avoid setting duplicate MIME-Version and X-Mailer headers in wp_mail(), they are added automatically by PHPMailer.
Props lbenicio, junktrunk, danieltj, studyboi, bennemann.
Fixes #43542.
Built from https://develop.svn.wordpress.org/trunk@46115


git-svn-id: http://core.svn.wordpress.org/trunk@45927 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-14 20:14:54 +00:00
Aaron Jorbin
232d97425c Build/Test Tools: add php info to travis output
Fixes #48041.

Built from https://develop.svn.wordpress.org/trunk@46114


git-svn-id: http://core.svn.wordpress.org/trunk@45926 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-14 19:28:55 +00:00