WordPress.org

Make WordPress Core

Ticket #10813: 10813-unused-code-post-page.diff

File 10813-unused-code-post-page.diff, 1.4 KB (added by xknown, 9 years ago)

remove unused code

  • wp-admin/page.php

     
    117117        include('edit-page-form.php');
    118118        break;
    119119
    120 case 'editattachment':
    121         $page_id = $post_ID = (int) $_POST['post_ID'];
    122         check_admin_referer('update-attachment_' . $page_id);
    123 
    124         // Don't let these be changed
    125         unset($_POST['guid']);
    126         $_POST['post_type'] = 'attachment';
    127 
    128         // Update the thumbnail filename
    129         $newmeta = wp_get_attachment_metadata( $page_id, true );
    130         $newmeta['thumb'] = $_POST['thumb'];
    131 
    132         wp_update_attachment_metadata( $newmeta );
    133 
    134120case 'editpost':
    135121        $page_ID = (int) $_POST['post_ID'];
    136122        check_admin_referer('update-page_' . $page_ID);
  • wp-admin/post.php

     
    156156
    157157        break;
    158158
    159 case 'editattachment':
    160         $post_id = (int) $_POST['post_ID'];
    161 
    162         check_admin_referer('update-attachment_' . $post_id);
    163 
    164         // Don't let these be changed
    165         unset($_POST['guid']);
    166         $_POST['post_type'] = 'attachment';
    167 
    168         // Update the thumbnail filename
    169         $newmeta = wp_get_attachment_metadata( $post_id, true );
    170         $newmeta['thumb'] = $_POST['thumb'];
    171 
    172         wp_update_attachment_metadata( $post_id, $newmeta );
    173 
    174159case 'editpost':
    175160        $post_ID = (int) $_POST['post_ID'];
    176161        check_admin_referer('update-post_' . $post_ID);