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
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
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
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
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
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
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
- 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
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
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
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
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
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
`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
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
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
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
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
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
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
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
* 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
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
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