开发者 |
austyfrosty
DH-Shredder MartyThornley chrisjean |
---|---|
更新时间 | 2017年6月26日 01:27 |
捐献地址: | 去捐款 |
PHP版本: | 4.4 及以上 |
WordPress版本: | 4.8 |
featured_image_column_default_image
or filter your own CSS by using the featured_image_column_css
filter hook.
Example actions/filters
Add support for a custom default image
`
function my_custom_featured_image_column_image( $image ) {
if ( !has_post_thumbnail() ) {
return trailingslashit( get_stylesheet_directory_uri() ) . 'images/featured-image.png';
}
return $image;
}
add_filter( 'featured_image_column_default_image', 'my_custom_featured_image_column_image' );
**Remove support for post types** *Use the
featured_image_column_initaction hook for your filter.*
function frosty_featured_image_column_init_func() {
add_filter( 'featured_image_column_post_types', 'frosty_featured_image_column_remove_post_types', 11 ); // Remove
}
add_action( 'featured_image_column_init', 'frosty_featured_image_column_init_func' );
function frosty_featured_image_column_remove_post_types( $post_types ) {
foreach( $post_types as $key => $post_type ) {
if ( 'post-type' === $post_type ) // Post type you'd like removed. Ex: 'post' or 'page'
unset( $post_types[$key] );
}
return $post_types;
}
`
Add your own CSS to change the size of the image.
`
/**
featured-image-column
directory to the /wp-content/plugins/ directory. OR click add new plugin in your WordPress admin.featured_image_column_init
.featured_image_column_post_types
for post type support (add/remove).PHP Deprecated: Assigning the return value of new by reference is deprecated in /featured-image-column/featured-image-column.php on line 157
.wp_cache_set/get
post_type
's, thanks to Bill Erickson$post_type
's that support 'post-thumbnails'
.