WordPress.org

Make WordPress Core

Ticket #33763: 33763.diff

File 33763.diff, 495 bytes (added by swissspidy, 5 years ago)
  • src/wp-admin/edit.php

    diff --git src/wp-admin/edit.php src/wp-admin/edit.php
    index 782b61d..a687e6d 100644
     
    99/** WordPress Administration Bootstrap */
    1010require_once( dirname( __FILE__ ) . '/admin.php' );
    1111
    12 if ( ! $typenow )
     12if ( ! $typenow || ! in_array( $typenow, get_post_types( array( 'show_ui' => true ) ) ) ) {
    1313        wp_die( __( 'Invalid post type' ) );
     14}
    1415
    1516if ( 'attachment' === $typenow ) {
    1617        if ( wp_redirect( admin_url( 'upload.php' ) ) ) {