Commit Graph

26040 Commits

Author SHA1 Message Date
Drew Jaynes (DrewAPicture) 9392b42e97 Convert and rename the `$action` hook in wp-admin/admin-post to two dynamic hook sets.
* `admin_post_nopriv{$request_action}` is fired for logged-out users
* `admin_post{$request_action}` is fired for logged-in users

Props Otto42, DrewAPicture.
See #26869.


git-svn-id: https://develop.svn.wordpress.org/trunk@28349 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-08 10:26:07 +00:00
Drew Jaynes (DrewAPicture) bbd130fe15 Use interpolation instead of concatenation for the `manage_{$screen->id}_columns` hook name.
Props Otto42.
See #26869.


git-svn-id: https://develop.svn.wordpress.org/trunk@28348 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-08 09:57:11 +00:00
Drew Jaynes (DrewAPicture) 30c21227be Use an interpolated hook name for `edit_{$post_type}_per_page` instead of `$per_page` and adjust docs accordingly.
Also references the correct variable for the `$posts_per_page` parameter in the `edit_posts_per_page` hook doc.

Props Otto42 for the initial patch.
See #26869.


git-svn-id: https://develop.svn.wordpress.org/trunk@28347 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-08 08:15:48 +00:00
Scott Taylor 7531fd0070 Leverage `size_format()` when displaying `max_upload_size`:
* In `media_upload_form()` 
* The `uploader-inline` Underscore template in the media modal. 

Replaces 2 buggy inline implementations that could display size units off by one, or size values off by one.

Fixes #25643.



git-svn-id: https://develop.svn.wordpress.org/trunk@28343 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-07 18:24:47 +00:00
Scott Taylor bfe7d38650 `audio`, `video`, and `playlist` shortcodes:
* Convert all instances of variable variables to array properties
* Eradicate use of `extract()`
* Rename `$atts` to `$html_atts` where collision with new `$atts` (shortcode atts holder) var might occur

See #22400, #27881.



git-svn-id: https://develop.svn.wordpress.org/trunk@28342 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-07 17:35:09 +00:00
Lance Willett 28d6842538 Bundled themes: use correct logic in IE conditional comments in header template. Props mikemanger, fixes #28151.
git-svn-id: https://develop.svn.wordpress.org/trunk@28341 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-07 04:26:07 +00:00
Scott Taylor 451319728b In `wp-login.php`, `break` is unreachable after `exit`
See #27882.


git-svn-id: https://develop.svn.wordpress.org/trunk@28340 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-07 03:57:17 +00:00
Scott Taylor 4bddd84276 In `wpdb`, remove dead code:
* In `->tables()`, `break` is unreachable after `return`
* In `->query()`, `$return` is always set, so doesn't need an initial value of `0`
* In `->delete()`, `$bits` is unused

See #27882.


git-svn-id: https://develop.svn.wordpress.org/trunk@28339 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-07 03:55:32 +00:00
Scott Taylor e47eb14575 In `WP_Widget::update_callback()`, `$sidebars_widgets` is unused.
See #27882.


git-svn-id: https://develop.svn.wordpress.org/trunk@28338 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-07 03:51:31 +00:00
Scott Taylor f945487f45 In `wp-includes/theme.php`, `break` is unreachable after `return`.
See #27882.


git-svn-id: https://develop.svn.wordpress.org/trunk@28337 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-07 03:49:19 +00:00
Scott Taylor b99dead052 In `print_admin_styles()`, `$zip` is never used after being set. `$compress_css` does not need to be imported.
See #27882.


git-svn-id: https://develop.svn.wordpress.org/trunk@28336 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-07 03:46:11 +00:00
Scott Taylor b62ca9c298 In `wp_default_scripts()`, `$max_upload_size` and its entangled children `$max_up` and `$max_post` create quite the ternary operator... that is never used.
See #27882.


git-svn-id: https://develop.svn.wordpress.org/trunk@28335 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-07 03:44:06 +00:00
Scott Taylor f63b6cde3a In `wp-includes/revision.php` - remove dead code:
* In `wp_get_post_autosave()`, `break` is unreachable after `return`
* In `_wp_put_post_revision()`, `$post_id` is set then never used.

See #27882.


git-svn-id: https://develop.svn.wordpress.org/trunk@28334 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-07 03:37:45 +00:00
Scott Taylor 098a5145c5 In `WP_Query`, remove duplicate variable setting:
* In `->parse_search_order()`, a value is always set for `$search_orderby`, no need for empty initialization
* In `->get_posts()`, `$fields` is always set, no need for empty initialization

See #27882.


git-svn-id: https://develop.svn.wordpress.org/trunk@28333 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-06 21:42:28 +00:00
Scott Taylor 16a58e34a2 In `get_pages()`, `$cache` does not need to be reset to an empty array. `update_post_cache( $pages )` takes care of priming.
In `set_post_thumbnail()`, (accidental) assignment is unnecessary for `$thumbnail_html` as it is not used. 

See #27882.


git-svn-id: https://develop.svn.wordpress.org/trunk@28332 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-06 21:38:23 +00:00
Scott Taylor 11e65eb200 In `wp_get_attachment_link()`, `$post_title` is set and then not used.
See #27882.


git-svn-id: https://develop.svn.wordpress.org/trunk@28331 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-06 21:34:10 +00:00
Scott Taylor b626b11590 In `Walker_Nav_Menu::start_el()`, `$class_names` is set twice before it is used.
See #27882.


git-svn-id: https://develop.svn.wordpress.org/trunk@28330 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-06 21:32:25 +00:00
Scott Taylor 3f2a078f5e In `get_network_by_path()`, `$exact_domains` is unused.
See #27882.


git-svn-id: https://develop.svn.wordpress.org/trunk@28329 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-06 21:31:14 +00:00
Scott Taylor 24b03d819b In `update_metadata_by_mid()`, `$original_value` is unused.
See #27882.


git-svn-id: https://develop.svn.wordpress.org/trunk@28328 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-06 21:28:02 +00:00
Scott Taylor e95edb29aa In `edit_post_link()`, `$post_type_obj` is unused.
See #27882.


git-svn-id: https://develop.svn.wordpress.org/trunk@28327 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-06 21:26:20 +00:00
Scott Taylor 5cf2a50dba In `paginate_links()`, `break` is unreachable after `return`.
See #27882.


git-svn-id: https://develop.svn.wordpress.org/trunk@28326 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-06 21:24:22 +00:00
Scott Taylor ef5998eabb In `wp-includes/functions.php`, remove dead code:
* In `current_time()`, `break` is unreachable after `return`.
* In `add_query_arg()`, `$ret` is set twice before being used.
* In `wp_mkdir_p()`, `$dir_perms` is set twice before being used.

See #27882.


git-svn-id: https://develop.svn.wordpress.org/trunk@28325 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-06 21:22:22 +00:00
Scott Taylor 5e90fb1b3e In `wp_set_comment_status()`, the `default` case returns, so no default value for `$status` is needed.
See #27882.



git-svn-id: https://develop.svn.wordpress.org/trunk@28324 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-06 21:16:42 +00:00
Scott Taylor 5530fe4c11 In `wp-includes/comment-template.php`, remove dead code:
* In `get_comment_reply_link()`, `$link` is set twice before it is used.
* In `Walker_Comment::start_lvl()`, `case 'ul':` is unreachable unless placed before `default:`. 
* In `Walker_Comment::end_lvl()`, `case 'ul':` is unreachable unless placed before `default:`.
* In `comment_form()`, `$id` is conditionally set and never used. 

See #27882.



git-svn-id: https://develop.svn.wordpress.org/trunk@28323 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-06 21:14:35 +00:00
wonderboymusic 2b1c764ec7 In `Walker::walk()` and `Walker::paged_walk()`, `$id_field` is set and never used.
See #27882.



git-svn-id: https://develop.svn.wordpress.org/trunk@28322 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-06 21:08:02 +00:00
Sergey Biryukov 18916debfd Update deleted site message in ms_site_check().
props boonebgorges.
fixes #28150.

git-svn-id: https://develop.svn.wordpress.org/trunk@28321 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-06 18:45:54 +00:00
Scott Taylor 0f4f941900 In `WP_Image_Editor::get_output_format()`, `$file_mime` and `$file_ext` are set twice before they are used.
See #27882.


git-svn-id: https://develop.svn.wordpress.org/trunk@28320 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-06 18:36:34 +00:00
Scott Taylor 9ad07c8c28 In `wp-includes/class-wp-customize-setting.php`, `break` is unreachable after `return`.
See #27882.


git-svn-id: https://develop.svn.wordpress.org/trunk@28319 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-06 18:33:03 +00:00
Scott Taylor 376125e0b7 In `wp-includes/class-wp-admin-bar.php`, `break` is unreachabled after `return`.
See #27882.


git-svn-id: https://develop.svn.wordpress.org/trunk@28318 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-06 18:28:46 +00:00
Scott Taylor c5463c5cb2 In `WP_Http_Curl::request()`, `$theResponse` is unused. There are other `curl_exec()` calls that do not return as well.
See #27882.


git-svn-id: https://develop.svn.wordpress.org/trunk@28317 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-06 18:26:00 +00:00
Scott Taylor 5df63351b2 In `wp-includes/bookmark.php`, remove dead code:
* In `get_bookmarks()`, `$cache` is set twice before it is used. 
* In `sanitize_bookmark_field()`, `break` is unreachable after `return`

See #27882.


git-svn-id: https://develop.svn.wordpress.org/trunk@28316 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-06 18:21:50 +00:00
Scott Taylor 22743ee2c4 In `wp-admin/users.php`, `break` is unreachabled after `exit`.
See #27882.


git-svn-id: https://develop.svn.wordpress.org/trunk@28315 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-06 18:18:12 +00:00
Scott Taylor 64fbddfcd5 In `core_upgrade_preamble()`, `$alternate` is set then never used.
See #27882.


git-svn-id: https://develop.svn.wordpress.org/trunk@28314 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-06 18:16:34 +00:00
Scott Taylor cb0578d77e In `wp-admin/theme-editor.php`, `break` is unreachabled after `exit`.
See #27882.


git-svn-id: https://develop.svn.wordpress.org/trunk@28313 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-06 18:15:18 +00:00
Scott Taylor 0f9b925ed5 In `wp-admin/post.php`, `break` is unreachabled after `exit`.
See #27882.


git-svn-id: https://develop.svn.wordpress.org/trunk@28312 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-06 18:14:16 +00:00
Scott Taylor a9dfbabfe7 In `wp-admin/plugins.php`, `break` is unreachabled after `exit`.
See #27882.


git-svn-id: https://develop.svn.wordpress.org/trunk@28311 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-06 18:12:44 +00:00
Scott Taylor e742c23af9 In `wp-admin/plugin-editor.php`, `break` is unreachabled after `exit`.
See #27882.


git-svn-id: https://develop.svn.wordpress.org/trunk@28310 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-06 18:11:30 +00:00
wonderboymusic 1da6728dc0 In `wp-admin/network/users.php`, `break` is unreachabled after `exit`.
See #27882.



git-svn-id: https://develop.svn.wordpress.org/trunk@28309 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-06 18:10:01 +00:00
Scott Taylor aa7cef0549 In `wp-admin/network/themes.php`, `break` is unreachabled after `exit`.
See #27882.



git-svn-id: https://develop.svn.wordpress.org/trunk@28308 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-06 18:07:33 +00:00
Scott Taylor 81acc42361 In `wp-admin/link.php`, `break` is unreachabled after `exit`.
See #27882.



git-svn-id: https://develop.svn.wordpress.org/trunk@28307 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-06 18:05:09 +00:00
Scott Taylor e1f5876ac4 In `display_setup_form()`, `$admin_password` is set and (fortunately) not used or displayed.
See #27882.


git-svn-id: https://develop.svn.wordpress.org/trunk@28306 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-06 18:03:34 +00:00
Scott Taylor 3ed59ca164 In `wp-admin/includes/upgrade.php`, remove dead code:
* In `maybe_create_table()` and `maybe_add_column()`, the response of `$wpdb->query()` is set to a variable that is never used.
* In `make_db_current_silent()`, which is a wrapper for `dbDelta`, a variable is set that is not used. This function appears to be a copy-paste of `make_db_current()`'s `dbDelta()` call but is meant to return nothing, and still does not.  

See #27882.


git-svn-id: https://develop.svn.wordpress.org/trunk@28305 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-06 17:26:47 +00:00
Scott Taylor 74ad050063 In `wp-admin/includes/update.php`, remove dead code:
* In `get_core_checksums()`, `$return` is set and never used.
* In `core_update_footer()`, `break` is unnecessary and unreachable after `return`.
* In `get_theme_updates()`, `$themes` is set and never used.
* In `wp_theme_update_row()`, `$theme_name` is the only user of `$themes_allowedtags`... neither are used. 	

See #27882.


git-svn-id: https://develop.svn.wordpress.org/trunk@28304 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-06 17:20:10 +00:00
Scott Taylor fb1054340f In `WP_Screen::render_screen_options()`, remove dead code:
* `$wp_list_table` does not need to be imported.
* `$post` is set and never used.

See #27882.


git-svn-id: https://develop.svn.wordpress.org/trunk@28303 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-06 17:13:30 +00:00
Scott Taylor b64da2cb60 In `get_sample_permalink_html()`, `$view_link` is set and never used.
See #27882.



git-svn-id: https://develop.svn.wordpress.org/trunk@28302 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-06 17:10:41 +00:00
Scott Taylor 5d2b452351 In `install_plugin_information()`, `$title` is set in a `foreach` loop and never used. This appears to be due to copy-pasting a previous `foreach` loop and not discarding these bits.
See #27882.



git-svn-id: https://develop.svn.wordpress.org/trunk@28301 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-06 16:59:29 +00:00
Scott Taylor ffa620b972 In `wp-admin/includes/nav-menu.php`, remove dead code:
* In `_wp_ajax_menu_quick_search()`, in an `else` block, `$post_obj` was set and not used. Another block sets it again and does use it. 
* In `wp_nav_menu_item_post_type_meta_box()`, `$post_type_object` was set and, sadly, never used. `$error` was set and not used. 

See #27882.



git-svn-id: https://develop.svn.wordpress.org/trunk@28300 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-06 16:54:10 +00:00
Scott Taylor e518d0d652 In `update_option_new_admin_email()`, `$email` is set and never used.
See #27882.



git-svn-id: https://develop.svn.wordpress.org/trunk@28299 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-06 16:47:56 +00:00
Scott Taylor ee13be0315 In `attachment_submit_meta_box()`, remove dead code:
* `$action` doesn't need to be imported.
* `$can_publish` is set and never used, which means it doesn't need...
* `$post_type_object` or `$post_type`, which only served `$can_publish`.

See #27882.


git-svn-id: https://develop.svn.wordpress.org/trunk@28298 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-06 16:44:38 +00:00
Scott Taylor d92f5aa154 In `get_media_item()`, `$tags` and `$_tags` are set and never used.
See #27882.


git-svn-id: https://develop.svn.wordpress.org/trunk@28297 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-06 16:40:52 +00:00