Wickeln Sie Twitter-Bootstrap in ein benutzerdefiniertes WordPress-Plugin ein

Ich versuche, Bootstrap in meinem benutzerdefinierten WordPress-Plugin zu verwenden, aber es scheint, als ob der gesamte Administrationsbereich durch Folgendes unterbrochen wird

class MyPlugin{
 public function iniAdmin(){
        add_action('admin_menu', array($this, 'register_collections_menu_page'));
        add_action( 'admin_init', array($this,'style_bootstrap' ));
    }
    public function style_bootstrap(){
        wp_enqueue_script( 'jquery', '//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js', array('jquery'), '1.9.1', true); // we need the jquery library for bootsrap js to function
        wp_enqueue_script( 'bootstrap-js', '//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js', array('jquery'), true); // all the bootstrap javascript goodness
        wp_enqueue_style( 'bootstrap', '//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css' );
    }

}

$collections_settings = new MyPlugin();
if (is_admin()){
    $collections_settings->iniAdmin();
}

Wie man einen Bootstrap-Stil in einem WordPress-Plugin korrekt umschließt

Antworten auf die Frage(1)

Ihre Antwort auf die Frage