Make WordPress Core


Ignore:
Timestamp:
05/06/2014 04:44:38 PM (11 years ago)
Author:
wonderboymusic
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/meta-boxes.php

    r27869 r28298  
    277277 */
    278278function attachment_submit_meta_box( $post ) {
    279     global $action;
    280 
    281     $post_type = $post->post_type;
    282     $post_type_object = get_post_type_object($post_type);
    283     $can_publish = current_user_can($post_type_object->cap->publish_posts);
    284279?>
    285280<div class="submitbox" id="submitpost">
Note: See TracChangeset for help on using the changeset viewer.