SHARE
TWEET

Class my extension

a guest Jul 20th, 2012 797 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class myExtension_Admin{
  2.         function __ construct() {
  3.                 add_action( 'admin_enqueue_scripts', array( &$this, 'addRessources' ) );
  4.         }
  5.  
  6.         function addRessources($hook) {
  7.                 if( $hook == 'macondition de page de hook' ) {
  8.                 wp_enqueue_script('mon-script', ME_URL.'/ressources/js/mon-fichier-js.js', array(  ), '1.0', true);
  9.                 }
  10.         }
  11. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top