Contributors: austyfrosty, DH-Shredder, MartyThornley, chrisjean,
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XQRHECLPQ46TE
Tags: featured image, admin, column
Requires at least: 6.2
Tested up to: 6.7.1
Stable tag: trunk
Requires PHP: 8.0
Adds a column to public post types edit screen where the featured image of each post will be shown (if available).
As of version 0.2.2 you can select which post types you'd like to have the image column. It simply adds a column before the title (far left) the show's the posts featured image if it's supported and exists.
Want to change the default image? Simply filter you own image by using featured_image_column_default_image
or filter your own CSS by using the featured_image_column_css
filter hook.
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_init
action 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;
}
For more question please visit https://austin.passy.co
Follow the steps below to install the plugin.
- Upload the
featured-image-column
directory to the /wp-content/plugins/ directory. OR click add new plugin in your WordPress admin. - Activate the plugin through the 'Plugins' menu in WordPress.
- Tested up WordPress 6.7.1.
- Added GitHub Release -> WordPress.org Action.
- Resolve 1.0.0 Release call_user_func errors and incorrect file path(s).
- Update code for PHP >= 8.0.
- Update for WordPress >= 6.2.
- Missed short-array syntax updates for PHP < 5.4 compatibility.
- Fix for PHP versions < 5.4.
- Please update your PHP versions!
- Code cleanup.
- Tested with WordPress 4.8 new minimum version requirement set to 4.4.
- Image columns work correctly when using Quick Edit now (no more collapsing)!
- Removed use of additional wp_cache.s
- Toggling setting controls for post types works again (turn on/off featured image column per post type).
- Make sure get_the_image() returns the cached image. /ht Djules
- Wow. Exactly one year to the dau since the last update!
- Added settings to turn on/off featured image column per post type.
- Added pre load hook
featured_image_column_init
. - Better custom post type column manager filter.
- Fixed custom post type support.
- Updated version to WordPress 3.8 compatable and PHP 5.3+
- Added new filter
featured_image_column_post_types
for post type support (add/remove). - Removed closing PHP.
- Fixed
PHP Deprecated: Assigning the return value of new by reference is deprecated in /featured-image-column/featured-image-column.php on line 157
.
- Fixed repeat images per posts.
- Added filter to style sheet, (use your own CSS to make the thumbnail bigger).
- Updated
wp_cache_set/get
- Tried to update some code to fix repeated images.
- Code edits by Chris Jean of ithemes.com.
- Fixed latest post image showing up across all posts.
- Reset the query check.
- Added filter for
post_type
's, thanks to Bill Erickson - Fixed error when zero posts exists (very rare).
- Added a light caching script for the images.
- Updated a contributors .org profile name.
- Removed PHP4 constructor.
- TODO: Fix error when no posts exists.
- Add support for public
$post_type
's that support'post-thumbnails'
.
- Initial release.
Code cleanup, compatibility updates for WordPress 4.8, quick edit no longer collapses the columns and the settings actually toggle post_types on/off!