WordPress.org

Make WordPress Core

Ticket #19650: alwaysapplyfilters.patch

File alwaysapplyfilters.patch, 622 bytes (added by danielbachhuber, 2 years ago)

Always apply the manage_*_columns filters

  • wp-admin/includes/screen.php

     
    2121        static $column_headers = array(); 
    2222 
    2323        if ( ! isset( $column_headers[ $screen->id ] ) ) 
    24                 $column_headers[ $screen->id ] = apply_filters( 'manage_' . $screen->id . '_columns', array() ); 
     24                $column_headers[ $screen->id ] = array(); 
     25        $column_headers[ $screen->id ] = apply_filters( 'manage_' . $screen->id . '_columns', $column_headers[ $screen->id ] ); 
    2526 
    2627        return $column_headers[ $screen->id ]; 
    2728}