WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] New menu after appearance (2 posts)

  1. DarkWolf
    Member
    Posted 3 years ago #

    Hi! I've this string in my plugin:

    $plugin_page = add_menu_page(__('My Custom CSS Panel','mccss'),__('My Custom CSS','mccss'), 'manage_options', 'my_custom_css', 'mccss_options');

    But how i can put it immediately after Appearance menu and before "Plugins"?

    And how i can put a custom icon?

    Thanks in advance, DarkWolf :)

  2. DarkWolf
    Member
    Posted 3 years ago #

    Edit: ok, fixed :)

    function mccss_admin() {
    	$icon_url = WP_PLUGIN_URL."/".str_replace(basename( __FILE__),"",plugin_basename(__FILE__))."css-icon.png";
    	$plugin_page = add_menu_page(__('My Custom CSS Panel','mccss'),__('My Custom CSS','mccss'), 'manage_options', 'my_custom_css', 'mccss_options', $icon_url, 64);
    	add_action( 'admin_init', 'register_settings_mccss' );
    	add_action( 'admin_head-'. $plugin_page, 'mccss_syntax' );
    }

Topic Closed

This topic has been closed to new replies.

About this Topic