From ee13be031509179914f79b772b1b80a4d6bb1299 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Tue, 6 May 2014 16:44:38 +0000 Subject: [PATCH] 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 --- src/wp-admin/includes/meta-boxes.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/wp-admin/includes/meta-boxes.php b/src/wp-admin/includes/meta-boxes.php index 9f7f469a42..e9cb1460d9 100644 --- a/src/wp-admin/includes/meta-boxes.php +++ b/src/wp-admin/includes/meta-boxes.php @@ -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); ?>