[wp-hackers] get_column_headers filter help

Ben Huson ben at thewhiteroom.net
Thu Jul 29 12:06:30 UTC 2010


I am trying to filter the output of register_column_headers and
content for a plugin (not mine).

I was using the manage_xxxxx_columns filter correctly but for some
reason columns weren't being added.

I checked the core WordPress code of wp-admin/includes/template.php
and found the following code:

// Store in static to avoid running filters on each call
if ( isset($_wp_column_headers[$screen->id]) ) {
	return $_wp_column_headers[$screen->id];

This seems to prevent the filter from running for the $screen->id I
was using to add columns - a custom screen id for the plugin.

Does the plugin have to provide a way to filter the columns before
using register_column_headers() or is this something that can be
handled with the core manage_xxxxx_columns filter?

Thanks

- Ben


More information about the wp-hackers mailing list