This plugin would be better if you could sort by featured image. This would help identify post that are missing featured images.
]]>Would be nice if this plugin could load the thunbnail version of the featured image instead of the full size. In my case we use high resoltuion images. When we have long list of posts, the load of that admin area can get really slow. I solved this by changing the line where you have:
return get_the_post_thumbnail( $post_id );
to:
return get_the_post_thumbnail( $post_id, 'thumbnail' );
maybe you can fix this for all the users ?? Love this plugin!
]]>Hi support team,
All my sites on Genesis (5) has an error after this new update.
Thi error is:
Parse error: syntax error, unexpected ‘->’ (T_OBJECT_OPERATOR) in /wp-content/plugins/featured-image-column/featured-image-column.php on line 269
The “constructor” is not compatible.
( $featured_image_column = new Featured_Image_Column() )->add_hooks();
This is working:
$featured_image_column = new Featured_Image_Column();
$featured_image_column->add_hooks();
register_activation_hook( __FILE__, [ $featured_image_column, 'activation_hook' ] );
]]>
PHP Parse error: syntax error, unexpected ‘->’ (T_OBJECT_OPERATOR) in /var/www/mwdtsa.org/wp-content/plugins/featured-image-column/featured-image-column.php on line 269
]]>Ive been using this plugin for many years. Compare to other plugins this one places the imge at the right spot, as directly to the checkbox on the left side of the table.
However, the issues has become to many, and the author seems to have some time off. Meanwhile, we are using this replacement. I decided to share this to help out with analysing the problem(s) until an update is available.
The cache is removed, any default featured image should be handle by has_post_thumbnail() not on column visibility tasks. There are updated plugins that do this matter the right way, and let them do so.
The hooks and filters are calling in messed up order, why Quick edit doesnt render saved ajax calls correctly.
The options are not thought through and many functions is not needed, we just use a simple filter to return any modifications of allowed post types, as product or attachments. We dont call a stylesheet for two lines of selector.
In short, I like old ladies at the market, and this plugin has been around for a while and I rather see this keep on going, to show new contributors that WordPress doesnt always have to be re-published. Lets re-cycle!
Well, here is the complete class, hope this posting doesnt break it. (Please WordPress: make previews on posted code)
if(!defined('ABSPATH')) exit;
if ( !class_exists( 'Featured_Image_Column' ) ) {
class Featured_Image_Column {
function __construct() {
add_action('admin_init', array($this, 'init'));
}
function init(){
// Must return an array()
$post_types = apply_filters('Featured_Image_Column_post_types', get_post_types(array('public' => true)));
if(empty($post_types)) return;
/* Print style */
add_action('admin_head', function(){
echo '<style>th#featured-image { width: 40px; }</style>'."\r\n";
});
/* Column manager */
foreach($post_types as $post_type){
if(!post_type_supports($post_type, 'thumbnail')) continue;
add_filter( "manage_{$post_type}_posts_columns", array($this, 'columns'));
add_action( "manage_{$post_type}_posts_custom_column", array($this, 'column_data'), 10, 2);
}
}
/**
* Filter the image in before the 'title' column
*/
function columns($columns){
if(!is_array($columns)) $columns = array();
$new = array();
foreach($columns as $key => $title){
if($key == 'title') $new['featured-image'] = __('Image', 'wordpress');
$new[$key] = $title;
}
return $new;
}
/**
* Output the image
*/
function column_data($column_name, $post_id) {
if('featured-image' != $column_name) return;
$style = 'display: block; max-width: 42px; height: auto; border: 1px solid #e5e5e5;';
$style = apply_filters('Featured_Image_Column_image_style', $style);
if(has_post_thumbnail($post_id)){
$size = 'thumbnail';
echo get_the_post_thumbnail($post_id, $size, 'style='.$style);
} else {
echo '<img style="'. $style .'" src="'. esc_url(plugins_url( 'images/default.png', __FILE__ )) .'" />';
}
}
}
$featured_image_column = new Featured_Image_Column;
};
Hope this is ok to post until update is running.
]]>Love this plugin, but one little bug, if you are using an external object cache (like APC or Memcache) and you look at your posts list and see a missing featured image, then you add one, the list still shows that you don’t have a featured image (or if you change one it shows the old). This is due to caching. I created this simple function for my functions file to solve it. It’d be great if you can integrate this into your code:
/***
*
* ADMIN: Clear cache for featured image column plugin when new featured image
* only useful as long as featured image column plugin is active
* could be a conditional to check if meta_key=_thumbnail_id, but figured the lookup isn’t worth it, just delete the cache on all post meta updates for a post
*
****/
function fic_thumbnail_updated_actions($meta_id, $post_id) {
$post_id = (int) $post_id;
$cache_key = “featured_image_post_id-{$post_id}-_thumbnail”;
$cache = wp_cache_delete( $cache_key, null );
}
add_action( ‘deleted_post_meta’, ‘fic_thumbnail_updated_actions’, 10, 2 );
add_action( ‘updated_post_meta’, ‘fic_thumbnail_updated_actions’, 10, 2 );
add_action( ‘added_post_meta’, ‘fic_thumbnail_updated_actions’, 10, 2 );
Is that what it should be?
.featured-image.column-featured-image img {
height: 100px;
width: 100px;
}
I’m using Jetpack’s custom css.
]]>On line 148 on featured-image-column.php
inside the init() function, it is missing closing the comment, so the next block of code is disabled. I’m not sure if this is intentional or affecting the plugin performance somehow.
I have unchecked all boxes in Featured Image Col settings, but the Image column is displayed on all post types’ lists.
]]>I am using Portfolio Post Type plugin (v 0.9.1) on a site along with Featured Image Column 0.2.3.
In Featured Image Column’s settings I have un-ticked “portfolio” under the “Allowed Post Types”. However, the featured image from the plugin continues to appear.
Screenshots:
]]>The featured image column breaks the table view of posts on smaller screens and mobiles. see screenshot.
screenshot here:
https://cldup.com/vRX4RXgq6a.png
Hi!
I have used this plugin for a long time, but after switching my admin area to SSL, i realize that the images are not being deliver via HTTPS. Is there a a fix for the issue? Thanks!
Hello there.
Is it possible to integrate the column in some other places other than only posts and pages? Because e.g. I got this plugin https://www.ads-software.com/support/plugin/assign-categories which lets me bulk assign categories and if I had the thumbnails column here aswell it’d be much easier to identify what post it is! Is there a code I could add to the categories plugin?
Thank again.
]]>When I use this plugin it brings my products post from woocommerce to my custom post type list. ?Any way to avoid this?.
Thanks.
]]>Was looking at your code and see in function get_the_image how you get the image if not exists in cache.
But, something really funny, you do not return the ouput from cache if exists… ??
I was using Quick Edit to change Draft to Published and noticed once saved the styling is off and the thumbnail column disappears.
When I refresh the page it’s back to normal. Not critical but kinda buggy looking.
https://drive.google.com/file/d/0B_j_l4FBkfb3aXpVU3lsWm9MQUU/view?usp=sharing
]]>OK, so I see the code but not knowing a the first thing about php I don’t know what to change to get this to remove the thumbnail column from PAGES. Could you please entire the exact code I need?
I was not able to make the correct changes to this code:
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;
}
]]>
I’m not so good at this kind of thing, but I copied/pasted the CSS code within the description of the plugin into my Custom CSS and I couldn’t figure out where to change the size. Can you provide a copy/paste CSS for the code-challenged? I would appreciate it.
Patty
I dunno how difficult it would be, but what would you think about adding a link to the media uploader on the thumbnail? That way, you could set the featured image without having to open up the edit screen.
If it is kinda tricky but you think it’s a good idea, I’d be happy to look into it. Is this plugin on Github somewhere? If so, I could fork it and send a pull request if I get it working.
]]>Great plugin. After leaving a review I noticed another review which mentioned an issue which I can reproduce.
I think this is just a display issue, but after using quick edit, the thumbnail is no longer shown in the posts page and the row looks rather untidy. The thumbnail does reappear after selecting the menu item to reload the page, so this is not a show stopper.
]]>Just wondering. It seems like a cool plugin.
]]>Hello,
I think it will work with the filters, but I dont know how.
I dont want the images on pages and on two of my CPTs like venue and dates.
How will I set this filter?
Cheers,
Denis
Just updated to the latest version of this plugin and now its not showing up featured image for custom posts. Any idea of the cause?
]]>I’d like to use Featured Image Column on Posts, but not on Pages, without modifying the plugin.
There’s an earlier topic on this, but it’s closed to new replies. ( https://www.ads-software.com/support/topic/plugin-featured-image-column-filter-for-post-types?replies=5 )
You’d mentioned you’d look into this, and I see a note of including Bill’s stuff in your plugin, but can’t find anything like it in the source code.
Am I currently able to use this plugin on Posts but not Pages without modifying it? Thanks!
]]>The line
148 $image[$cache_key] = $image;
throws a warning in the WordPress backend in the Favourite Image column:
“Warning: Illegal string offset ‘featured_column_thumbnail’ in /www/htdocs/root/wp-content/plugins/featured-image-column/featured-image-column.php on line 148”
The warning disappears if the above mentioned line is commented out or deleted.
What is the purpose of this line?
]]>Deprecated: Assigning the return value of new by reference is deprecated in ..\wp-content\plugins\featured-image-column\featured-image-column.php on line 157
]]>When a post is edited using “Quick Edit” from the list of posts, the Featured Image column disappears after “Update” is clicked.
https://www.ads-software.com/extend/plugins/featured-image-column/
]]>1.6: the feature image column displays the same featured image for all pages.
https://www.ads-software.com/extend/plugins/featured-image-column/
]]>