[WordPress] 外掛分享: Featured Image Extended

首頁外掛目錄 › Featured Image Extended
全新外掛
安裝啟用
尚無評分
2849 天前
最後更新
問題解決
WordPress 4.4+ PHP 5.2.4+ v1.0.2 上架:2018-06-25

內容簡介

Feature Image Extended 是一個擴展特色圖像功能的 WordPress 外掛,可以實現以下功能:

隱藏所有文章類型的特色圖像。
為特色圖像添加連結。
在管理頁面的文章列表中添加縮略圖。
快速編輯特色圖像。

使用方法

安裝外掛後,你可以通過以下方式控制外掛的設置:

通過編程方式使用 featured_image_extended_settings 過濾器(參見下文)。
使用「設置」-「特色圖像擴展」管理頁面。

如果你的佈景主題使用不同於 the_post_thumbnail()/get_the_post_thumbnail() 的調用方式來獲取特色圖像,那麼這個外掛可能無法正常工作。
為了獲取擴展的特色圖像設置並應用於你的頁面,你應該使用 featured_image_extended() (參見下文)。

API

featured_image_extended( integer $post_id = null )

返回包含 $post_id 文章(如果未提供參數則為當前文章)的擴展特色圖像信息的數組,格式如下:

array(
'show' => true,
'url' => 'https://myurl.com',
'target' => '_blank',
'title' => 'Image title',
)

鉤子

featured_image_extended_settings

過濾外掛設置值。

apply_filters( 'featured_image_extended_settings', array $settings )

featured_image_extended_admin_settings

過濾器,允許在管理頁面顯示或隱藏外掛的設置欄。

apply_filters( 'featured_image_extended_admin_settings', boolean $display )

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0.2) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Featured Image Extended」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Feature Image Extended extends featured image functionality allowing:

Hiding featured image in your themes for all post types.
Adding link to the featured image.
Adding thumbnail featured image in administration screens listing.
Featured image quick-editing.

Usage
Once the plugin is installed you can control settings in the following ways:

Programmatically by using featured_image_extended_settings filter (see below).
Using the Settings->Featured Image Extended administration screen.

If your theme uses a different call other than the_post_thumbnail()/get_the_post_thumbnail() in order to get the featured image, this plugin might not work.
So, in order to get extended featured image settings and apply to your pages, you should use featured_image_extended() (see below).
API
featured_image_extended( integer $post_id = null )
It returns an array containing featured image extended information of $post_id post (or current post if you don’t supply an argument) like following:
array(
'show' => true,
'url' => 'https://myurl.com',
'target' => '_blank',
'title' => 'Image title',
)

Hooks
featured_image_extended_settings
Filter plugin settings values.
apply_filters( 'featured_image_extended_settings', array $settings )

featured_image_extended_admin_settings
Filter allowing to display or not the plugin settings page in the administration.
apply_filters( 'featured_image_extended_admin_settings', boolean $display )

延伸相關外掛

文章
Filter
Mastodon