Àpèjúwe
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Ìtumọ̀ Yorùbá: ’t use it.
This adds a function you can use, pti_set_post_type_icon( $post_type, $icon ); to set your post typeÌtumọ̀ Yorùbá: ’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Ìtumọ̀ Yorùbá: ’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).
Àwọn àwòrán ìbòjú
Ìgbéwọlẹ̀
- Upload to the
/wp-content/plugins/directory - Activate the plugin through the ‘Plugins’ menu in WordPress
- Figure out which icon you want to use. Go to Tools → Post Type Icons page for a reference.
- In your theme or a plugin, set the icons in one of the following ways:
a. Call the functionpti_set_post_type_icon( $post_type, $icon_name );, e.g.pti_set_post_type_icon( 'event', 'calendar' );
b. Using the global variable$pti_icons, set the array key => value pair such that'post_type' => 'icon-name', e.g.$GLOBALS['pti_icons']['event'] = 'calendar';
FAQ
- Do I have to write code/edit my theme to use this plugin?
-
For now, yes. The next version will come with a GUI.
- Does this do anything besides add icons?
-
Not at all! If you want more functionality, check out SuperCPT, which helps you create custom post types, custom taxonomies, and add meta boxes.
- I set my icons and theyÌtumọ̀ Yorùbá: ’re never going to change. Is there a way to remove the plugin overhead and make it static?
-
Sure thing! The plugin pretty much just adds CSS to the admin which get added to the document head. Move those to your theme/plugin (not your main style.css since this is the admin panel, youÌtumọ̀ Yorùbá: ’ll need an admin-only CSS file). You can leave the paths the same if you donÌtumọ̀ Yorùbá: ’t plan on uninstalling the plugin (you can still deactivate the plugin). If you want to uninstall it, youÌtumọ̀ Yorùbá: ’ll have to copy the fonts to your theme/plugin and change the paths in the CSS.
- I donÌtumọ̀ Yorùbá: ’t want my client seeing the Post Type Icons page in the admin, can I remove it?
-
Yes. Add
add_filter( 'pti_plugin_show_admin_menu', '__return_false' );in your theme/plugin.
Àwọn àgbéyẹ̀wò
Àwọn Olùkópa & Olùgbéejáde
“Post Type Icons” jẹ́ ètò ìṣàmúlò orísun ṣíṣí sílẹ̀. Àwọn ènìyàn wọ̀nyí ti ṣe ìkópa sí plugin yìí.
Àwọn OlùkópaTúmọ̀ “Post Type Icons” sí èdè rẹ.
Ṣe o nífẹ̀ẹ́ sí ìdàgbàsókè?
Ṣàwárí koodu, ṣàyẹ̀wò ibi ìpamọ́ SVN, tàbí ṣe àgbékalẹ̀ sí àkọsílẹ̀ ìdàgbàsókè nípasẹ̀ RSS.
Àkọsílẹ̀ àwọn àyípadà
0.2.2
- Fixing issue with multiple post types
0.2.1
- Readme update
0.2
- FontAwesome 4.0.3 update
- Fixed PHP 5.2 error
0.1.1
Removed assets from trunk

