Esempio n. 1
0
 /**
  * Enqueue scripts and styles
  *
  * @return void
  */
 static function admin_enqueue_scripts()
 {
     parent::admin_enqueue_scripts();
     add_thickbox();
     wp_enqueue_script('media-upload');
     wp_enqueue_script('rwmb-thickbox-image', RWMB_JS_URL . 'thickbox-image.js', array('jquery'), RWMB_VER, true);
 }
Esempio n. 2
0
 /**
  * Enqueue scripts and styles
  *
  * @return void
  */
 static function admin_enqueue_scripts()
 {
     // Enqueue same scripts and styles as for file field
     parent::admin_enqueue_scripts();
     wp_enqueue_style('rwmb-plupload-image', RWMB_CSS_URL . 'plupload-image.css', array('wp-admin'), RWMB_VER);
     wp_enqueue_script('rwmb-plupload-image', RWMB_JS_URL . 'plupload-image.js', array('jquery-ui-sortable', 'wp-ajax-response', 'plupload-all'), RWMB_VER, true);
     wp_localize_script('rwmb-plupload-image', 'rwmb', array('url' => WPSIGHT_METABOX_URL));
     wp_localize_script('rwmb-plupload-image', 'rwmb_plupload_defaults', array('runtimes' => 'html5,silverlight,flash,html4', 'file_data_name' => 'async-upload', 'multiple_queues' => true, 'max_file_size' => wp_max_upload_size() . 'b', 'url' => admin_url('admin-ajax.php'), 'flash_swf_url' => includes_url('js/plupload/plupload.flash.swf'), 'silverlight_xap_url' => includes_url('js/plupload/plupload.silverlight.xap'), 'filters' => array(array('title' => _x('Allowed Image Files', 'image upload', 'wpsight'), 'extensions' => 'jpg,jpeg,gif,png')), 'multipart' => true, 'urlstream_upload' => true));
 }