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
This commit is contained in:
Scott Taylor 2014-05-06 16:44:38 +00:00
parent d92f5aa154
commit ee13be0315

View File

@ -276,11 +276,6 @@ if ( !in_array( $post->post_status, array('publish', 'future', 'private') ) || 0
* @param object $post
*/
function attachment_submit_meta_box( $post ) {
global $action;
$post_type = $post->post_type;
$post_type_object = get_post_type_object($post_type);
$can_publish = current_user_can($post_type_object->cap->publish_posts);
?>
<div class="submitbox" id="submitpost">