Commit Graph

27571 Commits

Author SHA1 Message Date
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
Aaron Jorbin
ecd822a880 Comment out magic quote functions
Follow up to r46112.

See: #47751,#47783, #48040.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45925 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-14 19:23:55 +00:00
Aaron Jorbin
1ed691f574 Update getID3 library to fix issues with PHP7.4
Updates to trunk version that includes fixes for PHP7.4

Changelog:
https://github.com/JamesHeinrich/getID3/compare/v1.9.14...00f3fbfd77e583099ca70a3cf0bc092e113d2b20

See: #47751,#47783.
Fixes: #48040.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45924 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-14 19:07:57 +00:00
jorgefilipecosta
b7fbf7d373 Block Editor: Backport block styles server functions from block editor.
This commit backports the block styles functionality added to the block editor in https://github.com/WordPress/gutenberg/pull/16356.

Props: youknowriad, aduth, swissspidy.
Fixes #48039.
Built from https://develop.svn.wordpress.org/trunk@46111


git-svn-id: http://core.svn.wordpress.org/trunk@45923 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-14 18:21:54 +00:00
jorgefilipecosta
099eb0578e Block Editor: Add preloading of autosaves.
With the introduction of https://github.com/WordPress/gutenberg/pull/7945, the block editor requests autosave data when the editor is loaded. This can be optimized by preloading the request server-side and then passing the request data to the client using the preloading mechanism in editor-form-blocks.php.

Props: talldanwp, aduth.
Built from https://develop.svn.wordpress.org/trunk@46110


git-svn-id: http://core.svn.wordpress.org/trunk@45922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-14 16:47:54 +00:00
Sergey Biryukov
8316af9198 Bootstrap/Load: Allow charset to be passed to the wp_die() function.
Props mohsinrasool, spacedmonkey, socalchristina.
Fixes #46666.
Built from https://develop.svn.wordpress.org/trunk@46109


git-svn-id: http://core.svn.wordpress.org/trunk@45921 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-14 15:42:56 +00:00
Sergey Biryukov
0863695da8 Coding Standards: Fix WPCS issue in [46107].
See #46631.
Built from https://develop.svn.wordpress.org/trunk@46108


git-svn-id: http://core.svn.wordpress.org/trunk@45920 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-14 15:19:54 +00:00
Sergey Biryukov
f9b87e88ba HTTP API: Add a unit test for get_status_header_desc().
Props pbearne.
Fixes #46631.
Built from https://develop.svn.wordpress.org/trunk@46107


git-svn-id: http://core.svn.wordpress.org/trunk@45919 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-14 14:54:56 +00:00
Sergey Biryukov
42079f34a9 Site Health: Modify the grading indicator to remove percentage score in favor of a "Good" or "Should be improved" status.
This removes arbitrary confusion about what the numbers mean.

Props Clorith, hedgefield, Cybr, arena, DavidAnderson, earnjam, daveshine, Otto42, azaozz, asadkn, KARTHOST, tigertech, maximejobin, johnbillion, raboodesign, ramiy, afragen.
Fixes #47046.
Built from https://develop.svn.wordpress.org/trunk@46106


git-svn-id: http://core.svn.wordpress.org/trunk@45918 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-14 14:29:56 +00:00
Aaron Jorbin
dd3ad3ac51 GENERAL: Remove magic quote functions
The path to magic quote sanity took a fun and exciting turn: PHP core removed it and WordPress updated the minimum version.

For the formally external pclzip, the code is commented out to make investigating easier and in case we ever need to merge upstream (if that still exists) changes.

Props ayeshrajans, jrf, jorbin.
See #47783.
Fixes #18322.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45917 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-13 22:21:01 +00:00
desrosj
8a2bbf777a Correct the version number specified in [46102].
See #45361.
Built from https://develop.svn.wordpress.org/trunk@46104


git-svn-id: http://core.svn.wordpress.org/trunk@45916 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-13 18:55:56 +00:00
Adam Silverstein
a3eba2c201 Login and Registration: reset password - ensure submit button disabled when field empty.
Fix an issue where the submit button was enabled with an empty password when the user previously checked "Confirm use of weak password" for a weak password, then cleared the password field.

Props henry.wright.
Fixes #47924.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45915 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-13 18:30:55 +00:00
desrosj
7bbce99655 Menus: Nav menu locations should not be integers.
When nav menu location slugs are integers, some hard to debug results can occur. `register_nav_menus()` utilizes `array_merge()` which renumbers numeric indexes, starting from 0. Because of this, numeric menu locations will almost always be changed.

This change introduces a `_doing_it_wrong()` notice to inform developers that nav menu locations should always be strings.

Props audrasjb, desrosj, welcher.
Fixes #45361.
Built from https://develop.svn.wordpress.org/trunk@46102


git-svn-id: http://core.svn.wordpress.org/trunk@45914 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-13 17:58:55 +00:00
Sergey Biryukov
55378bd295 REST API: Use correct parameter name in rest_validate_value_from_schema() error messages.
Props manzoorwanijk.
Fixes #47905.
Built from https://develop.svn.wordpress.org/trunk@46101


git-svn-id: http://core.svn.wordpress.org/trunk@45913 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-13 03:06:55 +00:00
Adam Silverstein
67fd6e281f Multisite: improve sites_pre_query and networks_pre_query filters, avoiding db queries.
Improve the `pre_query` filters in multisite classes introduced in r44983. Return (non null) values immediately,
avoiding the database queries entirely, similar to other `pre_query` filters.

Props spacedmonkey, SergeyBiryukov, felipeelia.
Fixes #47599.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45912 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-12 22:17:55 +00:00
K. Adam White
c148f0aa55 REST API: Accept string path in rest_ensure_request.
Update `rest_ensure_request()` to accept a string path, permitting a string path to be passed to `rest_do_request()` as is indicated (previously inaccurately) in that method's PHPDoc.

Props TimothyBlynJacobs, kadamwhite.
Fixes #40614.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45911 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-12 21:47:57 +00:00
K. Adam White
742ab2d68b REST API: Return term resources in "edit" context after PUT or POST request.
Props westonruter, dlh.
Fixes #41411.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45910 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-12 21:29:57 +00:00
Sergey Biryukov
b987372d75 Mail: Update PHPMailer to 5.2.27.
The full list of changes is available here:
https://github.com/PHPMailer/PHPMailer/compare/v5.2.22...PHPMailer:v5.2.27

Props MattyRob, ayeshrajans, rogueresearch, bgermann, slaFFik, Presskopp, aaroncampbell.
Fixes #40472.
Built from https://develop.svn.wordpress.org/trunk@46097


git-svn-id: http://core.svn.wordpress.org/trunk@45909 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-12 14:37:57 +00:00
Sergey Biryukov
3591f1ad60 Text Changes: Correct "up-to-date" vs. "up to date" usage in a database update string and inline comments.
* "Up to date" is an adverb phrase that describes an action that brings something in line with the latest information.
* "Up-to-date" is an adjective phrase that is used as a synonym for "current".

Props socalchristina, hareesh-pillai, garrett-eclipse, desrosj, aprea.
Fixes #38998.
Built from https://develop.svn.wordpress.org/trunk@46096


git-svn-id: http://core.svn.wordpress.org/trunk@45908 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-12 13:06:57 +00:00
Sergey Biryukov
cc6e23e4dc External Libraries: Update jQuery Color plugin to 2.1.2.
Props desrosj, hareesh-pillai, lovememore.
Fixes #31511.
Built from https://develop.svn.wordpress.org/trunk@46095


git-svn-id: http://core.svn.wordpress.org/trunk@45907 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-12 12:41:54 +00:00
Sergey Biryukov
b552f449db HTTP: Update the Root Certificate bundle.
Keep 1024-bit legacy root certificates re-added in [35919], except for those already expired, for compatibility with older OpenSSL versions.

Props skithund, paragoninitiativeenterprises.
Fixes #45807.
Built from https://develop.svn.wordpress.org/trunk@46094


git-svn-id: http://core.svn.wordpress.org/trunk@45906 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-12 12:04:59 +00:00
Sergey Biryukov
877f356334 External Libraries: Revert [46092] pending test failure investigation.
See #45785.
Built from https://develop.svn.wordpress.org/trunk@46093


git-svn-id: http://core.svn.wordpress.org/trunk@45905 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-12 10:19:59 +00:00
desrosj
f7f27c37aa External Libraries: Update Underscore to 1.9.1.
Changes: https://github.com/jashkenas/underscore/compare/1.8.3...1.9.1

Props mukesh27, hareesh-pillai.
Fixes #45785
Built from https://develop.svn.wordpress.org/trunk@46092


git-svn-id: http://core.svn.wordpress.org/trunk@45904 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-11 19:22:54 +00:00
desrosj
abed60bb51 Editor: Add missing block data fields for blocks registered server side.
In [44122], the `styles` and `parent` block fields were omitted on accident. This change makes it possible to reuse them on the client.

Props gziolo.
Fixes #47017.
Built from https://develop.svn.wordpress.org/trunk@46091


git-svn-id: http://core.svn.wordpress.org/trunk@45903 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-11 14:52:56 +00:00
Sergey Biryukov
5289afac9b Accessibility: Comments: In comment_form(), remove aria-describedby attribute from the email field if there's no associated description in the comment_notes_before argument.
The attribute is meant to communicate to user agents and assistive technologies that the element has a description. If the referenced description is missing, it will be flagged as failure by any automated accessibility checker tool and, most importantly, is potentially confusing for assistive technologies users.

Props afercia, joedolson, dinhtungdu, donmhico, SergeyBiryukov.
Fixes #47975.
Built from https://develop.svn.wordpress.org/trunk@46090


git-svn-id: http://core.svn.wordpress.org/trunk@45902 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-11 01:51:54 +00:00
Sergey Biryukov
4d1761c881 Coding Standards: Fix WPCS issue in [46088].
See #47110.
Built from https://develop.svn.wordpress.org/trunk@46089


git-svn-id: http://core.svn.wordpress.org/trunk@45901 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-10 20:01:54 +00:00
Sergey Biryukov
dcb08f0637 Docs: Fix placement of some duplicate hook references.
Hook documentation should be on the line directly above the line containing the `do_action()` or `apply_filters()` call. The CS auto-fixing, which changed some inconsistent function calls to multi-line function calls, is part of the reason why this was no longer the case for a select group of duplicate hook references.

Includes minor code layout fixes.

See #47110.
Built from https://develop.svn.wordpress.org/trunk@46088


git-svn-id: http://core.svn.wordpress.org/trunk@45900 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-10 19:23:55 +00:00
Sergey Biryukov
c9071ca2e6 Docs: Clarify the int return value in comments_pre_query filter DocBlock.
See #45800.
Built from https://develop.svn.wordpress.org/trunk@46087


git-svn-id: http://core.svn.wordpress.org/trunk@45899 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-10 19:04:56 +00:00
Adam Silverstein
b3e64f0947 Comments: add a new comments_pre_query filter to short circuit WP_Comment_Query 'get_comments' queries.
Return a non-null value to bypass WordPress's default comment queries.

Props felipeelia, spacedmonkey.
Fixes #45800.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45898 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-10 18:42:56 +00:00
Sergey Biryukov
49b4cfc034 Accessibility: Media: Replace @ with at in the displayed date format.
The `@` symbol makes sense in the context of email addresses, but does not have a universal meaning in the context of dates.

Props audrasjb, afercia.
Fixes #47893.
Built from https://develop.svn.wordpress.org/trunk@46085


git-svn-id: http://core.svn.wordpress.org/trunk@45897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-09 00:07:57 +00:00
Sergey Biryukov
86a10090a0 Accessibility: Comments: Replace @ with at in the displayed date format.
The `@` symbol makes sense in the context of email addresses, but does not have a universal meaning in the context of dates.

Props birgire, afercia, audrasjb, SergeyBiryukov.
Fixes #47893.
Built from https://develop.svn.wordpress.org/trunk@46084


git-svn-id: http://core.svn.wordpress.org/trunk@45896 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-08 23:53:55 +00:00
Sergey Biryukov
f8ba775d7c Accessibility: Posts, Post Types: Replace @ with at in the displayed date format.
The `@` symbol makes sense in the context of email addresses, but does not have a universal meaning in the context of dates.

Props birgire, afercia, audrasjb, SergeyBiryukov.
Fixes #47832.
Built from https://develop.svn.wordpress.org/trunk@46083


git-svn-id: http://core.svn.wordpress.org/trunk@45895 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-08 23:24:56 +00:00
Sergey Biryukov
0393a78206 Docs: Fix typo in WP_Hook::resort_active_iterations() description.
Props itowhid06.
Fixes #47999.
Built from https://develop.svn.wordpress.org/trunk@46082


git-svn-id: http://core.svn.wordpress.org/trunk@45894 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-08 13:16:55 +00:00
Andrew Ozz
c0b5127683 Upload: Reset the temp upload reference in Plupload when the file is not an image.
See #47872.
Built from https://develop.svn.wordpress.org/trunk@46081


git-svn-id: http://core.svn.wordpress.org/trunk@45893 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-08 02:28:55 +00:00
Sergey Biryukov
e26f739e53 Posts, Post Types: Revert [46079] pending test failure investigation.
See #47824.
Built from https://develop.svn.wordpress.org/trunk@46080


git-svn-id: http://core.svn.wordpress.org/trunk@45892 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-07 19:33:55 +00:00
Sergey Biryukov
7828fe7e6a Posts, Post Types: Avoid a PHP warning when the_content() is called outside of the loop.
Fixes #47824.
Built from https://develop.svn.wordpress.org/trunk@46079


git-svn-id: http://core.svn.wordpress.org/trunk@45891 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-07 14:33:56 +00:00
Andrew Ozz
2d6a772400 Fix "white spaces at end of line" in docblock (IDE) woes after [46077].
See #32437.
Built from https://develop.svn.wordpress.org/trunk@46078


git-svn-id: http://core.svn.wordpress.org/trunk@45890 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-07 02:12:55 +00:00
Andrew Ozz
1de168e016 Media: Improve handling of cases where an uploaded image matches exactly a defined intermediate size. In most of these cases the original image has been edited by the user and is "web ready", there is no need for an identical intermediate image.
Introduces the `wp_image_resize_identical_dimensions` filter so plugins and themes can determine whether a new image with identical dimensions should be created, defaults to false.

Props wpdennis, HKandulla, galbaras, azaozz.
See #32437.
Built from https://develop.svn.wordpress.org/trunk@46077


git-svn-id: http://core.svn.wordpress.org/trunk@45889 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-07 01:34:55 +00:00
Andrew Ozz
dc8349ba0a Media: Add handling for "BIG" images. When the users upload a big image, typically a photo, scale it down to make it suitable for web use. Then use the scaled image as the "full" size, and keep the originally uploaded image for creating high quality sub-sizes in the future and in case the users want to download it later.
Introduces `wp_get_original_image_path()` that retrieves the path to the originally uploaded image in all cases, and `big_image_size_threshold` filter to set the pixel value above which images will be scaled. The same value is used as max-width and max-height when scaling.

See #47873.
Built from https://develop.svn.wordpress.org/trunk@46076


git-svn-id: http://core.svn.wordpress.org/trunk@45888 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-07 01:07:55 +00:00
Andrew Ozz
630bad3a4f Uploads: Improve the error message shown when all attempts to create image sub-sizes fail.
Props afercia.
See #47872.
Built from https://develop.svn.wordpress.org/trunk@46075


git-svn-id: http://core.svn.wordpress.org/trunk@45887 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-06 23:48:55 +00:00
whyisjake
f4562e5516 Remove the extra call for wp-sanitize from the script loader.
Fixes #47986

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


git-svn-id: http://core.svn.wordpress.org/trunk@45885 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-06 21:49:59 +00:00
Sergey Biryukov
699c6001fd Upgrade/Install: Escape the % in width="100%" in a printf() call in Plugin_Upgrader_Skin::after().
Props afragen.
Fixes #47989.
Built from https://develop.svn.wordpress.org/trunk@46072


git-svn-id: http://core.svn.wordpress.org/trunk@45884 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-06 06:26:56 +00:00
Sergey Biryukov
c1e3b68b19 Docs: Improve documentation for do_meta_boxes action.
Props felipeelia, killua99, SergeyBiryukov.
Fixes #46542.
Built from https://develop.svn.wordpress.org/trunk@46071


git-svn-id: http://core.svn.wordpress.org/trunk@45883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-06 00:06:56 +00:00
Sergey Biryukov
6cab9557fb REST API: Mark WP_REST_Users_Controller::update_current_item() and ::delete_current_item() as public.
Props dkarfa.
Fixes #47967.
Built from https://develop.svn.wordpress.org/trunk@46070


git-svn-id: http://core.svn.wordpress.org/trunk@45882 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-05 23:18:55 +00:00
Sergey Biryukov
65747e3c91 Docs: Remove extra spaces in various REST API DocBlocks.
See #47110.
Built from https://develop.svn.wordpress.org/trunk@46069


git-svn-id: http://core.svn.wordpress.org/trunk@45881 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-05 23:05:55 +00:00
Sergey Biryukov
7fb9cba55a Docs: Correct DocBlocks for WP_REST_Posts_Controller::get_available_actions() and WP_REST_Revisions_Controller::get_parent().
Props dkarfa.
Fixes #47966.
Built from https://develop.svn.wordpress.org/trunk@46068


git-svn-id: http://core.svn.wordpress.org/trunk@45880 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-05 22:59:54 +00:00
Andrew Ozz
ee005d8fc5 Fix (unrelated) test after [46066].
See #43524.
Built from https://develop.svn.wordpress.org/trunk@46067


git-svn-id: http://core.svn.wordpress.org/trunk@45879 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-05 22:53:56 +00:00
Andrew Ozz
3b976836a8 Media: Add two new intermediate image sizes, 1536px and 2048px. They are meant to enhance the way WordPress displays images on the front-end on larger, high-density devices. They make it possible to generate more suitable srcset and sizes attributes, and not use the original, often non-optimized image.
Also change the default `max_srcset_image_width` value to match the new max size.

Props pierlo, azaozz.
See #43524.
Built from https://develop.svn.wordpress.org/trunk@46066


git-svn-id: http://core.svn.wordpress.org/trunk@45878 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-05 22:27:58 +00:00
Andrea Fercia
8fe3c3fa23 Widgets: Fix "jumpiness" when reordering widgets by dragging them.
Props ketanumretiya030, mukesh27, andraganescu, audrasjb.
Fixes #46941.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-04 21:49:59 +00:00
Andrea Fercia
17652fb3d4 Widgets: Fix "jumpiness" when reordering widgets by dragging them.
Props ketanumretiya030, mukesh27, andraganescu, audrasjb.
Fixes #46941.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45838 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-04 21:49:48 +00:00
Sergey Biryukov
b9d4003d26 Coding Standards: Fix WPCS issue in [45990].
Built from https://develop.svn.wordpress.org/trunk@46019


git-svn-id: http://core.svn.wordpress.org/trunk@45830 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-04 21:45:07 +00:00
desrosj
30ac675795 Fix for URL sanitization that can lead to cross-site scripting (XSS) attacks.
Props irsdl, sstoqnov, whyisjake.
Built from https://develop.svn.wordpress.org/trunk@45997


git-svn-id: http://core.svn.wordpress.org/trunk@45808 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-04 17:52:56 +00:00
Sergey Biryukov
62b22b86a7 Improve handling the existing rel attribute in wp_rel_nofollow_callback().
Props xknown, sstoqnov.
Built from https://develop.svn.wordpress.org/trunk@45990


git-svn-id: http://core.svn.wordpress.org/trunk@45801 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-04 17:37:55 +00:00
whyisjake
90d9bdc54c Update wp.a11y.speak() to sanitize HTML before display.
Props iandunn, adamsilverstein, sstoqnov, peterwilsoncc

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


git-svn-id: http://core.svn.wordpress.org/trunk@45790 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-04 17:13:21 +00:00
Sergey Biryukov
c86ee39ff4 Improve URL validation in wp_validate_redirect().
Props vortfu, whyisjake, peterwilsoncc.
Built from https://develop.svn.wordpress.org/trunk@45971


git-svn-id: http://core.svn.wordpress.org/trunk@45782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-04 16:57:56 +00:00
Andrea Fercia
187d747198 Bundled Theme: Twenty Nineteen: Use human-friendly color names.
For better accessibility, the Primary and Secondary theme colors have now more understandable names.
Changes the names "Primary" and "Secondary" to "Blue" and "Dark Blue". Fallbacks to the `hex` color codes when the theme is set to use a custom Primary color.

Props kjellr, aduth, audrasjb.
Fixes #46698.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45775 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-04 16:47:10 +00:00
Andrea Fercia
8cb7918905 Bundled Theme: Twenty Nineteen: Fix the nesting of the main element.
The `main` element must not appear as a descendant of the `section` element. Correct markup is the first requirement to make user agents and assistive technologies work properly.

Changes the `<section>` element that was wrapping the `<main>` element to a `<div>`.

Props albertomake, ryelle, desrosj, ianbelanger, audrasjb.
Fixes #47066.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45753 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-04 16:27:54 +00:00
Sergey Biryukov
761cd81a01 Escape the output in wp_ajax_upload_attachment().
Props whyisjake, sstoqnov.
Built from https://develop.svn.wordpress.org/trunk@45936


git-svn-id: http://core.svn.wordpress.org/trunk@45747 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-04 16:09:56 +00:00
whyisjake
50d33282c1 Remove _convert_urlencoded_to_entities() from the get_the_content() callback.
Props vortfu, whyisjake, peterwilsoncc

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


git-svn-id: http://core.svn.wordpress.org/trunk@45746 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-04 16:04:56 +00:00
Andrew Ozz
e313498193 Uploads: After an image is uploaded and PHP times out or runs out of memory during post-processing (the server response is HTTP 500 error), try to resize it three more times. Then, if all attempts fail, do a cleanup of any sub-sizes that may have been created and show an error message asking the user to scale the image and upload it again.
See #47872.
Built from https://develop.svn.wordpress.org/trunk@45934


git-svn-id: http://core.svn.wordpress.org/trunk@45745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-04 01:11:54 +00:00
Sergey Biryukov
97cbf72bf9 I18N: Fix typo in a function name in [45932].
See #44360.
Built from https://develop.svn.wordpress.org/trunk@45933


git-svn-id: http://core.svn.wordpress.org/trunk@45744 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-03 00:57:54 +00:00
Sergey Biryukov
e199663322 I18N: Capitalize translator comments consistently, add trailing punctuation.
Includes minor code layout fixes.

See #44360.
Built from https://develop.svn.wordpress.org/trunk@45932


git-svn-id: http://core.svn.wordpress.org/trunk@45743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-03 00:41:05 +00:00
Andrea Fercia
216838a0d2 Accessibility: Improve focus styles for legacy modal dialogs powered by jQuery UI.
Fixes #47944.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45742 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-02 21:49:55 +00:00
Andrea Fercia
fbc9dba70b Accessibility: Audit usage of abbreviations.
Title attributes on abbreviations are only available to a minority of users. The
best option is to avoid unnecessary abbreviations when possible. In the other cases,
use an `<abbr>` element (which provides a hint to user agents on how to announce
and display the abbreviation) and provide an expansion in plain text on first use.

- `readme.html`: improves abbreviations and removes unnecessary `title` attributes
- options-general: removes unnecessary abbreviations and improves the remaining ones
- customizer schedule changeset date: removes unnecessary abbreviations and improves the remaining ones
- posts table date: uses a `span` element instead of an `abbr` element because this is not an abbreviation

Fixes #46980.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45741 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-02 21:44:58 +00:00
Felix Arntz
4089fad5fb Formatting: Improve accuracy of force_balance_tags() and add support for custom element tags.
This changeset includes a major iteration on the regular expression used to balance tags, with comprehensive test coverage to ensure that all scenarios are supported or unsupported as expected.

Props dmsnell, westonruter, birgire.
Fixes #47014.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45740 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-02 10:25:56 +00:00
Peter Wilson
b55ca66759 #43590: Use robots meta tag to better discourage search engines.
This changes the "discourage search engines" option to output a `noindex, nofollow` robots meta tag. `Disallow: /` is removed from the `robots.txt` to allow search engines to discover they are requested not to index the site.

Disallowing search engines from accessing a site in the `robots.txt` file can result in search engines listing a site with a fragment (a listing without content).

Props donmhico, jonoaldersonwp.
Fixes #43590.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45739 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-02 02:27:55 +00:00
Sergey Biryukov
8662d9a74d I18N: Split translatable strings located on the same line preceded with a translator comment, where the first string needs that comment, but the second does not.
Props johnbillion.
See #44360.
Built from https://develop.svn.wordpress.org/trunk@45927


git-svn-id: http://core.svn.wordpress.org/trunk@45738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-02 00:43:55 +00:00
Sergey Biryukov
16b8d91baa I18N: Improve translator comments.
* Add missing translator comments.
* Fix placement of some translator comments. Translator comments should be on the line directly above the line containing the translation function call for optimal compatibility with various `.pot` file generation tools. The CS auto-fixing, which changed some inconsistent function calls to multi-line function calls, is part of the reason why this was no longer the case for a select group of translator comments.

Includes minor code layout fixes.

Polyglots, rejoice! All WordPress core files now have translator comments for all strings with placeholders!

Props jrf, subrataemfluence, GaryJ, webdados, Dency, swissspidy, alvarogois, marcomartins, mihaiiceyro, vladwtz, niq1982, flipkeijzer, michielatyoast, chandrapatel, thrijith, joshuanoyce, FesoVik, tessak22, bhaktirajdev, cleancoded, dhavalkasvala, garrett-eclipse, bibliofille, socalchristina, priyankkpatel, 5hel2l2y, adamsilverstein, JeffPaul, pierlo, SergeyBiryukov.
Fixes #44360.
Built from https://develop.svn.wordpress.org/trunk@45926


git-svn-id: http://core.svn.wordpress.org/trunk@45737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-01 17:13:59 +00:00
Andrea Fercia
3ab18dba93 Accessibility: Add a default title for the media modal dialog.
Makes sure the media modal dialog `h1` heading isn't empty when custom media frames don't set a title. This is particularly important now that the media modal is an ARIA dialog, as the title is referenced by an `aria-labelledby` attribute to properly label the dialog.

Props donmhico, audrasjb.
Fixes #47612.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45736 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-01 15:18:56 +00:00
Sergey Biryukov
7fd6077864 Docs: Improve documentation for auth_redirect().
Props atachibana.
Fixes #47956.
Built from https://develop.svn.wordpress.org/trunk@45924


git-svn-id: http://core.svn.wordpress.org/trunk@45735 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-01 13:03:55 +00:00
Sergey Biryukov
f447c32aca Twenty Nineteen: Remove unused jQuery argument passed to an IIFE that accepts no arguments.
Props Christian1012, hareesh-pillai.
Fixes #40333.
Built from https://develop.svn.wordpress.org/trunk@45923


git-svn-id: http://core.svn.wordpress.org/trunk@45734 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-31 20:53:54 +00:00
Sergey Biryukov
4d7cc73e17 Twenty Seventeen: Remove unused jQuery argument passed to an IIFE that accepts no arguments.
Props Christian1012, hareesh-pillai.
See #40333.
Built from https://develop.svn.wordpress.org/trunk@45922


git-svn-id: http://core.svn.wordpress.org/trunk@45733 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-31 20:52:56 +00:00
Sergey Biryukov
ceefe26e9e Twenty Nineteen: Correct file name in JS DocBlocks.
See #47110.
Built from https://develop.svn.wordpress.org/trunk@45921


git-svn-id: http://core.svn.wordpress.org/trunk@45732 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-31 20:43:55 +00:00
Sergey Biryukov
c9d8c89ebd Twenty Nineteen: Improve compatibility with custom colors in the separator block.
Props kjellr.
Fixes #47811.
Built from https://develop.svn.wordpress.org/trunk@45920


git-svn-id: http://core.svn.wordpress.org/trunk@45731 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-30 19:15:56 +00:00
Sergey Biryukov
e30696bd20 Twenty Nineteen: Remove Baskerville Old Face from the font stack due to several shortcomings:
* Being difficult to read due to its mix of thin and thick strokes.
* Having poor language/extended character support.
* Not having other weights/styles (bold, italic, etc) and relying on browser approximations of those variants.

The next fonts down the stack (Garamond and Times) are more properly aligned to the appearance of the top-level serif font in the stack (Hoefler Text), and work better in its place.

Props kjellr, Rarst, justintadlock.
Fixes #45881.
Built from https://develop.svn.wordpress.org/trunk@45919


git-svn-id: http://core.svn.wordpress.org/trunk@45730 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-30 18:58:57 +00:00
Sergey Biryukov
ffcb1d0d99 Comments: In AJAX response when deleting a comment, account for &nbsp; as a thousands separator in total_items_i18n and total_pages_i18n numbers.
Props denisco, SergeyBiryukov.
Fixes #47953.
Built from https://develop.svn.wordpress.org/trunk@45918


git-svn-id: http://core.svn.wordpress.org/trunk@45729 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-30 18:34:06 +00:00
Sergey Biryukov
d26191eb03 Docs: Simplify get_plugin_data() and get_file_data() description.
See #47110.
Built from https://develop.svn.wordpress.org/trunk@45917


git-svn-id: http://core.svn.wordpress.org/trunk@45728 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-30 16:57:56 +00:00
Sergey Biryukov
3f048f5ace Docs: Update plugin headers example in get_plugin_data() to clarify that Version is not a required field.
Props casiepa.
See #47110, #meta4707.
Built from https://develop.svn.wordpress.org/trunk@45916


git-svn-id: http://core.svn.wordpress.org/trunk@45727 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-30 16:16:57 +00:00
John Blackbourn
640c90d35d Docs: Correct and improve inline docs relating to caching, terms, meta, and some misc tweaks.
See #47110   

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


git-svn-id: http://core.svn.wordpress.org/trunk@45726 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-30 11:36:08 +00:00
Sergey Biryukov
16c43f368d Date/Time: Restore the previous behavior of date_i18n() where invalid input would result in current time.
Make `wp_date()` return `false` on invalid timestamp input, for consistency with upstream PHP `date()` function.

Props Rarst.
Fixes #28636.
Built from https://develop.svn.wordpress.org/trunk@45914


git-svn-id: http://core.svn.wordpress.org/trunk@45725 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-29 23:18:55 +00:00
Sergey Biryukov
3965d4735c I18N: Add missing translator comment in help text on Reading Settings screen.
Props garrett-eclipse.
See #46708.
Built from https://develop.svn.wordpress.org/trunk@45913


git-svn-id: http://core.svn.wordpress.org/trunk@45724 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-29 21:36:55 +00:00
Sergey Biryukov
7caac01470 Administration: Add a note to "For each post in a feed, include [Full text / Summary]" option that how content is displayed in browsers depends on the theme.
Add a documentation link to learn more about feeds.

Props JarretC, SergeyBiryukov, pento, talldanwp, dinhtungdu, noisysocks, tobifjellner.
Fixes #46708.
Built from https://develop.svn.wordpress.org/trunk@45912


git-svn-id: http://core.svn.wordpress.org/trunk@45723 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-29 21:25:55 +00:00
Sergey Biryukov
4629fa26d2 Date/Time: Update XML-RPC tests for invalid date input to account for a more consistent mysql2date() error handling in [45908].
The tests were meant to check for the lack of a fatal error in case of invalid date input, not specifically mark a particular outcome as the correct one.

Props Rarst.
Fixes #28992.
Built from https://develop.svn.wordpress.org/trunk@45911


git-svn-id: http://core.svn.wordpress.org/trunk@45722 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-29 16:44:55 +00:00
Felix Arntz
90c424f73b Multisite: Improve performance by caching not found lookups for sites and networks.
With this change, the result of a site or network lookup by ID will be cached even if the ID does not exist. When a new site or network is created, the cache for the respective new ID is cleared.

Props mnelson4, nielsdeblaauw.
Fixes #42251.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45721 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-29 12:42:56 +00:00
Mike Schroder
ccdc221b32 Administration: Output valid HTML when wp_die() is called.
To better support HTML and string calls to `wp_die()` without
outputting invalid HTML, wraps error messages in `<div>` rather than `<p>`.

Adds `.wp-die-message` CSS class for styling.

Props dinhtungdu, jeremyfelt, audrasjb, SergeyBiryukov, afercia, audrasjb, noisysocks.
Fixes #47580.
Built from https://develop.svn.wordpress.org/trunk@45909


git-svn-id: http://core.svn.wordpress.org/trunk@45720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-29 07:54:01 +00:00
Sergey Biryukov
6057b32e9b Date/Time: Revamp mysql2date() to use wp_date() and handle invalid input in a consistent manner.
Add unit tests, improve documentation.

Props Rarst, pbearne.
Fixes #28992.
Built from https://develop.svn.wordpress.org/trunk@45908


git-svn-id: http://core.svn.wordpress.org/trunk@45719 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-29 05:07:56 +00:00
Sergey Biryukov
29a6063f45 Coding Standards: Fix WPCS issue in [45906].
See #45322.
Built from https://develop.svn.wordpress.org/trunk@45907


git-svn-id: http://core.svn.wordpress.org/trunk@45718 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-29 02:40:54 +00:00
Sergey Biryukov
e0adbf69ff XML-RPC: Make sure editing a draft post with wp.editPost does not unintentionally cause its published date to be set.
Props redsweater.
Fixes #45322.
Built from https://develop.svn.wordpress.org/trunk@45906


git-svn-id: http://core.svn.wordpress.org/trunk@45717 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-29 02:10:56 +00:00
Sergey Biryukov
27a384caa4 Site Health: Merge two similar strings explaining what drop-in plugins are.
Props garrett-eclipse, ramiy, Clorith.
Fixes #47247.
Built from https://develop.svn.wordpress.org/trunk@45905


git-svn-id: http://core.svn.wordpress.org/trunk@45716 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-28 03:13:55 +00:00
Sergey Biryukov
6cad27efcd Site Health: Standardize on SELECT VERSION() query for checking the database server version, due to the MariaDB version declaration potentially causing issues in production environments.
Partially reverts [45691].

Props Clorith.
Fixes #47738.
Built from https://develop.svn.wordpress.org/trunk@45904


git-svn-id: http://core.svn.wordpress.org/trunk@45715 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-28 03:09:52 +00:00
K. Adam White
181d77f04e REST API: Only cast scalar types to string when comparing new & old meta values.
Newly-supported array and object meta types should not be cast to strings.

Props TimothyBlynJacobs, caercam.
Fixes #47928.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-28 03:08:55 +00:00
Sergey Biryukov
e3d4e81ca0 Date/Time: Correct delta comparison in test_should_return_wp_timestamp().
See #25768.
Built from https://develop.svn.wordpress.org/trunk@45902


git-svn-id: http://core.svn.wordpress.org/trunk@45713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-28 02:20:54 +00:00
Sergey Biryukov
12aa694ee5 Date/Time: Introduce wp_date() to retrieve the date in localized format.
Convert `date_i18n()` into a wrapper for `wp_date()`.

`wp_date()` is intended as a replacement for `date_i18n()` without legacy quirks in it. It accepts a true Unix timestamp (not summed with timezone offset) and an arbitrary timezone.

Props Rarst, mboynes, MikeHansenMe, rmccue, nacin.
Fixes #28636.
Built from https://develop.svn.wordpress.org/trunk@45901


git-svn-id: http://core.svn.wordpress.org/trunk@45712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-28 00:52:56 +00:00
Sergey Biryukov
61d5337aca Date/Time: Remove the last remaining current_time( 'timestamp' ) instance in wp_post_revision_title_expanded().
Timestamps don't carry any timezone information, using `$revision->post_modified_gmt` simplifies the logic.

Props Rarst.
See #40657.
Built from https://develop.svn.wordpress.org/trunk@45900


git-svn-id: http://core.svn.wordpress.org/trunk@45711 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-27 21:55:56 +00:00
Sergey Biryukov
6a7baa24a6 Docs: Clarify that $name and $value parameters of set_user_setting() can contain hyphens.
Props tmatsuur.
Fixes #47938.
Built from https://develop.svn.wordpress.org/trunk@45899


git-svn-id: http://core.svn.wordpress.org/trunk@45710 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-27 01:17:55 +00:00
Sergey Biryukov
8750097e4b Docs: Remove a clarification from do_robots() description that doesn't really clarify anything.
See #47110.
Built from https://develop.svn.wordpress.org/trunk@45898


git-svn-id: http://core.svn.wordpress.org/trunk@45709 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-27 00:17:56 +00:00
Sergey Biryukov
cc21760163 Twenty Nineteen: Make sure center-aligned images in columns do not break beyond the column boundaries.
Props kjellr.
Fixes #47937.
Built from https://develop.svn.wordpress.org/trunk@45897


git-svn-id: http://core.svn.wordpress.org/trunk@45708 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-26 19:01:55 +00:00
Sergey Biryukov
9dc2a432b1 Twenty Nineteen: Update style-rtl.css after [45773].
See #47850.
Built from https://develop.svn.wordpress.org/trunk@45896


git-svn-id: http://core.svn.wordpress.org/trunk@45707 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-26 19:00:58 +00:00
Sergey Biryukov
baffd21844 Docs: Reference WP_Term_Query::__construct() in wp_list_categories() DocBlock for additional accepted arguments.
Clarify that `wp_dropdown_categories()` always returns a string, regardless of the `echo` parameter.

See #47896, #47110.
Built from https://develop.svn.wordpress.org/trunk@45895


git-svn-id: http://core.svn.wordpress.org/trunk@45706 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-26 17:00:55 +00:00
Boone Gorges
d1ac7170dc Taxonomy: Standardize docs for wp_list_categories().
Many of the parameters historically documented on this function are merely
passed through to `get_categories()` and its underlying functions. In order to
avoid unnecessary duplication of function arguments, we remove documentation of
these parameters, and replace it with reference to the wrapped functions.

Parameters that receive special treatment or are otherwise changed before
being passed through continue to be documented as part of `wp_list_categories()`.

Props audrasjb, itowhid06, birgire.
Fixes #47896.
Built from https://develop.svn.wordpress.org/trunk@45894


git-svn-id: http://core.svn.wordpress.org/trunk@45705 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-26 15:24:55 +00:00
Boone Gorges
e0c83d76d1 Taxonomy: Fix unique-slug check for terms with parents.
`wp_unique_term_slug()` appends numeric suffixes when the requested slug is
already in use by a sibling term. Changes introduced in [32837] inadvertently
caused this suffixing to be skipped in cases where the requested slug is
suffixed with the parent slug, so that it became possible to have two terms
`childslug-parentslug` underneath to the same `parentslug`. We fix this
regression by ensuring that the numeric-suffix routine runs in all cases.

Props yashar_hv, saskak, dlh.
Fixes #46431.
Built from https://develop.svn.wordpress.org/trunk@45893


git-svn-id: http://core.svn.wordpress.org/trunk@45704 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-26 15:19:56 +00:00
Andrew Ozz
c5fed47367 Docs: Improve and update the description of multi_resize() to explain changes and expected use.
See #40439.
Built from https://develop.svn.wordpress.org/trunk@45892


git-svn-id: http://core.svn.wordpress.org/trunk@45703 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-25 22:21:58 +00:00
Sergey Biryukov
b1847ef3e2 Menus: In wp_setup_nav_menu_item() and Walker_Nav_Menu_Edit::start_el(), check if the post or term associated with the menu item still exists to avoid a PHP notice.
If the associated post or term no longer exists, mark the menu item as invalid.

Props mehulkaklotar, kamrankhorsandi, cristiano.zanca, SergeyBiryukov.
Fixes #31703.
Built from https://develop.svn.wordpress.org/trunk@45891


git-svn-id: http://core.svn.wordpress.org/trunk@45702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-25 21:32:59 +00:00
Sergey Biryukov
fe0b22cd67 Users: Adjust [45806] to make sure $all_userids is always defined.
Props kbrownkd.
Fixes #47936.
Built from https://develop.svn.wordpress.org/trunk@45890


git-svn-id: http://core.svn.wordpress.org/trunk@45701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-25 20:03:57 +00:00
Sergey Biryukov
c896a0911e Site Health: Add timezone to Site Health Info page.
Props justinahinon, sharaz, artisticasad, Rarst.
Fixes #47842.
Built from https://develop.svn.wordpress.org/trunk@45889


git-svn-id: http://core.svn.wordpress.org/trunk@45700 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-24 19:37:57 +00:00
Boone Gorges
17d32ebc8f Taxonomy: Ensure consistency of hide_empty in term queries when taxonomy is excluded.
When querying for terms in hierarchical categories using `hide_empty=true`,
results have historically included parent terms which are themselves
unattached to any objects (are "empty") but which have non-empty descendent
terms. Because this process involves walking the descendant tree, we avoid it
when we detect that the queried taxonomies are not hierarchical. (This
behavior was introduced in [5525].)

When the `taxonomy` parameter of `get_terms()` was made optional - see #35495,
[36614] - it affected the mechanism for avoiding unneccessary tree walks,
since there may not be any explicitly declared taxonomies to run through
`is_taxonomy_hierarchical()`. As a result, term queries excluding `taxonomy`
did not check descendants, and empty parents with non-empty children were not
included in `hide_empty` results.

We correct the behavior by crawling term descendants when the `taxonomy`
argument is absent, which means that we're querying for terms in all taxonomies.

Props smerriman.
Fixes #37728.
Built from https://develop.svn.wordpress.org/trunk@45888


git-svn-id: http://core.svn.wordpress.org/trunk@45699 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-23 16:05:56 +00:00
Sergey Biryukov
9672302e04 Date/Time: Rewrite and simplify get_gmt_from_date(), get_date_from_gmt(), and iso8601_to_datetime() using wp_timezone().
Improve unit test coverage.

Props Rarst, goodevilgenius.
Fixes #31809.
Built from https://develop.svn.wordpress.org/trunk@45887


git-svn-id: http://core.svn.wordpress.org/trunk@45698 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-23 11:03:56 +00:00
Sergey Biryukov
1aaf11947e Date/Time: Simplify the date comparing logic in WP_Community_Events::trim_events().
The Events API returns event date without timezone information, so trying to parse it into a timestamp and compare to a WP timestamp is pointless.

Props Rarst.
Fixes #47463.
Built from https://develop.svn.wordpress.org/trunk@45886


git-svn-id: http://core.svn.wordpress.org/trunk@45697 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-23 02:15:55 +00:00
Gary Pendergast
601f5f7376 Build Tools: Pass the LOCAL_DIR environment variable through to the phpunit Docker container.
This allows code running inside the container to know whether it's supposed to be running in `build` or `src`.

See #47767.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45696 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-23 01:56:56 +00:00
Sergey Biryukov
6330f10b7d Date/Time: Revert unintended changes from [45882].
Props TimothyBlynJacobs.
See #25768.
Built from https://develop.svn.wordpress.org/trunk@45884


git-svn-id: http://core.svn.wordpress.org/trunk@45695 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-23 01:16:53 +00:00
Sergey Biryukov
6e555f0c77 Date/Time: Introduce current_datetime() for better time operations.
Returning a `DateTimeImmutable` representation of the current moment in time, this allows for a more flexible and reliable use than `current_time()` provides.

Props Rarst.
Fixes #47464.
Built from https://develop.svn.wordpress.org/trunk@45883


git-svn-id: http://core.svn.wordpress.org/trunk@45694 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-23 01:12:55 +00:00
Sergey Biryukov
6f8e50c7f0 Date/Time: Rewrite and simplify date_i18n() using wp_timezone() to address multiple issues with certain date formats and timezones, while preserving some extra handling for legacy use cases.
Improve unit test coverage.

Props Rarst, remcotolsma, raubvogel.
Fixes #25768.
Built from https://develop.svn.wordpress.org/trunk@45882


git-svn-id: http://core.svn.wordpress.org/trunk@45693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-23 00:57:56 +00:00
desrosj
e7c8b21e71 Coding Standards: Dynamic hooks should be named using interpolation not concatenation.
Props arena, desrosj.
Fixes #47052.
Built from https://develop.svn.wordpress.org/trunk@45881


git-svn-id: http://core.svn.wordpress.org/trunk@45692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-22 19:08:55 +00:00
Sergey Biryukov
d309715a95 Coding Standards: Add missing break for the default case in wp_privacy_anonymize_data().
Props itowhid06.
Fixes #47921.
Built from https://develop.svn.wordpress.org/trunk@45877


git-svn-id: http://core.svn.wordpress.org/trunk@45688 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-22 14:50:55 +00:00
Sergey Biryukov
8d919b09d4 Date/Time: Use wp_timezone() in WP_Date_Query::build_mysql_datetime() to address timezone issues.
Improve unit test coverage.

Props Rarst, Biranit, birgire, jave.web, SergeyBiryukov.
Fixes #41782.
Built from https://develop.svn.wordpress.org/trunk@45876


git-svn-id: http://core.svn.wordpress.org/trunk@45687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-22 03:11:55 +00:00
Gary Pendergast
1f8563d8e7 Build Tools: Don't use git for package installs.
While NPM supports installing packages from git locations, this requires `git` to be in the path, which won't necessarily be true, particularly on Windows.

We can download the release versions for these packages, instead.

Fixes #47916.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-22 02:29:54 +00:00
Sergey Biryukov
ad7b2949ba Users: Adjust [45708] to make sure wp_update_user() does not issue a WP_Error if a single site was previously set up as Multisite and there's still a spam field in the user table.
Add a unit test.

Props azaozz, SergeyBiryukov.
Fixes #45747.
Built from https://develop.svn.wordpress.org/trunk@45874


git-svn-id: http://core.svn.wordpress.org/trunk@45685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-22 01:53:55 +00:00
Sergey Biryukov
f6fc8025c4 Administration: Adjust [45814] to address a backward compatibility issue for plugins passing multiple CSS classes to add_settings_error().
Only add the `notice-` prefix for `error`, `success`, `warning`, `info` CSS classes, keep other classes as is.

Add unit tests for `settings_errors()`.

Props afercia, SergeyBiryukov.
Fixes #44941.
Built from https://develop.svn.wordpress.org/trunk@45873


git-svn-id: http://core.svn.wordpress.org/trunk@45684 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-22 00:22:56 +00:00
Sergey Biryukov
36b4debdb4 Docs: Correct type for the $deprecated argument of get_terms().
Props itowhid06.
Fixes #47915.
Built from https://develop.svn.wordpress.org/trunk@45872


git-svn-id: http://core.svn.wordpress.org/trunk@45683 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-21 16:27:55 +00:00
Sergey Biryukov
3d12c4b6d8 Docs: Fix typo in _wp_make_subsizes() DocBlock.
Props itowhid06.
Fixes #47913. See #40439.
Built from https://develop.svn.wordpress.org/trunk@45871


git-svn-id: http://core.svn.wordpress.org/trunk@45682 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-21 16:23:56 +00:00
Sergey Biryukov
f8fb93cd0d Customizer: Trim whitespace from custom link URLs.
This complements a similar fix for the Menus screen in [45655].

Props donmhico, audrasjb.
Fixes #47888. See #47723.
Built from https://develop.svn.wordpress.org/trunk@45869


git-svn-id: http://core.svn.wordpress.org/trunk@45680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-21 00:27:57 +00:00