{"id":69479,"date":"2011-09-14T08:00:00","date_gmt":"2011-09-14T08:00:00","guid":{"rendered":"https:\/\/www.weixiaoduo.com\/plugins\/2024\/02\/22\/featured-image-column\/"},"modified":"2024-11-30T01:51:00","modified_gmt":"2024-11-30T01:51:00","slug":"featured-image-column","status":"publish","type":"post","link":"https:\/\/www.weixiaoduo.com\/plugins\/featured-image-column\/","title":{"rendered":"Featured Image Column"},"content":{"rendered":"<p>As of version 0.2.2 you can select which post types you\u2019d like to have the image column.<br \/>\nIt simply adds a column before the title (far left) the show\u2019s the posts featured image if it\u2019s supported and exists.<\/p>\n<p>Want to change the default image? Simply filter you own image by using <code>featured_image_column_default_image<\/code><br \/>\nor filter your own CSS by using the <code>featured_image_column_css<\/code> filter hook.<\/p>\n<h4>Example actions\/filters<\/h4>\n<p><strong>Add support for a custom default image<\/strong><\/p>\n<pre><code>function my_custom_featured_image_column_image( $image ) {\n    if ( !has_post_thumbnail() ) {\n        return trailingslashit( get_stylesheet_directory_uri() ) . 'images\/featured-image.png';\n    }\n\n    return $image;\n}\nadd_filter( 'featured_image_column_default_image', 'my_custom_featured_image_column_image' );\n<\/code><\/pre>\n<p><strong>Remove support for post types<\/strong> <em>Use the <code>featured_image_column_init<\/code> action hook for your filter.<\/em><\/p>\n<pre><code>function frosty_featured_image_column_init_func() {\n    add_filter( 'featured_image_column_post_types', 'frosty_featured_image_column_remove_post_types', 11 ); \/\/ Remove\n}\nadd_action( 'featured_image_column_init', 'frosty_featured_image_column_init_func' );\n\nfunction frosty_featured_image_column_remove_post_types( $post_types ) {\n    foreach( $post_types as $key => $post_type ) {\n        if ( 'post-type' === $post_type ) \/\/ Post type you'd like removed. Ex: 'post' or 'page'\n            unset( $post_types[$key] );\n    }\n    return $post_types;\n}\n<\/code><\/pre>\n<p>For more question please visit <a href=\"https:\/\/austin.passy.co\/wordpress-plugins\/featured-image-column\/\" rel=\"nofollow ugc\">https:\/\/austin.passy.co<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Adds a column to any post type edit screen with the featured image if it exists.<\/p>\n","protected":false},"author":65,"featured_media":277098,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"Featured Image Column - \u8587\u6653\u6735\u63d2\u4ef6\u76ee\u5f55","description":"Adds a column to any post type edit screen with the featured image if it exists."},"footnotes":""},"categories":[1],"tags":[197,1339,985],"class_list":["post-69479","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-admin","tag-column","tag-featured-image"],"_links":{"self":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/69479","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/users\/65"}],"replies":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/comments?post=69479"}],"version-history":[{"count":0,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/69479\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media\/277098"}],"wp:attachment":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media?parent=69479"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/categories?post=69479"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/tags?post=69479"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}