Advertisement
Guest User

Class my extension

a guest
Jul 20th, 2012
896
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.33 KB | None
  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. }
Advertisement
RAW Paste Data Copied
Advertisement