开发者 | mboynes |
---|---|
更新时间 | 2014年4月25日 13:24 |
捐献地址: | 去捐款 |
PHP版本: | 3.6 及以上 |
WordPress版本: | 3.9 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
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).
/wp-content/plugins/
directorypti_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';
For now, yes. The next version will come with a GUI.
Not at all! If you want more functionality, check out SuperCPT, which helps you create custom post types, custom taxonomies, and add meta boxes.
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'll need an admin-only CSS file). You can leave the paths the same if you don't plan on uninstalling the plugin (you can still deactivate the plugin). If you want to uninstall it, you'll have to copy the fonts to your theme/plugin and change the paths in the CSS.
Yes. Add add_filter( 'pti_plugin_show_admin_menu', '__return_false' );
in your theme/plugin.