Make WordPress Core


Ignore:
Timestamp:
09/20/2015 05:10:55 PM (10 years ago)
Author:
johnbillion
Message:

Remove the ability to view the term editing screen for taxonomies 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_taxonomy() should be altered so that show_ui is true, and arguments such as show_in_menu and show_in_nav_menus are false.

Fixes #33938

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/edit-tags.php

    r34306 r34359  
    1717if ( ! $tax )
    1818    wp_die( __( 'Invalid taxonomy' ) );
     19
     20if ( ! in_array( $tax->name, get_taxonomies( array( 'show_ui' => true ) ) ) ) {
     21   wp_die( __( 'You are not allowed to manage these items.' ) );
     22}
    1923
    2024if ( ! current_user_can( $tax->cap->manage_terms ) ) {
Note: See TracChangeset for help on using the changeset viewer.