[Plugin: Featured Image Column] filter for post types
-
Great plugin!
Right now it looks like it adds the column to any post type that supports featured images, and adds featured image support to post and page.
I recommend creating a filtered array, $post_types, so developers can specify exactly where it shows up.
$post_types = array(); if( post_type_supports( 'post', 'thumbnail' ) $post_types[] = 'post'; if( post_type_supports( 'page', 'thumbnail' ) $post_types[] = 'page'; $post_types = apply_filters( 'featured_image_column_post_types', $post_types );
That way, if I want to limit it to just my “rotator” post type, I can drop this in the functions.php file:
function be_featured_image_columns( $post_types ) { return 'rotator'; } add_filter( 'featured_image_column_post_types', 'be_featured_image_columns' );
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘[Plugin: Featured Image Column] filter for post types’ is closed to new replies.