[WordPress] 外掛分享: Post Type Icons

首頁外掛目錄 › Post Type Icons
WordPress 外掛 Post Type Icons 的封面圖片
100+
安裝啟用
★★★★
4.6/5 分(5 則評價)
4346 天前
最後更新
問題解決
WordPress 3.6+ v0.2.2 上架:2013-06-20

內容簡介

推釘圖標是否無法描述您的自訂文章類型?這裡有數百個可供選擇的圖標。這些圖標是遵循 GPL 授權的 Font Awesome Icons。

這是和 SuperCPT 0.2+ 相同的圖標功能,但是為了那些不使用該插件的使用者而從該插件中移出。

這會新增一個可使用的函式 pti_set_post_type_icon( $post_type, $icon ); 來設置您的文章類型圖標。例如,pti_set_post_type_icon( 'event', 'calendar' );。您也可以將全域變數 $pti_icons 設置為一個包含文章類型 => 圖標名稱的陣列。使用全域變數更安全,因為它不依賴於函式(當然,您可以呼叫 if ( function_exists( 'pti_set_post_type_icons' ) ) 來使用該函式時也一樣安全)。

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.2.2) 或搜尋安裝

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

原文外掛簡介

Does the pushpin not describe your custom post type? Here are hundreds more icons to choose from. Icons are the GPL-compatible Font Awesome Icons.
This is the same icon features that comes with SuperCPT 0.2+, but pulled out of the plugin for those crazy birds who don’t use it.
This adds a function you can use, pti_set_post_type_icon( $post_type, $icon ); to set your post type’s icon. For instance, pti_set_post_type_icon( 'event', 'calendar' );. You can also set the global variable $pti_icons as an array of post type => icon names. Using the global variable is safer, since it doesn’t rely on a function (you could of course call if ( function_exists( 'pti_set_post_type_icons' ) ) to be equally safe using the function).

文章
Filter
Apply Filters
Mastodon