這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Featured Image Column

外掛說明

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.

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_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;
}

Add your own CSS to change the size of the image.

/**
 * @use '.featured-image.column-featured-image img {}'
 */
function my_custom_featured_image_css() {
    return trailingslashit( get_stylesheet_directory_uri() ) . 'css/featured-image.css'; //URL to your css
}
add_filter( 'featured_image_column_css', 'my_custom_featured_image_css' );

For more question please visit http://austin.passy.co

螢幕擷圖

  • Post edit.php screen.

安裝方式

Follow the steps below to install the plugin.

  1. Upload the featured-image-column directory to the /wp-content/plugins/ directory. OR click add new plugin in your WordPress admin.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.

常見問題集

Installation Instructions

Follow the steps below to install the plugin.

  1. Upload the featured-image-column directory to the /wp-content/plugins/ directory. OR click add new plugin in your WordPress admin.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.

使用者評論

閱讀全部 11 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈Featured Image Column〉的開發相關工作。

參與者

將 Featured Image Column 外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

Version 0.3.2 (06/26/17)

  • Missed short-array syntax updates for PHP < 5.4 compatibility.

Version 0.3.1 (06/26/17)

  • Fix for PHP versions < 5.4.
  • Please update your PHP versions!

Version 0.3 (06/25/17)

  • 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).

Version 0.2.3 (04/4/15)

  • Make sure get_the_image() returns the cached image. /ht Djules

Version 0.2.2 (12/3/14)

  • 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.

Version 0.2.1 (12/3/13)

  • Fixed custom post type support.

Version 0.2.0 (12/2/13)

  • 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.

Version 0.1.10 (9/5/13)

  • Fixed PHP Deprecated: Assigning the return value of new by reference is deprecated in /featured-image-column/featured-image-column.php on line 157.

Version 0.1.9 (3/11/12)

  • Fixed repeat images per posts.
  • Added filter to style sheet, (use your own CSS to make the thumbnail bigger).

Version 0.1.8 (2/16/12)

  • Updated wp_cache_set/get

Version 0.1.7 (1/18/12)

  • Tried to update some code to fix repeated images.

Version 0.1.6 (11/21/11)

  • Code edits by Chris Jean of ithemes.com.

Version 0.1.5 (10/18/11)

  • Fixed latest post image showing up across all posts.
  • Reset the query check.

Version 0.1.4 (10/17/11)

  • Added filter for post_type‘s, thanks to Bill Erickson
  • Fixed error when zero posts exists (very rare).

Version 0.1.3 (10/17/11)

  • Added a light caching script for the images.
  • Updated a contributors .org profile name.

Version 0.1.2 (9/30/11)

  • Removed PHP4 constructor.
  • TODO: Fix error when no posts exists.

Version 0.1.1 (9/20/11)

  • Add support for public $post_type‘s that support 'post-thumbnails'.

Version 0.1 (9/14/11)

  • Initial release.