Commit Graph

40304 Commits

Author SHA1 Message Date
Sergey Biryukov 3a49864e41 Tests: Remove a test for `rest_preload_api_request()` only relevant for PHP 5.2.
Props dkarfa.
See #48074.

git-svn-id: https://develop.svn.wordpress.org/trunk@46219 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-20 22:26:18 +00:00
Sergey Biryukov 8e454ba7f8 Code Modernization: Remove a workaround for `CURLOPT_PROTOCOLS` in `WP_Http_Curl::request()`.
The `CURLOPT_PROTOCOLS` constant was introduced in PHP 5.2.10, so no longer needs a workaround.

Props jrf.
See #48074.

git-svn-id: https://develop.svn.wordpress.org/trunk@46218 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-20 22:22:38 +00:00
Sergey Biryukov f3a0da9fca Code Modernization: Remove a workaround for `IMAGETYPE_ICO` in `file_is_displayable_image()`.
The `IMAGETYPE_ICO` constant was introduced in PHP 5.3, so no longer needs a workaround.

Props jrf.
See #48074.

git-svn-id: https://develop.svn.wordpress.org/trunk@46217 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-20 22:17:48 +00:00
Sergey Biryukov 8991815b62 Code Modernization: Remove a workaround for HHVM in `WP_Image_Editor_Imagick::test()`.
Support for HHVM was dropped in 2017 via #40548.

Props jrf.
See #48074.

git-svn-id: https://develop.svn.wordpress.org/trunk@46216 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-20 22:12:06 +00:00
Sergey Biryukov 9fd60c9e57 Docs: Update a comment about `pcre.backtrack_limit` upper limit in `benchmark_pcre_backtracking()`.
See #48074.

git-svn-id: https://develop.svn.wordpress.org/trunk@46215 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-20 22:06:40 +00:00
Sergey Biryukov 099adc0243 Code Modernization: Remove all code using a `version_compare()` with a PHP version older than PHP 5.6.
Props jrf.
Fixes #48074.

git-svn-id: https://develop.svn.wordpress.org/trunk@46214 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-20 22:01:36 +00:00
Sergey Biryukov 92d70ed696 Tests: Replace "blog" reference in a comment about `DISABLE_WP_CRON` usage with "site".
Props davidbaumwald.
Fixes #48089.

git-svn-id: https://develop.svn.wordpress.org/trunk@46213 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-20 21:58:42 +00:00
Jonathan Desrosiers 8de962479d Docs: Add missing `$which` parameter descriptions.
Follow up of [46211].

See #45954.

git-svn-id: https://develop.svn.wordpress.org/trunk@46212 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-20 20:56:49 +00:00
Jonathan Desrosiers e31bd15ab5 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@46211 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-20 20:52:58 +00:00
Sergey Biryukov 6b65af939f 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@46210 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-20 20:45:58 +00:00
Sergey Biryukov 6922b15e3a 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@46209 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-20 20:29:30 +00:00
Jonathan Desrosiers 946cadaf3d 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@46208 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-20 20:15:51 +00:00
Adam Silverstein dcd3371c3b Media: make search input full width on mobile. Take two.
Props m1tk00.
Fixes #40130.



git-svn-id: https://develop.svn.wordpress.org/trunk@46207 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-20 20:07:53 +00:00
Jonathan Desrosiers f6b8632508 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@46206 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-20 20:07:28 +00:00
Jonathan Desrosiers 080e7a609e 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@46205 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-20 19:52:38 +00:00
Andrew Ozz 66ef5ec15b Remove left-over debug code after [46203].
See #46349.

git-svn-id: https://develop.svn.wordpress.org/trunk@46204 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-20 19:26:33 +00:00
Andrew Ozz 388e7fe7f4 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@46203 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-20 18:50:19 +00:00
Andrew Ozz 89939327e3 Media/Upload: rotate images on upload according to EXIF Orientation.
Props msaggiorato, wpdavis, markoheijnen, dhuyvetter, msaggiorato, n7studios, triplejumper12, pbiron, mikeschroder, joemcgill, azaozz.

Fixes #14459.

git-svn-id: https://develop.svn.wordpress.org/trunk@46202 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-20 18:20:26 +00:00
Sergey Biryukov 188fe7eb2f Docs: Correct `@since` tag for `comments_popup` public query variable removed in [35848].
Props hareesh-pillai.
Fixes #48080.

git-svn-id: https://develop.svn.wordpress.org/trunk@46201 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-20 17:43:13 +00:00
Jonathan Desrosiers e269403184 Build/Test Tools: Specify PHP 5.6 as the required version of PHP in Composer.
Props ayeshrajans, jrf, netweb.
Fixes #48081.

git-svn-id: https://develop.svn.wordpress.org/trunk@46200 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-20 17:32:23 +00:00
Jonathan Desrosiers a4e8fe2145 Site Health: Use sentence casing consistently in header tags.
Props SergeyBiryukov, ajayghaghretiya1, ronakganatra, mukesh27, Clorith.
Fixes #47298.

git-svn-id: https://develop.svn.wordpress.org/trunk@46199 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-20 17:25:38 +00:00
Sergey Biryukov 1a6d41b4d6 Docs: Add `@since` tag for the new `$position` argument added to `add_submenu_page()` and related functions in [46197].
See #39776.

git-svn-id: https://develop.svn.wordpress.org/trunk@46198 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-20 17:05:26 +00:00
Adam Silverstein 78e8100b6b 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@46197 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-20 14:59:04 +00:00
Sergey Biryukov 7389596a6d 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@46196 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-20 13:04:50 +00:00
Andrea Fercia f326f7ebfb Accessibility: Bundled Theme: Make the TwentyEleven skip link the first focusable element within the body.
Props poena, williampatton.
Fixes #47891.


git-svn-id: https://develop.svn.wordpress.org/trunk@46195 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-20 11:40:06 +00:00
Jake Spurlock a63e490a1e 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@46194 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-19 22:06:41 +00:00
Jake Spurlock c0ad8e700f 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@46193 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-19 21:41:35 +00:00
Jonathan Desrosiers dd330aee33 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@46192 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-19 19:21:17 +00:00
K. Adam White 073469446b REST API: Revert [45687].
This change may not be needed and further investigation is required before we accept it into a release.

See #46907.



git-svn-id: https://develop.svn.wordpress.org/trunk@46191 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-19 15:49:33 +00:00
Grzegorz (Greg) Ziółkowski 09e56c04ad 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.




git-svn-id: https://develop.svn.wordpress.org/trunk@46190 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-19 15:46:02 +00:00
Grzegorz (Greg) Ziółkowski 7178c62226 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



git-svn-id: https://develop.svn.wordpress.org/trunk@46189 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-19 15:17:39 +00:00
Boone Gorges 6eabc83b81 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@46188 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-19 15:02:20 +00:00
Jonathan Desrosiers 7e69921a5a 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@46187 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-19 15:00:14 +00:00
K. Adam White 84dfea907f 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@46186 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-19 14:35:47 +00:00
Jonathan Desrosiers 3514a52019 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@46185 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-19 14:29:30 +00:00
K. Adam White b926baa51d 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@46184 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-19 14:04:51 +00:00
Sergey Biryukov 5f1cbd7165 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@46183 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-19 12:01:03 +00:00
Sergey Biryukov a22920743b 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@46182 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-19 11:45:15 +00:00
Sergey Biryukov e5bee4ef68 Docs: Format multi-line comment in [46180] per the documentation standards.
See #45066.

git-svn-id: https://develop.svn.wordpress.org/trunk@46181 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-19 11:39:01 +00:00
Sergey Biryukov a87122688b Tests: Update unit tests to account for the removal of old `wp-a11y` from the loaded scripts in [46179].
Props sstoqnov.
See #45066, #48071.

git-svn-id: https://develop.svn.wordpress.org/trunk@46180 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-19 11:14:38 +00:00
Andrea Fercia aeac7fe2e7 Script Loader: Remove old `wp-a11y` from the loaded scripts after [46167] and [46169].
Props garrett-eclipse, sstoqnov.
See #45066.
Fixes #48071.


git-svn-id: https://develop.svn.wordpress.org/trunk@46179 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-19 09:54:00 +00:00
Boone Gorges 754056e218 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@46178 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-19 02:05:25 +00:00
Boone Gorges 3419633de4 Use `WP_Query` when sending pingbacks.
Props dshanske, spacedmonkey, janw.oostendorp, mrmadhat, birgire.
See #36824.

git-svn-id: https://develop.svn.wordpress.org/trunk@46177 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-19 01:59:06 +00:00
Boone Gorges daa1da924d 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@46176 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-19 01:53:03 +00:00
Boone Gorges 48e280db32 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@46175 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-19 01:48:54 +00:00
Andrew Ozz 20a17438d0 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@46174 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-19 01:25:14 +00:00
Andrew Ozz 684f30fd7b 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@46173 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-19 00:59:59 +00:00
Jake Spurlock 3d40bbeef5 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


git-svn-id: https://develop.svn.wordpress.org/trunk@46172 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-18 23:37:08 +00:00
Sergey Biryukov 150b301ac0 Script Loader: Move the `current_theme_supports()` check above the `wp_default_(scripts|styles)` action, for consistency.
See #42804.

git-svn-id: https://develop.svn.wordpress.org/trunk@46171 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-18 22:41:29 +00:00
Sergey Biryukov 88bf910518 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@46170 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-18 22:33:45 +00:00