內容簡介
推釘圖標是否無法描述您的自訂文章類型?這裡有數百個可供選擇的圖標。這些圖標是遵循 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' ) ) 來使用該函式時也一樣安全)。
外掛標籤
開發者團隊
原文外掛簡介
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).
