Introduced in [29925], `validate_date_values()` throws `_doing_it_wrong()`
notices when values passed as part of a `WP_Date_Query` do not reflect actual
dates. However, the validation did not account properly for the case where an
array of multiple values is passed, as when doing IN or BETWEEN queries.
Props dlh.
Fixes#31001 for trunk.
Built from https://develop.svn.wordpress.org/trunk@31179
git-svn-id: http://core.svn.wordpress.org/trunk@31160 1a063a9b-81f0-0310-95a4-ce76da25c4cd
If `get_blog_details()` is returning something that is not our expected object or `false`, then a notice would already be thrown there.
Also adds proper return docs to `get_blog_details()`.
Props SergeyBiryukov.
Fixes#30566
Built from https://develop.svn.wordpress.org/trunk@31178
git-svn-id: http://core.svn.wordpress.org/trunk@31159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Up to this point, various core elements' DocBlocks incorrectly included an `@internal` tag as a means for skipping the parsing process. When paired with a description (inline or otherwise), `@internal` is a valid tag meant to provide internal-only context, but not necessarily to skip parsing the entire element.
See #30987.
Built from https://develop.svn.wordpress.org/trunk@31170
git-svn-id: http://core.svn.wordpress.org/trunk@31151 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When editing a site, if `home` and `siteurl` are checked to be updated along with a site's domain and path, they should receive the results of any modifications in `update_blog_details()` rather than trusting the POST data.
Previously, it was possible to save a value without a leading slash on the path, causing an invalid URL to be stored.
Props earnjam.
Fixes#30417.
Built from https://develop.svn.wordpress.org/trunk@31156
git-svn-id: http://core.svn.wordpress.org/trunk@31137 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In multisite, core expects the stored value for a site's path to have leading and trailing slashes. When these slashes are missing, it becomes impossible to visit the site.
This enforces proper `/path/` creation in `update_blog_details()`, most likely used when updating an existing site through `site-info.php`.
Props earnjam, simonwheatley.
Fixes#18117. Fixes#23865.
Built from https://develop.svn.wordpress.org/trunk@31155
git-svn-id: http://core.svn.wordpress.org/trunk@31136 1a063a9b-81f0-0310-95a4-ce76da25c4cd
[29863] made the corresponding change in `term_exists()`. Failure to change the
default value in `category_exists()` meant that an unspecified value for
`$parent` would limit results to top-level categories.
Includes unit tests and corrected function documentation.
Props hissy.
Fixes#30975 for trunk.
Built from https://develop.svn.wordpress.org/trunk@31140
git-svn-id: http://core.svn.wordpress.org/trunk@31121 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* `wp_send_json_error()` accesses `$errors` on an instance, it must be `public`
* `$error_data` is a local message cache for error codes and doesn't particularly hide info, would be the only non-public field or method in the class
Make `$errors` and `$error_data` public and remove magic methods.
See #30891.
Built from https://develop.svn.wordpress.org/trunk@31138
git-svn-id: http://core.svn.wordpress.org/trunk@31119 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* Every subclass of `Walker` overrides `$db_fields` and makes it public
* `wp_list_comments()` accesses `->max_pages` on an instance of `Walker`, it must be public
* `$has_children` was added as `protected` in 4.0. doesn't need BC
Make `$db_fields` and `$max_pages` public and remove magic methods.
See #30891.
Built from https://develop.svn.wordpress.org/trunk@31137
git-svn-id: http://core.svn.wordpress.org/trunk@31118 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* Exactly one method was made private in [28516], and is only used internally.
* 2 properties were made private, but they just store variables passed to the constructor.
* Instances of this class are never created in core. `WP_MatchesMapRegex::apply()` is called statically in `WP->parse_request()` and `url_to_postid()`.
The chances that:
1) this class is used as an instance somewhere and
2) the properties that have always been marked `@access private` and begin with `_` were used publicly
...is extremely low.
Remove the magic methods, I should not have added them.
While we're at it, use the PHP5-style `__construct()` instead of the class name.
See #30891.
Built from https://develop.svn.wordpress.org/trunk@31136
git-svn-id: http://core.svn.wordpress.org/trunk@31117 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* In [28525], `$_diff_threshold`, `$inline_diff_renderer`, and `$_show_split_view` were marked `protected`; magic methods were also added.
* The magic methods should only perform operations on a whitelisted set of properties, now specified in `$compat_fields`
* Remove `__call()`, is unnecessary and can wreak havoc on the parent class.
This class is used in one place: `wp_text_diff()`.
See #30891.
Built from https://develop.svn.wordpress.org/trunk@31135
git-svn-id: http://core.svn.wordpress.org/trunk@31116 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* In [28481], `$admin_header_callback` and `$admin_image_div_callback` were set to `private` based on their erroneous `@param` values
* `$admin_header_callback` and `$admin_image_div_callback` are used as hook callbacks - as such, they must be `public`
* In [28521] and [28524], magic methods were added for back-compat
* Currently, there are 4 properties marked `private`: `$uploaded_headers`, `$default_headers`, `$page`, and `$updated` - `$page` and `$uploaded_headers` are never used and `$updated` was added by me in [30187] during 4.1. `$default_headers` does not necessarily need to be `private`
Set `$admin_header_callback` and `$admin_image_div_callback` to `public`.
Remove the `$page` property - it duplicated the `$page` local var and is referenced/used nowhere.
Remove the `$uploaded_headers` property - it is used nowhere and is dead code.
Set `$default_headers` to `public`.
Remove the magic methods - they were beyond overkill and rendered moot by the above changes.
See #30891.
Built from https://develop.svn.wordpress.org/trunk@31134
git-svn-id: http://core.svn.wordpress.org/trunk@31115 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* In [28481], `$admin_header_callback` and `$admin_image_div_callback` were set to `private` based on their erroneous `@param` value
* `$admin_header_callback` and `$admin_image_div_callback` are used as hook callbacks - as such, they must be `public`
* In [28521] and [28524], magic methods were added for back-compat
* Currently, there are 2 properties marked `private`, `$page` and `$updated` - `$page` is never used and `$updated` was added by me in [30186] during 4.1
Set `$admin_header_callback` and `$admin_image_div_callback` to `public`.
Remove the `$page` property - it duplicated the `$page` local var and is referenced/used nowhere.
Remove the magic methods - they were beyond overkill and rendered moot by the above changes.
See #30891.
Built from https://develop.svn.wordpress.org/trunk@31133
git-svn-id: http://core.svn.wordpress.org/trunk@31114 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* `get_permalink( $post_ID )` can return `false`, set it to a variable and check it
* Using the variable allows us to replace 11 separate calls to `get_permalink( $post_ID )` in the file
* These notices were triggered by the potential for `false` to be passed to `esc_url()`
See #30799.
Built from https://develop.svn.wordpress.org/trunk@31131
git-svn-id: http://core.svn.wordpress.org/trunk@31112 1a063a9b-81f0-0310-95a4-ce76da25c4cd