I created my custom plugin and want to add custom logo, but somehow it keeps redirecting me to wrong dir, this is error I get:
GET http://localhost/logo.png 404 (Not Found)
Here is what I tried so far:
$plugin_dir = str_replace( $base_url, ABSPATH, $plugins_url );
$plugin_dir = plugins_url();
$plugin_dir = plugin_dir_path( __FILE__ );
$plugin_dir = WP_CONTENT_DIR . '/plugins';
$plugin_dir = plugins_url( '/', __FILE__ );
Here is my add action:
function kalbos_modifymenu() {
add_menu_page('Kalbos', //page title
'Kalbos', //menu title
'manage_options', //capabilities
'kalbos_list', //menu slug
'kalbos_list', //function
$plugin_dir . 'logo.png',
'5'
);
}
add_action('admin_menu','kalbos_modifymenu');
However icon is working when i move my logo to wp-admin/logo.png dir because thats where my logo path goes even if i set it go to my plugin folder