当前位置: 首页>>代码示例>>PHP>>正文


PHP RWMB_Image_Field::admin_print_styles方法代码示例

本文整理汇总了PHP中RWMB_Image_Field::admin_print_styles方法的典型用法代码示例。如果您正苦于以下问题:PHP RWMB_Image_Field::admin_print_styles方法的具体用法?PHP RWMB_Image_Field::admin_print_styles怎么用?PHP RWMB_Image_Field::admin_print_styles使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RWMB_Image_Field的用法示例。


在下文中一共展示了RWMB_Image_Field::admin_print_styles方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

 /**
  * Enqueue scripts and styles
  *
  * @return void
  */
 static function admin_print_styles()
 {
     global $post;
     // Enqueue same scripts and styles as for file field
     parent::admin_print_styles();
     wp_enqueue_script('plupload-all');
     wp_enqueue_style('rwmb-plupload-image', RWMB_CSS_URL . 'plupload-image.css', array(), 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);
     //Heartcode Canvas Loader
     wp_enqueue_script('heartcode-canvasloader', 'http://heartcode-canvasloader.googlecode.com/files/heartcode-canvasloader-min-0.9.1.js');
     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', RWMB_TEXTDOMAIN), 'extensions' => 'jpg,gif,png')), 'multipart' => true, 'urlstream_upload' => true, 'multipart_params' => array('_ajax_nonce' => wp_create_nonce('plupload_image'), 'action' => 'plupload_image_upload', 'post_id' => $post->ID)));
     //Links to loading and error images to allow preloading
     wp_localize_script('rwmb-plupload-image', 'rwmb_plupload_status_icons', array('error' => RWMB_URL . "img/image-error.gif", 'loading' => RWMB_URL . "img/loading.gif"));
 }
开发者ID:hunghoang179,项目名称:sitenews,代码行数:19,代码来源:plupload-image.php


注:本文中的RWMB_Image_Field::admin_print_styles方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。