Commit Graph

29918 Commits

Author SHA1 Message Date
Boone Gorges 25afc4b16a `is_email_address_unsafe()` tests should only be run on multisite.
See [32638].

git-svn-id: https://develop.svn.wordpress.org/trunk@32646 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-29 12:37:51 +00:00
Helen Hou-Sandi ea9de1aacd After [32644], sanity for a pile of selectors.
see #25408.


git-svn-id: https://develop.svn.wordpress.org/trunk@32645 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-29 02:59:44 +00:00
Helen Hou-Sandi 86c907d2a5 List tables: introduce the concept of a "primary" column.
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
2015-05-29 02:40:52 +00:00
Scott Taylor f864c1d712 Add `@global` annotations to (the rest of the?) `wp-admin/*` files.
Does not include list table file changes.

See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32643 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-29 02:05:26 +00:00
Scott Taylor 23ce2efd12 Add `@global` annotations for `wp-admin/*`.
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32642 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-28 21:40:27 +00:00
Scott Taylor 5f8df2290f Add missing/alter existing doc blocks for `wp-db.php`.
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32641 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-28 20:09:54 +00:00
Scott Taylor 5e20854d3d Alter visibility of some properties in `wpdb`:
`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
2015-05-28 16:33:31 +00:00
Scott Taylor 5c568b5c31 Add missing doc blocks to `widgets.php`.
Cleanup `@return` values.

See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32639 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-28 16:19:51 +00:00
Boone Gorges 8dced310b1 Improve tests for `is_email_address_unsafe()`.
* 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
2015-05-28 16:05:30 +00:00
Scott Taylor 7d532968eb Add missing doc blocks to `user.php`.
`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
2015-05-28 15:50:34 +00:00
Helen Hou-Sandi 805d876017 About: Give bottom navigation links the full width.
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
2015-05-28 15:38:44 +00:00
Scott Taylor 5b85526344 Add missing doc blocks to `update.php`:
* `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
2015-05-28 15:28:10 +00:00
Jeremy Felt c12e7d763c Use a dataProvider for network option sanitization tests.
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
2015-05-28 06:37:44 +00:00
Andrew Nacin abd407a9ea Revert change to default-filters.php in [32632]. see #32516.
git-svn-id: https://develop.svn.wordpress.org/trunk@32633 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-28 05:51:30 +00:00
Andrew Nacin e0cfefaa5e Fix `return` error in get_theme_mods() from [32629].
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
2015-05-28 05:50:40 +00:00
Andrew Nacin 7aef782aa8 Add unit test asserting that serializable objects will never pass is_serialized(). see #17375.
git-svn-id: https://develop.svn.wordpress.org/trunk@32631 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-28 05:22:14 +00:00
Jeremy Felt b1e80f0388 Use site objects rather than get_blog_status() in MS list tables.
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
2015-05-27 23:13:04 +00:00
Scott Taylor 266a7f2f9d Add missing doc blocks to `theme.php`.
Correct some `@return` values.

See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32629 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-27 22:20:48 +00:00
Scott Taylor c8ec7ffffa Add missing doc blocks to `template.php`.
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32628 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-27 22:03:52 +00:00
Scott Taylor be0175838b Add missing doc blocks to `taxonomy.php`.
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
2015-05-27 21:59:06 +00:00
Jeremy Felt 9560fbdd77 Provide all site flag data in objects returned by `get_blogs_of_user()`
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
2015-05-27 21:22:09 +00:00
Mark Jaquith 556ffa235a Insert temporary password field hook for feature development in a plugin.
git-svn-id: https://develop.svn.wordpress.org/trunk@32625 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-27 19:58:38 +00:00
Scott Taylor a3f2743f9a Add missing doc blocks to `shortcodes.php`.
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32624 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-27 19:39:00 +00:00
Scott Taylor 4eb73b6683 Add missing doc blocks to `script-loader.php`.
Use `wp_styles()` and `wp_scripts()` where appropriate. 
 
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32623 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-27 19:33:41 +00:00
Scott Taylor 2f822e758c Add missing doc blocks to `rewrite.php`.
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
2015-05-27 19:22:59 +00:00
Scott Taylor 496b36db35 Add missing doc blocks to `revision.php`.
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
2015-05-27 18:37:29 +00:00
Scott Taylor d1675e2571 Add missing doc blocks to `query.php`.
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
2015-05-27 18:14:08 +00:00
Scott Taylor e4480ea91e Add missing doc blocks to `post.php`.
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
2015-05-27 17:04:45 +00:00
Scott Taylor 5e44938537 Add missing doc blocks to `post-thumbnail-template.php`.
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32618 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-27 16:28:37 +00:00
Scott Taylor a3f9ed1494 Add missing doc blocks to `post-template.php`.
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
2015-05-27 16:25:17 +00:00
Scott Taylor 0c2421bff2 Add missing doc blocks to `post-formats.php`.
Correct some types for `@param` and `@return`.

See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32616 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-27 16:05:33 +00:00
Scott Taylor a35e24fba5 Add missing doc blocks to `plugin.php`.
`has_filter()` can use strict comparison when checking `$has` internally.

See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32615 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-27 15:55:35 +00:00
Scott Taylor 932af17935 Add missing doc blocks for `pluggable.php`.
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
2015-05-27 15:31:46 +00:00
Scott Taylor 9a5af9d3d2 Fix doc blocks for `option.php`.
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32613 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-26 22:16:15 +00:00
Scott Taylor a418d57c5a Fix doc blocks for `nav-menu*.php` files.
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32612 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-26 22:09:26 +00:00
Scott Taylor 85e3befce9 Fix doc blocks for `ms-*.php` files.
A few functions can return a conditional instead of an `if`/`else` of `true`/`false`.

See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32611 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-26 21:50:13 +00:00
Scott Taylor 58f8af684d Fix doc blocks for `meta.php`
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32610 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-26 19:32:55 +00:00
Scott Taylor 0a892c11c8 Fix doc blocks for `media*.php`
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32609 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-26 19:22:12 +00:00
Scott Taylor c7e87544a7 Add missing doc blocks to `locale.php`
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32608 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-26 18:58:20 +00:00
Scott Taylor 9de5c2b22d Add missing doc blocks to `load.php`
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32607 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-26 18:52:03 +00:00
Scott Taylor 22ba68ccb8 Fix doc blocks to `link-template.php`
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32606 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-26 18:43:48 +00:00
Scott Taylor cb1cf9e1ac Add missing doc blocks to `l10n.php`
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32605 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-26 18:12:15 +00:00
Boone Gorges d10ec28b01 Improve unit tests for `wp_unique_post_slug()`.
See #5305.

git-svn-id: https://develop.svn.wordpress.org/trunk@32604 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-26 18:07:17 +00:00
Scott Taylor f9cd0dac60 Add missing doc blocks to `kses.php` - also fix some unfortunate whitespace issues in related funcs.
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32603 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-26 18:05:22 +00:00
westonruter 6d34b6e075 Add support for `WP_Widget::get_settings()` returning `ArrayIterator`/`ArrayObject` instances.
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
2015-05-26 16:50:03 +00:00
Weston Ruter e95740d7d0 Fix wp_send_json_error() response for update-widget Ajax request, to return error code instead of error message, as the WP_Error objects are instantiated with codes and the messages are empty.
Fixes #32496.



git-svn-id: https://develop.svn.wordpress.org/trunk@32601 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-25 22:08:08 +00:00
Scott Taylor bd06ad2725 `get_comments()` can return `int`, so a few places need to check if the return value is traversable before passing what is assumed to be an `array`.
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32600 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-25 17:58:52 +00:00
Scott Taylor 768115d353 Cleanup doc blocks in `http.php`.
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
2015-05-25 17:31:02 +00:00
Scott Taylor 14706868d2 Cleanup doc blocks in `general-template.php`.
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32598 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-25 17:17:23 +00:00
Scott Taylor bac34e9daa Cleanup the use of `$wp_styles` global in `functions.wp-styles.php`.
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32597 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-25 16:34:38 +00:00