Commit Graph

13793 Commits

Author SHA1 Message Date
Scott Taylor 949cfd7a34 Add missing access modifiers to methods in `WP_Query`. Add magic methods for `__get()`, `__set()`, `__isset()`, `__unset()`, and `__call()`.
Add unit test for magic methods.

See #27881, #22234.

Built from https://develop.svn.wordpress.org/trunk@28523


git-svn-id: http://core.svn.wordpress.org/trunk@28349 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 06:49:16 +00:00
Scott Taylor b539c1cd76 Add missing access modifiers to methods in `WP_Meta_Query`.
See #27881, #22234.

Built from https://develop.svn.wordpress.org/trunk@28522


git-svn-id: http://core.svn.wordpress.org/trunk@28348 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 06:35:14 +00:00
Scott Taylor 821246b4ae Some classes with `__get()` method also need `__set()`.
See #27881, #22234.

Built from https://develop.svn.wordpress.org/trunk@28521


git-svn-id: http://core.svn.wordpress.org/trunk@28347 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 06:31:15 +00:00
Scott Taylor 2e9ce6fc87 Fix fatal error in unit test.
See #27881.

Built from https://develop.svn.wordpress.org/trunk@28520


git-svn-id: http://core.svn.wordpress.org/trunk@28346 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 06:25:14 +00:00
Scott Taylor 40fab485aa Add missing access modifiers to methods in `WP_Comment_Query`. Add a magic `__call()` method for BC.
See #27881, #22234.

Built from https://develop.svn.wordpress.org/trunk@28519


git-svn-id: http://core.svn.wordpress.org/trunk@28345 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 06:19:14 +00:00
Scott Taylor 5030fdef62 Add missing access modifiers to methods in `WP_Scripts` and `WP_Styles`.
See #27881, #22234.

Built from https://develop.svn.wordpress.org/trunk@28518


git-svn-id: http://core.svn.wordpress.org/trunk@28344 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 06:17:14 +00:00
Scott Taylor f998ac39d3 Add missing access modifiers to methods in `WP_Dependencies` and `_WP_Dependency`.
See #27881, #22234.

Built from https://develop.svn.wordpress.org/trunk@28517


git-svn-id: http://core.svn.wordpress.org/trunk@28343 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 06:14:14 +00:00
Scott Taylor dc24cef605 Add missing access modifiers to methods in `WP` and `WP_MatchesMapRegex`. Add magic `__call()` and `__get()` methods to `WP_MatchesMapRegex` for BC.
See #27881, #22234.

Built from https://develop.svn.wordpress.org/trunk@28516


git-svn-id: http://core.svn.wordpress.org/trunk@28342 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 06:12:14 +00:00
Scott Taylor 25a70283e1 Add missing access modifiers to methods in `wp_xmlrpc_server`. Add a magic `__call()` method for BC.
See #27881, #22234.

Built from https://develop.svn.wordpress.org/trunk@28515


git-svn-id: http://core.svn.wordpress.org/trunk@28341 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 06:09:13 +00:00
Scott Taylor dfa4de15fa Add missing access modifiers to methods/members in `Walker` and subclasses. Add a magic `__get()` method.
See #27881, #22234.

Built from https://develop.svn.wordpress.org/trunk@28514


git-svn-id: http://core.svn.wordpress.org/trunk@28340 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 06:00:15 +00:00
Scott Taylor df8a090193 Add missing access modifiers to methods/members in `WP_Image_Editor_*` classes.
See #27881, #22234.

Built from https://develop.svn.wordpress.org/trunk@28513


git-svn-id: http://core.svn.wordpress.org/trunk@28339 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 05:53:14 +00:00
Scott Taylor dd25163346 Add access modifiers to methods/members in `WP_HTTP_IXR_Client`.
See #27881, #22234.

Built from https://develop.svn.wordpress.org/trunk@28512


git-svn-id: http://core.svn.wordpress.org/trunk@28338 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 05:51:15 +00:00
Scott Taylor 72d096b007 Add access modifiers to methods/members in `WP_Error`. Add a magic `__get()` method for BC.
See #27881, #22234.

Built from https://develop.svn.wordpress.org/trunk@28511


git-svn-id: http://core.svn.wordpress.org/trunk@28337 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 05:50:14 +00:00
Scott Taylor aabcfd658b Add access modifiers to methods/members in `WP_Embed`.
See #27881, #22234.

Built from https://develop.svn.wordpress.org/trunk@28510


git-svn-id: http://core.svn.wordpress.org/trunk@28336 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 05:47:14 +00:00
Scott Taylor 3c209b6f56 Add missing access modifiers to methods/members in `WP_Customize_*`.
See #27881, #22234.

Built from https://develop.svn.wordpress.org/trunk@28509


git-svn-id: http://core.svn.wordpress.org/trunk@28335 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 05:45:16 +00:00
Scott Taylor 4938497b3a Add access modifier to methods/members in `WP_Ajax_Response`. Adds a magic `__get()` method for BC.
See #27881, #22234.

Built from https://develop.svn.wordpress.org/trunk@28508


git-svn-id: http://core.svn.wordpress.org/trunk@28334 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 05:41:14 +00:00
Scott Taylor 27e8d17be2 Add access modifier to methods/members in `WP_oEmbed`. Adds a magic `__call()` method for BC.
See #27881, #22234.

Built from https://develop.svn.wordpress.org/trunk@28507


git-svn-id: http://core.svn.wordpress.org/trunk@28333 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 05:37:13 +00:00
Scott Taylor d6e5fcab4d Add access modifier to methods of HTTP classes. There are no new private or protected methods, so no need for `__call()`.
See #27881, #22234.

Built from https://develop.svn.wordpress.org/trunk@28506


git-svn-id: http://core.svn.wordpress.org/trunk@28332 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 05:34:15 +00:00
Scott Taylor 35fb2e48e0 Add access modifiers to methods/members in `WP_Feed_Cache`, `WP_SimplePie_File`, and `WP_Feed_Cache_Transient`.
See #27881, #22234.

Built from https://develop.svn.wordpress.org/trunk@28505


git-svn-id: http://core.svn.wordpress.org/trunk@28331 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 05:27:15 +00:00
Scott Taylor ddfb1e20d2 Add access modifiers to methods/members in `Walker_Category` and `Walker_CategoryDropdown`.
See #27881, #22234.

Built from https://develop.svn.wordpress.org/trunk@28504


git-svn-id: http://core.svn.wordpress.org/trunk@28330 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 05:23:14 +00:00
Scott Taylor f172ef8ce2 Add access modifiers to methods/members in `WP_Roles`. Add a magic `__call()` method for BC.
See #27881, #22234.

Built from https://develop.svn.wordpress.org/trunk@28503


git-svn-id: http://core.svn.wordpress.org/trunk@28329 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 05:20:14 +00:00
Scott Taylor d9cd56f9ad Add access modifiers to methods/members in `WP_Object_Cache`. Add a magic `__get()` method for BC.
See #27881.

Built from https://develop.svn.wordpress.org/trunk@28502


git-svn-id: http://core.svn.wordpress.org/trunk@28328 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 05:16:15 +00:00
Scott Taylor 5d72cd4949 In `wp_list_bookmarks()`, `$categorize` should now be `$r['categorize]`.
See #22400.

Built from https://develop.svn.wordpress.org/trunk@28501


git-svn-id: http://core.svn.wordpress.org/trunk@28327 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 05:11:14 +00:00
Scott Taylor 2f513d3320 Fix some `hackificator` odds and ends in `wp-admin`:
* `wp-activate.php` and `wp-admin/themes.php` don't need the closing PHP tag
* Switch single quotes for HTML attribute values to double in a few places
* Convert `include_once file.php` syntax to `include_once( 'file.php' )`
* Add access modifiers to methods/members in: `_WP_List_Table_Compat`, `Walker_Nav_Menu_Edit`, `Walker_Nav_Menu_Checklist`, `WP_Screen`, `Walker_Category_Checklist`
* `edit_user()` doesn't need to import the `$wpdb` global
* `wp_list_widgets()` doesn't need to import the `$sidebars_widgets` global
* switch/endswitch syntax is not supported in Hack
* A `<ul>` in `wp-admin/users.php` is unclosed

See #27881.

Built from https://develop.svn.wordpress.org/trunk@28500


git-svn-id: http://core.svn.wordpress.org/trunk@28326 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 05:04:16 +00:00
Drew Jaynes c7c563532b Improve inline documentation of default arguments for `the_title_attribute()`.
See #28298.

Built from https://develop.svn.wordpress.org/trunk@28498


git-svn-id: http://core.svn.wordpress.org/trunk@28324 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 02:28:14 +00:00
Scott Taylor b9afafffe3 `hackificator` complains if you call `include 'file.php'` without the parens, needs to be `include( 'file.php' )`
See #27881.

Built from https://develop.svn.wordpress.org/trunk@28479


git-svn-id: http://core.svn.wordpress.org/trunk@28306 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-18 20:52:15 +00:00
Drew Jaynes 11dd3443a2 Improve inline documentation for default arguments in `wp_get_archives()`.
See #28298.

Built from https://develop.svn.wordpress.org/trunk@28476


git-svn-id: http://core.svn.wordpress.org/trunk@28303 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-18 17:20:15 +00:00
Scott Taylor 87730b879f Eliminate the use of `extract()` in `MO::import_from_reader()`.
See #22400.

Built from https://develop.svn.wordpress.org/trunk@28472


git-svn-id: http://core.svn.wordpress.org/trunk@28299 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-17 17:21:14 +00:00
Scott Taylor f4661c6659 Eliminate the use of `extract()` in `get_pages()`.
See #22400.

Built from https://develop.svn.wordpress.org/trunk@28471


git-svn-id: http://core.svn.wordpress.org/trunk@28298 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-17 17:12:15 +00:00
Scott Taylor 1bd4118799 Eliminate the use of `extract()` in `wp_insert_attachment()`.
`wp_insert_attachment()` and `wp_insert_post()` are incredibly similar, but have branched logic. I have annotated many places where they diverge.

See #22400.

Built from https://develop.svn.wordpress.org/trunk@28470


git-svn-id: http://core.svn.wordpress.org/trunk@28297 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-17 16:54:14 +00:00
Scott Taylor 73a9ba7428 Eliminate the use of `extract()` in `wp_insert_post()`.
See #22400.

Built from https://develop.svn.wordpress.org/trunk@28469


git-svn-id: http://core.svn.wordpress.org/trunk@28296 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-17 15:53:15 +00:00
Scott Taylor eea7052df8 Eliminate the use of `extract()` in `wp_delete_term()`.
See #22400.

Built from https://develop.svn.wordpress.org/trunk@28466


git-svn-id: http://core.svn.wordpress.org/trunk@28293 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-17 14:55:14 +00:00
Scott Taylor bec9993f38 Eliminate the use of `extract()` in `get_terms()`.
See #22400.

Built from https://develop.svn.wordpress.org/trunk@28465


git-svn-id: http://core.svn.wordpress.org/trunk@28292 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-17 14:47:14 +00:00
Scott Taylor c1b5670a00 Eliminate the use of `extract()` in `wp_insert_term()`.
See #22400.

Built from https://develop.svn.wordpress.org/trunk@28464


git-svn-id: http://core.svn.wordpress.org/trunk@28291 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-17 14:16:14 +00:00
Scott Taylor 66c3f62a54 Eliminate use of `extract()` in `wp_update_term()`.
See #22400.

Built from https://develop.svn.wordpress.org/trunk@28461


git-svn-id: http://core.svn.wordpress.org/trunk@28288 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-16 21:29:13 +00:00
Scott Taylor a39aecc9b1 The cache key for comments in `WP_Comment_Query::query()` needs to do `wp_array_slice_assoc( $this->query_vars, array_keys( $defaults ) )` instead of `compact( array_keys( $defaults ) )`. The latter assumes all of those variables are still floating around.
See #22400.


Built from https://develop.svn.wordpress.org/trunk@28460


git-svn-id: http://core.svn.wordpress.org/trunk@28287 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-16 21:09:14 +00:00
Scott Taylor 0aafc8f874 (ACTUALLY) Eliminate use of `extract()` in `WP_Comment_Query::query()`.
See #22400.

Built from https://develop.svn.wordpress.org/trunk@28459


git-svn-id: http://core.svn.wordpress.org/trunk@28286 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-16 20:52:14 +00:00
Scott Taylor 4f57a231c5 Eliminate use of `extract()` in `WP_Comment_Query::query()`.
See #22400.

Built from https://develop.svn.wordpress.org/trunk@28458


git-svn-id: http://core.svn.wordpress.org/trunk@28285 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-16 19:33:14 +00:00
Scott Taylor 14ba67c38d Eliminate use of `extract()` in `wp_insert_comment()`.
See #22400.

Built from https://develop.svn.wordpress.org/trunk@28457


git-svn-id: http://core.svn.wordpress.org/trunk@28284 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-16 18:52:16 +00:00
Andrew Ozz f184243aa3 DFW: fix closing only the wpLink or media modal when pressing Esc.
Built from https://develop.svn.wordpress.org/trunk@28455


git-svn-id: http://core.svn.wordpress.org/trunk@28282 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-16 18:17:14 +00:00
Scott Taylor 877fad9f38 Eliminate use of `extract()` in `wp_insert_user()`.
See #22400.

Built from https://develop.svn.wordpress.org/trunk@28454


git-svn-id: http://core.svn.wordpress.org/trunk@28281 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-16 18:15:15 +00:00
Scott Taylor a25e03f833 In `wp_xmlrpc_server::mw_editPost`, also set `$post_type = $postdata['post_type']`.
See #22400, [28448].


Built from https://develop.svn.wordpress.org/trunk@28453


git-svn-id: http://core.svn.wordpress.org/trunk@28280 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-16 18:06:15 +00:00
Scott Taylor fdaea6b7f2 Eliminate use of `extract()` in `wp_widget_rss_form()`.
See #22400.

Built from https://develop.svn.wordpress.org/trunk@28449


git-svn-id: http://core.svn.wordpress.org/trunk@28276 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-16 15:38:14 +00:00
Scott Taylor 463b7c4620 Eliminate use of `extract()` in `wp_xmlrpc_server::mw_editPost()` (MetaWeblog API, y'all).
A lot of the extracted variables are overwritten by being explicitly set later. 
Only set variables that would otherwise not be present with `compact()` is called.

See #22400.

Built from https://develop.svn.wordpress.org/trunk@28448


git-svn-id: http://core.svn.wordpress.org/trunk@28275 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-16 15:19:14 +00:00
Sergey Biryukov 5c2d25aa77 Filter out empty and duplicate values in Comment Moderation and Comment Blacklist settings.
props GaVrA.
fixes #23800.
Built from https://develop.svn.wordpress.org/trunk@28444


git-svn-id: http://core.svn.wordpress.org/trunk@28271 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-16 11:10:14 +00:00
Sergey Biryukov abc830ca9d DFW: Properly handle Esc key when the content is focused or when switching browser tabs.
props avryl.
fixes #28279.
Built from https://develop.svn.wordpress.org/trunk@28443


git-svn-id: http://core.svn.wordpress.org/trunk@28270 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-16 10:43:14 +00:00
Sergey Biryukov d970ac80c6 Don't include caption tags in gallery template when there is no caption.
props avryl.
fixes #28089.
Built from https://develop.svn.wordpress.org/trunk@28442


git-svn-id: http://core.svn.wordpress.org/trunk@28269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-15 21:03:15 +00:00
Scott Taylor 5a5c86139f Eliminate use of `extract()` in `wp_get_object_terms()`.
There are 3 properties, just set them to variables. They are used too often to warrant a refactor.

See #22400.

Built from https://develop.svn.wordpress.org/trunk@28441


git-svn-id: http://core.svn.wordpress.org/trunk@28268 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-15 19:58:15 +00:00
Scott Taylor 6e8e30bb1e Eliminate use of `extract()` in `wp_widget_rss_output()`.
Add `'items' => 0` to `$default_args`. When `0`, the value is set to `10` (the fallback). 
Every other default arg has a default value of `0`.

`items` is expected to always be passed to this function.

See #22400.

Built from https://develop.svn.wordpress.org/trunk@28440


git-svn-id: http://core.svn.wordpress.org/trunk@28267 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-15 19:42:13 +00:00
Scott Taylor 157f811a5e Eliminate use of `extract()` in `WP_Widget_RSS::widget()`.
See #22400.

Built from https://develop.svn.wordpress.org/trunk@28439


git-svn-id: http://core.svn.wordpress.org/trunk@28266 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-15 19:36:15 +00:00