Commit Graph

30103 Commits

Author SHA1 Message Date
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
Scott Taylor bc164ef635 Cleanup the use of `$wp_scripts` global in `functions.wp-scripts.php`.
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32596 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-25 16:23:46 +00:00
Scott Taylor 531e31b598 Add missing doc blocks to `wp-includes/functions.php`.
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32595 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-25 16:10:59 +00:00
Boone Gorges abb1cef395 Pass the original `$user_id` variable to the filter in `get_the_author_meta()`.
Props dlh, chriscct7.
Fixes #32481.

git-svn-id: https://develop.svn.wordpress.org/trunk@32594 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-25 13:05:21 +00:00
Ella Iseulde Van Dorpe f639366590 Link modal: reset search results appropriately
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
2015-05-25 06:40:27 +00:00
Ella Iseulde Van Dorpe 1e6be9cd89 TinyMCE: wpeditimage: trim class
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
2015-05-25 06:34:27 +00:00
Drew Jaynes 7baa0296ad Fix inline documentation syntax in `wp_xmlrpc_server`.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@32591 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-25 06:24:27 +00:00
Scott Taylor 928dc46a3b Add missing doc blocks to `formatting.php`.
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
2015-05-25 02:58:00 +00:00
Scott Taylor 09d6c51801 Add missing doc blocks to `default-widgets.php`.
Move `add_action()` for widgets to `default-filters.php` with its brethren.

See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32589 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-24 21:27:12 +00:00
Scott Taylor 8e3c811b64 Alter some `@return` doc blocks for `cron.php`.
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32588 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-24 21:10:00 +00:00
Scott Taylor 19108352b9 Add missing doc blocks to `comment.php`.
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32587 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-24 21:03:42 +00:00
Drew Jaynes 248b17974d Clarify that `wp_xmlrpc_server->wp_getTaxonomies()` returns an IXR_Error instance on failure.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@32586 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-24 20:34:07 +00:00
Drew Jaynes f336aab356 Add missing argument descriptions for the `$args` parameter in `wp_xmlrpc_server->wp_getTaxonomies()`.
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
2015-05-24 20:32:09 +00:00
Drew Jaynes 9613dd3a84 Add missing argument descriptions for the `$args` parameter in `wp_xmlrpc_server->wp_getTaxonomy()`.
Also clarifies the return description.

See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@32584 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-24 20:14:49 +00:00
Drew Jaynes 4b7db61698 Add missing argument descriptions for the `$args` parameter in `wp_xmlrpc_server->wp_getTerms()`.
Also clarifies the return description.

See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@32583 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-24 20:10:27 +00:00
Drew Jaynes 7cafb17a5e Add missing `$args` parameter descriptions for `wp_xmlrpc_server->wp_getTerm()`.
Also clarifies the return description.

See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@32582 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-24 20:07:01 +00:00