This becomes the column that contains the row actions, and allows for a more flexibility, particularly with custom post types and list tables. To (re)define the primary column, use the `list_table_primary_column` filter, which receives the column name and the screen ID as arguments.
props stephdau, DaveAl, jesin.
see #25408.
git-svn-id: https://develop.svn.wordpress.org/trunk@32644 602fd350-edb4-49c9-b593-d223f7449a82
`num_queries` is accessed publicly in core.
`num_rows` is accessed publicly in `ms-settings.php`.
`insert_id` is accessed publicly in core.
`prefix` is accessed publicly in `upgrade.php` and `capabilities.php`.
See #32444.
git-svn-id: https://develop.svn.wordpress.org/trunk@32640 602fd350-edb4-49c9-b593-d223f7449a82
* Move to a separate file for better organization and method names.
* Use a `dataProvider` when appropriate, for better readability.
* Add a test for splitting the banned domain list on line breaks.
See #20459, #21730.
git-svn-id: https://develop.svn.wordpress.org/trunk@32638 602fd350-edb4-49c9-b593-d223f7449a82
`username_exists()` should return `false` instead of `null`, just like `email_exists()` does, which is right under it.
See #32444.
git-svn-id: https://develop.svn.wordpress.org/trunk@32637 602fd350-edb4-49c9-b593-d223f7449a82
This will prevent longer strings from wrapping needlessly, and is more semantically correct markup.
props tyxla.
fixes#32391.
git-svn-id: https://develop.svn.wordpress.org/trunk@32636 602fd350-edb4-49c9-b593-d223f7449a82
* `wp_version_check()`, `wp_update_plugins()`, and `wp_update_themes()` do not return meaningful responses, and their responses are never handled by core. As such, they shouldn't alternately return `void` or `false`. "Returning" in those functions is just "bailing"
* In the same functions, `version.php` doesn't need to load if `WP_INSTALLING` is defined - the function will immediately bail, the values will never be read, and the globals won't be reset. I have unified the approach in all 3 functions.
* When returning filtered `$locale`, there is no need to set the variable twice.
* In `_maybe_update_core()`, `isset()` can take multiple values to bail before the call to `time()`, if necessary. This is a micro-optimization to prevent PHP from hitting the OS unnecessarily.
See #32444.
git-svn-id: https://develop.svn.wordpress.org/trunk@32635 602fd350-edb4-49c9-b593-d223f7449a82
Cleans up tests for sanitization of `illegal_names`, `illegal_email_domains`, and `banned_email_domains` network options.
Fixes#32517.
git-svn-id: https://develop.svn.wordpress.org/trunk@32634 602fd350-edb4-49c9-b593-d223f7449a82
Split a line with both an assignment and a conditional, not to mention an interpolated variable. Lots going on, easy mistake to make.
props BrianLayman.
fixes#32516.
git-svn-id: https://develop.svn.wordpress.org/trunk@32632 602fd350-edb4-49c9-b593-d223f7449a82
Removes several repetitive calls to `get_blog_status()` that are not needed, as the data is already available as part of each site's object.
Fixes#32512.
git-svn-id: https://develop.svn.wordpress.org/trunk@32630 602fd350-edb4-49c9-b593-d223f7449a82
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