Make WordPress Core

Ticket #34988: 34988.patch

File 34988.patch, 1.3 KB (added by milindmore22, 9 years ago)

Attached patch to remove Screen Options from taxonomy edit screen

  • wp-admin/includes/class-wp-screen.php

     
    330330                                        if ( isset( $_REQUEST['post_type'] ) && post_type_exists( $_REQUEST['post_type'] ) )
    331331                                                $post_type = $_REQUEST['post_type'];
    332332                                }
     333                                // Checks and sets edit-tags action, it will look for it in the request
     334                                if ( isset( $_REQUEST[ 'action' ] ) && $_REQUEST[ 'action' ] == 'edit' ) {
     335                                        $action = 'edit';
     336                                }
    333337
    334338                                $id = 'edit-' . $taxonomy;
    335339                                break;
     
    910914                        return $this->_show_screen_options;
    911915
    912916                $columns = get_column_headers( $this );
    913 
     917               
     918                //Get Current screen
     919                $current_screen = get_current_screen();
     920               
    914921                $show_screen = ! empty( $wp_meta_boxes[ $this->id ] ) || $columns || $this->get_option( 'per_page' );
    915922
    916923                switch ( $this->base ) {
     
    945952                        $show_screen = true;
    946953
    947954                /**
     955                 * Check if current screens is taxnomay and is edit page with screen action.
     956                 */
     957                if ( !empty( $current_screen->taxonomy ) && !empty( $current_screen->action ) && $current_screen->action == 'edit' ) {
     958                        $show_screen = false;
     959                }
     960                /**
    948961                 * Filter whether to show the Screen Options tab.
    949962                 *
    950963                 * @since 3.2.0