dimanche 30 novembre 2014

How can I add few css or js file into my plugin


I want do add few cs and js file into my plugin in admin panel. I create function style:



function style() {
wp_enqueue_style ( 'my-admin-theme', plugins_url ( 'style.css', __FILE__ ) );
wp_enqueue_script ( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js', array (), '1.0.0', true );
wp_enqueue_script ( 'uploadfile', 'http://hayageek.github.io/jQuery-Upload-File/jquery.uploadfile.min.js', array (), '1.0.0', true );

}

add_action( 'wp_enqueue_scripts', 'jquery' );
add_action( 'wp_enqueue_scripts', 'uploadfile' );
add_action ( 'admin_enqueue_scripts', 'style' );
add_action ( 'login_enqueue_scripts', 'style' );


When I check source code I see only style.css jquery.uploadfile.min.js. What is wrong ?


King regards





Aucun commentaire:

Enregistrer un commentaire