Rahul
Rahul

Reputation: 33

How can i set icon on custom plugin in wordpress

I have already create my custom plugin but wordpress show me default icon in dashboard. So how can i change plugin icon? i have try to :

<? /*
      Plugin Name: Rawin Plugin
      Description: Plugin for testing purpose 
      Version: 1
      Author: Rahul Dabhi
      Author URI: 
     */
?>

can i change in this section? please answer me as soon as possible. Thank you

Upvotes: 2

Views: 3080

Answers (1)

shabbir fakira
shabbir fakira

Reputation: 28

Take a close look at add_menu_page hook, it provides argument to supply with icon 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' 
);

Upvotes: 1

Related Questions