/** */ public function init_scripts() { parent::init_scripts(); if (is_admin()) { // slurp admin script $this->script()->section('admin')->cache('template', 'template.js'); } }
/** */ public function init_scripts() { parent::init_scripts(); if (is_admin()) { // need uploader plugin, ajax response, image editor scripts nxt_enqueue_script('ice-uploader'); nxt_enqueue_script('nxt-ajax-response'); nxt_enqueue_script('image-edit'); // localize the upload wrapper $this->localize_script(); } }