快速编辑
Ashuwp Framework框架在6.0以上版本后,自定义字段支持添加到快速编辑中。
效果图1:

效果图2:

添加方法:
在自定义字段的配置数组中,添加
简单范例:
- $meta_conf = array(
- 'title' => 'Meta box example',
- 'id'=>'example_box',
- 'page'=>array('page','post'),
- 'context'=>'normal',
- 'priority'=>'low'
- );
- $ashu_meta = array();
- $ashu_meta[] = array(
- 'name' => 'Input Example',
- 'id' => 'text_example',
- 'desc' => 'A text input example, Default content:"Hello ashuwp."',
- 'std' => 'Hello ashuwp.',
- 'type' => 'text',
- 'quick_edit'=>true
- );
- $ashu_meta[] = array(
- 'name' => 'Textarea Example',
- 'id' => 'textarea_example',
- 'desc' => 'A textarea example, Default content:"Default content."',
- 'std' => 'Default content.',
- 'type' => 'textarea'
- );
- $new_box = new ashuwp_postmeta_feild($ashu_meta, $meta_conf);
注意:
1. 快速编辑目前仅文章自定义字段可用,分类字段暂不支持。
2. 快速编辑仅支持文本框、文本域等,即type的类型为'text', 'numbers_array', 'color', 'radio', 'checkbox', 'textarea', 'select'可用。