In case you only want Bootstrap in your plugin menu page. Use $hook = add_menu_page()
instead of add_menu_page()
. And use that hook to load any styles, scripts
add_action( 'admin_menu', 'register_page');
function register_page()
{
$my_hook = add_menu_page( 'tab title', 'page title', 'manage_options', 'my-page-slug', 'callback_function', 'dashicons-cloud', 1 );
add_action( 'load-'.$my_hook, load_scripts );
}
function load_scripts ()
{
add_action( 'admin_enqueue_scripts', 'enqueue_bootstrap' );
}
function enqueue_bootstrap()
{
$path = plugins_url( 'my_plugin/inc/css/bootstrap.min.css' ); //use your path of course
$dependencies = array(); //add any depencdencies in array
$version = false; //or use a version int or string
wp_enqueue_style( 'myplugin-bootstrap', $path, $dependencies, $version );
}