本文整理汇总了PHP中RWMB_Image_Field::normalize_field方法的典型用法代码示例。如果您正苦于以下问题:PHP RWMB_Image_Field::normalize_field方法的具体用法?PHP RWMB_Image_Field::normalize_field怎么用?PHP RWMB_Image_Field::normalize_field使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RWMB_Image_Field
的用法示例。
在下文中一共展示了RWMB_Image_Field::normalize_field方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
/**
* Normalize parameters for field
*
* @param array $field
*
* @return array
*/
static function normalize_field($field)
{
$field['js_options'] = array('runtimes' => 'html5,silverlight,flash,html4', 'file_data_name' => 'async-upload', 'browse_button' => $field['id'] . '-browse-button', 'drop_element' => $field['id'] . '-dragdrop', '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'), 'multipart' => true, 'urlstream_upload' => true, 'filters' => array(array('title' => _x('Allowed Image Files', 'image upload', 'meta-box'), 'extensions' => 'jpg,jpeg,gif,png')), 'multipart_params' => array('field_id' => $field['id'], 'action' => 'rwmb_plupload_image_upload'));
$field = parent::normalize_field($field);
return $field;
}
示例2:
/**
* Normalize parameters for field
*
* @param array $field
*
* @return array
*/
static function normalize_field($field)
{
$field = parent::normalize_field($field);
$field['multiple'] = false;
return $field;
}