我已经创建了自定义插件,但wordpress在仪表板中显示默认图标。那我怎么能改变插件图标呢? 我试着:
<? /*
Plugin Name: Rawin Plugin
Description: Plugin for testing purpose
Version: 1
Author: Rahul Dabhi
Author URI:
*/
?>
我可以在这部分进行更改吗?请尽快回答我。 谢谢
答案 0 :(得分:0)
仔细查看add_menu_page钩子,它提供了带有图标URL的参数
<?php
add_menu_page(
$page_title,
$menu_title,
$capability,
$menu_slug,
$function,
$icon_url,
$position
);
http://codex.wordpress.org/Function_Reference/add_menu_page
add_menu_page(
__('Poll','menu-test'),
__('Poll','menu-test'),
'manage_options',
'manage-polls',
'poll_page',
'plugins_folder Or Theme folder url/icon.png'
);