WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/15/2015 10:26:22 AM (6 years ago)
Author:
johnbillion
Message:

Remove the ability to view the post listing screen and post editing screen for post types with show_ui set to false. It is unexpected and unintended behaviour that this is allowed.

If your plugin or site does rely on this behaviour, the arguments that are passed to register_post_type() should be altered so that show_ui is true, and arguments such as show_in_menu, show_in_nav_menus, and show_in_admin_bar are false.

Fixes #33763
Props swissspidy, johnbillion

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/link-template.php

    r34176 r34177  
    12291229        return;
    12301230
     1231    if ( ! in_array( $post->post_type, get_post_types( array( 'show_ui' => true ) ) ) ) {
     1232        return;
     1233    }
     1234
    12311235    /**
    12321236     * Filter the post edit link.
Note: See TracChangeset for help on using the changeset viewer.