Make WordPress Core

Ticket #40581: #40581.2.patch

File #40581.2.patch, 927 bytes (added by Arena94, 8 years ago)

patch v2

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

     
    10651065                        return;
    10661066                }
    10671067
     1068                $special = array( '_title', 'cb', 'comment', 'media', 'name', 'title', 'username', 'blogname' );
     1069                if ( count( array_intersect ( $special, array_keys( $columns ) ) ) == count( $columns ) ) // if all columns are "special", no columns in screen options
     1070                {
     1071                        return;
     1072                }
     1073
    10681074                $legend = ! empty( $columns['_title'] ) ? $columns['_title'] : __( 'Columns' );
    10691075                ?>
    10701076                <fieldset class="metabox-prefs">
    10711077                <legend><?php echo $legend; ?></legend>
    10721078                <?php
    1073                 $special = array( '_title', 'cb', 'comment', 'media', 'name', 'title', 'username', 'blogname' );
    10741079
    10751080                foreach ( $columns as $column => $title ) {
    10761081                        // Can't hide these for they are special