Correct some `@return` values.
Some functions can `return new WP_Error` without setting it to a variable.
Some functions can return their `apply_filters(...)` call without first setting it to a variable.
`is_object_in_taxonomy()` can return its conditional instead of if/else true/false.
See #32444.
git-svn-id: https://develop.svn.wordpress.org/trunk@32627 602fd350-edb4-49c9-b593-d223f7449a82
Previously, `archived`, `spam`, and `deleted` properties were forced to `0` when returned by `get_blogs_of_user()`. This was originally introduced in [21794] as a way to prevent notices when properties were expected.
Instead, we can properly fill these properties with those retrieved from `get_blog_details()`.
Props realloc.
Fixes#32281.
git-svn-id: https://develop.svn.wordpress.org/trunk@32626 602fd350-edb4-49c9-b593-d223f7449a82
Clarify `@return` values where necessary.
`add_permastruct()` doesn't need to return.
`->using_index_permalinks()` and `->using_mod_rewrite_permalinks()` can just return their conditions, instead of if/else true/false.
`->mod_rewrite_rules()` and `->iis7_url_rewrite_rules()` don't need to set a variable that is immediately returned.
See #32444.
git-svn-id: https://develop.svn.wordpress.org/trunk@32622 602fd350-edb4-49c9-b593-d223f7449a82
Clarify `@return` values where necessary.
In `wp_delete_post_revision()`, `wp_delete_post()` doesn't return `WP_Error`, so that check can be removed.
`wp_revisions_to_keep()` always returns an `int`, so `wp_revisions_enabled()` can use strict comparison.
See #32444.
git-svn-id: https://develop.svn.wordpress.org/trunk@32621 602fd350-edb4-49c9-b593-d223f7449a82
Clarify `@return` values where necessary.
Some wrapper functions don't need to return if the function they wrap doesn't return.
See #32444.
git-svn-id: https://develop.svn.wordpress.org/trunk@32620 602fd350-edb4-49c9-b593-d223f7449a82
Clarify some existing values for `@param` and `@return`.
Some functions do not need to set a variable before immediately returning it.
See #32444.
git-svn-id: https://develop.svn.wordpress.org/trunk@32619 602fd350-edb4-49c9-b593-d223f7449a82
Correct some types for `@param` and `@return`.
`is_page_template()` can return the conditional instead of if/else true/false.
See #32444.
git-svn-id: https://develop.svn.wordpress.org/trunk@32617 602fd350-edb4-49c9-b593-d223f7449a82
Correct some `@return` values.
`is_user_logged_in()` can simply return the `->exists()` call instead of if/else'ing true/false.
See #32444.
git-svn-id: https://develop.svn.wordpress.org/trunk@32614 602fd350-edb4-49c9-b593-d223f7449a82
Plugins can use `pre_option_widget_{$id_base}` filters to return `ArrayIterator`/`ArrayObject` instances instead of primitive arrays. This makes possible for widget instance data to be drawn from somewhere else than `wp_options`, such as a custom post type.
Add unit tests for widgets.
Fixes#32474.
git-svn-id: https://develop.svn.wordpress.org/trunk@32602 602fd350-edb4-49c9-b593-d223f7449a82
In the few functions that used `$objFetchSite` instead of `$http`: use the `$http` naming, which is more civilized.
See #32444.
git-svn-id: https://develop.svn.wordpress.org/trunk@32599 602fd350-edb4-49c9-b593-d223f7449a82
Reset the search results when the input field is emptied with the
browser's "clear" button inside that field.
Fixes#32174.
git-svn-id: https://develop.svn.wordpress.org/trunk@32593 602fd350-edb4-49c9-b593-d223f7449a82
Don't add extra spaces to classes. It causes some tests in the TinyMCE QUnit test suite to fail.
Fixes#31764.
git-svn-id: https://develop.svn.wordpress.org/trunk@32592 602fd350-edb4-49c9-b593-d223f7449a82
Rehabilitate the spacing of various doc blocks.
Standardize some return values that are adjacent to similar functions.
See #32444.
git-svn-id: https://develop.svn.wordpress.org/trunk@32590 602fd350-edb4-49c9-b593-d223f7449a82
Also documents missing `$filter` and `$fields` arguments and associated descriptions, and clarifies the return description.
See #32246.
git-svn-id: https://develop.svn.wordpress.org/trunk@32585 602fd350-edb4-49c9-b593-d223f7449a82