嗨我似乎无法在管理页面上的插件中加载bootstrap,这是我的代码。我做错了什么?
function add_admin_page () {
$settingsPage = add_options_page('Course Listing Page','Course Listings', 'manage_options', 'admin-course-listing', 'admin_page');
}
add_action('admin_menu', 'add_admin_page');
function loadBootstrap() {
wp_register_script( 'bootstrap-js', plugins_url('', __FILE__) . '/js/bootstrap.js' );
wp_register_style( 'bootstrap-css', plugins_url('', __FILE__) . '/css/bootstrap.css' );
wp_enqueue_script( 'bootstrap-js' );
wp_enqueue_style( 'bootstrap-css' );
}
function admin_page() {
add_action( 'admin_enqueue_scripts', 'loadBootstrap' );
//other code relating to admin stuff
}