File: /var/www/html/wp-content/themes/wujin/admin/config-example.php
<?php
/**
*Version: 6.0
**/
/**
*
*post meta test
*
**/
/*****Meta Box********/
$meta_conf = array(
'title' => '文章SEO设置',
'id'=>'example_box',
'page'=>array('page','post'),
'context'=>'normal',
'priority'=>'low'
);
$seo_meta = array();
$seo_meta[] = array(
'name' => '文章SEO标题',
'id' => 'wzseotit',
'desc' => '文章SEO标题(可不写)',
'std'=> '',
'type' => 'text',
//'quick_edit'=>true //quick_edit
);
$seo_meta[] = array(
'name' => '文章SEO描述',
'id' => 'wzseodes',
'desc' => '文章SEO描述(可不写)',
'std'=> '',
'type' => 'textarea'
);
$seo_meta[] = array(
'name' => '文章SEO关键词',
'id' => 'wzseokeys',
'desc' => '文章SEO关键词(多个用英文逗号隔开)',
'std'=> '',
'type' => 'text'
);
$new_box = new wpmbg_postmeta_feild($seo_meta, $meta_conf);
/**子选项一**/
$tab_conf =array();
$tab_meta = array();
$tab_conf = array(
'title' => '信息填写',
'id'=>'tab_box',
'page'=>array('post'),
'context'=>'normal',
'priority'=>'low',
'tab'=>true
);
$tab_meta[] = array(
'name' => '基本内容',
'id' => 'tab_first',
'type' => 'open'
);
$tab_meta[] = array(
'name' => '产品图上传',
'id' => 'imgzuurl',
'desc' => '',
'std'=> '',
'button_text' => '上传文件',
'type' => 'gallery'
);
/*
$tab_meta[] = array(
'name'=> '文章类型',
'id'=> 'leixing',
'desc'=> '',
//'std' => array('apple','orange'),
'subtype' => array(
'lunbo'=> '轮播',
'toutiao' => '头条',
'tuijian' => '推荐',
),
'type'=> 'checkbox',
'quick_edit'=>true,
'multiple'=> false
);
$tab_meta[] = array(
'name'=> '古登堡页面',
'id'=> 'gudengbao',
'desc'=> '需要打开函数',
'std' => '0',
'subtype' => array(
'1'=> '是',
'0'=> '否',
),
'type'=> 'radio',
'multiple'=> false
);
$tab_meta[] = array(
'name' => '产品价格',
'id' => 'jingyan',
'desc' => '',
'std'=> '',
'type' => 'text',
//'quick_edit'=>true(显示在后台文章列表)
);
$tab_meta[] = array(
'name' => '内容概要',
'id' => 'wzjianjie',
'desc' => '内容简介,非必填项。',
'std'=> '',
'type' => 'textarea',
);
$tab_meta[] = array(
'name' => '文件上传',
'id' => 'upload_img',
'desc' => '',
'std'=> '',
'button_text' => '上传',
'type' => 'upload'
);
$tab_meta[] = array(
'name' => '产品图上传',
'id' => 'imgzuurl',
'desc' => '',
'std'=> '',
'button_text' => '上传文件',
'type' => 'gallery'
);
$tab_meta[] = array(
'name'=> '编辑器',
'id'=> 'tinymce_example',
'desc'=> '',
'std' => '',
'media' => 1,
'type'=> 'tinymce'
);
$tab_meta[] = array(
'name' => '产品参数(点击增加)',
'id' => 'procanshu',
'desc' => '',
'std'=> '',
'subtype' => array(
array(
'name' => '参数名称',
'id' => 'title',
'std'=> '',
'type' => 'text'
),
array(
'name' => '参数值',
'id' => 'title2',
'std'=> '',
'type' => 'text'
),
),
'multiple' => true,
'type' => 'group'
);
$tab_meta[] = array(
'name' => '产品颜色',
'id' => 'colorarr',
'desc' => '',
'std'=> '',
'type' => 'color',
'multiple' => true,
);
$tab_meta[] = array(
'name' => '颜色提示文字',
'id' => 'colorarrts',
'desc' => '与上面颜色一一对应,用英文逗号隔开',
'std'=> '',
'type' => 'numbers_array',
);
********************
颜色调用:
<?php
$colorarr = get_post_meta($post->ID,'colorarr',true);
$colorarrts = get_post_meta($post->ID,'colorarrts',true) ? get_post_meta($post->ID,'colorarrts',true) : array();
if(is_array($colorarr)){?>
<?php for($i=1;$i<=count($colorarr);$i++){?>
<i style="background:<?php echo $colorarr[$i];?>" title="<?php echo $colorarrts[$i-1];?>"></i>
<?php }}?>
****************************
$tab_meta[] = array(
'name'=> '单选框',
'id'=> 'radio_example',
'desc'=> '',
'std' => 'thirdness',
'subtype' => array(
'male'=> 'Male',
'female'=> 'Female',
'thirdness' => 'Third gender'
),
'type'=> 'radio',
'multiple'=> false
);
$tab_meta[] = array(
'name'=> '多选框',
'id'=> 'checkbox_example',
'desc'=> '',
'std' => array('apple','orange'),
'subtype' => array(
'apple'=> 'Apple',
'orange' => 'Orange',
'banana' => 'Banana',
'lemon'=> 'Lemon'
),
'type'=> 'checkbox',
'multiple'=> false
);
$tab_meta[] = array(
'name'=> '下拉框',
'id'=> 'select_example',
'desc'=> '',
'std' => '',
'subtype' => array(
'male'=> 'Male',
'female'=> 'Female',
'thirdness' => 'Third gender'
),
'type'=> 'select',
'multiple'=> false
);
$tab_meta[] = array(
'type' => 'close'
);
*/
/**子选项二**/
/*
$tab_meta[] = array(
'name' => '高级内容',
'id' => 'tab_second',
'type' => 'open'
);
$tab_meta[] = array(
'name' => '添加更多文本输入框',
'id' => 'text_multiple_example',
'desc' => '将“multiple”设置为true,则字段为“multiple”.',
'std'=> '',
'multiple' => true,
'type' => 'text'
);
$tab_meta[] = array(
'name' => '图片输入和上传',
'id' => 'input_upload',
'desc' => '',
'std'=> '',
'subtype' => array(
array(
'name' => 'Title',
'id' => 'title',
'desc' => '图片标题.',
'std'=> '',
'type' => 'text'
),
array(
'name' => 'Link',
'id' => 'link',
'desc' => '图片链接地址(需包含http://)',
'std'=> '',
'type' => 'text'
),
array(
'name' => 'Image',
'id' => 'image',
'desc' => '请上传图片或者填写文件URL.',
'std'=> '',
'button_text' => '上传',
'type' => 'upload'
),
),
'type' => 'group'
);
$tab_meta[] = array(
'name' => '添加更多输入和上传框',
'id' => 'input_upload_multiple',
'desc' => '',
'std'=> '',
'subtype' => array(
array(
'name' => 'Title',
'id' => 'title',
'desc' => '图片标题.',
'std'=> '',
'type' => 'text'
),
array(
'name' => 'Link',
'id' => 'link',
'desc' => '图片链接地址(需包含http://)',
'std'=> '',
'type' => 'text'
),
array(
'name' => 'Image',
'id' => 'image',
'desc' => '请上传图片或者填写文件URL.',
'std'=> '',
'button_text' => '上传',
'type' => 'upload'
),
),
'multiple' => true,
'type' => 'group'
);
$tab_meta[] = array(
'type' => 'close'
);
*/
$tab_box = new wpmbg_postmeta_feild($tab_meta, $tab_conf);
$pagemeta_conf = array(
'title' => '页面BANNER图',
'id'=>'pagebanimg_box',
'page'=>array('page'),
'context'=>'normal',
'priority'=>'low'
);
$ashu_pagemeta = array();
$ashu_pagemeta[] = array(
'name' => '设备仪器添加',
'id' => 'shebei',
'desc' => '',
'std'=> '',
'subtype' => array(
array(
'name' => '标题',
'id' => 'title',
'desc' => '图片标题.',
'std'=> '',
'type' => 'text'
),
array(
'name' => 'Image',
'id' => 'image',
'desc' => '请上传图片或者填写文件URL.',
'std'=> '',
'button_text' => '上传',
'type' => 'upload'
),
),
'multiple' => true,
'type' => 'group'
);
$ashu_pagemeta[] = array(
'name' => '企业文化添加',
'id' => 'wenhua',
'desc' => '',
'std'=> '',
'subtype' => array(
array(
'name' => '标题',
'id' => 'title',
'desc' => '图片标题.',
'std'=> '',
'type' => 'text'
),
array(
'name' => '简介',
'id' => 'des',
'desc' => '简介.',
'std'=> '',
'type' => 'text'
),
array(
'name' => 'Image',
'id' => 'image',
'desc' => '请上传图片或者填写文件URL.',
'std'=> '',
'button_text' => '上传',
'type' => 'upload'
),
),
'multiple' => true,
'type' => 'group'
);
$ashu_pagemeta[] = array(
'name' => '研发能力添加',
'id' => 'yanfa',
'desc' => '',
'std'=> '',
'subtype' => array(
array(
'name' => '简介',
'id' => 'des',
'desc' => '简介.',
'std'=> '',
'type' => 'text'
),
array(
'name' => 'Image',
'id' => 'image',
'desc' => '请上传图片或者填写文件URL.',
'std'=> '',
'button_text' => '上传',
'type' => 'upload'
),
),
'multiple' => true,
'type' => 'group'
);
$ashu_pagemeta[] = array(
'name' => 'BANNER图上传',
'id' => 'pageban_img',
'desc' => '请上传文件或者填写文件URL.',
'std'=> '',
'button_text' => '上传',
'type' => 'upload'
);
$pagenew_box = new wpmbg_postmeta_feild($ashu_pagemeta, $pagemeta_conf);
/**
*
*taxonomy feild test
*
**/
/*****taxonomy feild ******/
$ashu_feild = array();
$taxonomy_cof = array('category','post_tag');
$ashu_feild[] = array(
'name'=> 'SEO标题',
'id'=> 'cattitle',
'desc'=> '填写分类的SEO标题(可不写).',
'std' => '',
'edit_only' => false,
'type'=> 'text'
);
$ashu_feild[] = array(
'name'=> 'SEO描述',
'id'=> 'catdes',
'desc'=> '填写分类的SEO描述(可不写).',
'std' => '',
'edit_only' => false,
'type'=> 'textarea'
);
$ashu_feild[] = array(
'name'=> 'SEO关键词',
'id'=> 'catkeys',
'desc'=> '填写分类的SEO关键词(多个用英文逗号隔开).',
'std' => '',
'edit_only' => false,
'type'=> 'text'
);
$ashu_feild[] = array(
'name' => '分类BANNER图片上传',
'id' => 'catbannerimg',
'desc' => '这里是分类BANNER图片上传。',
'std'=> '',
'button_text' => '上传',
'type' => 'upload'
);
/*
$ashu_feild[] = array(
'name' => '分类特色图片上传',
'id' => 'catimg',
'desc' => '这里是分类的封面图片上传。尺寸:280px*280px.',
'std'=> '',
'button_text' => '上传',
'type' => 'upload'
);
$ashu_feild[] = array(
'name'=> '分类字段',
'id'=> 'catmt',
'desc'=> '填写分类字段.',
'std' => '',
'edit_only' => false,
'type'=> 'text'
);
*/
$wpmbg_termmeta_feild = new wpmbg_termmeta_feild($ashu_feild, $taxonomy_cof);
/**
*
*Optinos page
*
**/
/**General options**/
$page_info = array(
'full_name'=> '主题设置',
'optionname' => 'general',
'child'=> false,
'desc' => '',
'filename' => 'generalpage'
);
$ashu_options = array();
$ashu_options[] = array(
'name' => 'SEO设置',
'type' => 'title'
);
$ashu_options[] = array(
'name' => '首页标题',
'id' => 'wpd_title',
'desc' => '这里是首页标题内容',
'std'=> '',
'type' => 'text'
);
$ashu_options[] = array(
'name' => '首页描述',
'id' => 'wpd_des',
'desc' => '这里是首页描述内容',
'std'=> '',
'type' => 'text'
);
$ashu_options[] = array(
'name' => '首页关键词',
'id' => 'wpd_keys',
'desc' => '这里是首页关键词,多个关键词用英文逗号隔开',
'std'=> '',
'type' => 'text'
);
$ashu_options[] = array(
'name' => '信息设置',
'type' => 'title'
);
$ashu_options[] = array(
'name' => 'BANNER文字上',
'id' => 'banwz1',
'std'=> '',
'type' => 'text'
);
$ashu_options[] = array(
'name' => 'BANNER文字下',
'id' => 'banwz2',
'std'=> '',
'type' => 'text'
);
$ashu_options[] = array(
'name' => '视频地址',
'id' => 'shipin',
'std'=> '',
'type' => 'text'
);
$ashu_options[] = array(
'name' => '电话号码',
'id' => 'tellphone',
'desc' => '这里是电话号码',
'std'=> '',
'type' => 'text'
);
$ashu_options[] = array(
'name' => '手机号码',
'id' => 'shouji',
'desc' => '这里是手机号码',
'std'=> '',
'type' => 'text'
);
$ashu_options[] = array(
'name' => 'QQ号码',
'id' => 'qqhao',
'desc' => '这里是QQ号码',
'std'=> '',
'type' => 'text'
);
$ashu_options[] = array(
'name' => 'QQ号码2',
'id' => 'qqhao2',
'desc' => '这里是QQ号码',
'std'=> '',
'type' => 'text'
);
/*
$ashu_options[] = array(
'name' => '联系人',
'id' => 'lxr',
'desc' => '这里是联系人',
'std'=> '',
'type' => 'text'
);
$ashu_options[] = array(
'name' => '微信号',
'id' => 'weixinhao',
'desc' => '这里是微信号',
'std'=> '',
'type' => 'text'
);
$ashu_options[] = array(
'name' => '微博',
'id' => 'weibo',
'desc' => '这里是微博地址',
'std'=> '',
'type' => 'text'
);
*/
$ashu_options[] = array(
'name' => '电子邮箱',
'id' => 'email',
'desc' => '这里是电子邮箱',
'std'=> '',
'type' => 'text'
);
$ashu_options[] = array(
'name' => '公司地址',
'id' => 'dizhi',
'desc' => '这里是公司地址',
'std'=> '',
'type' => 'text'
);
$ashu_options[] = array(
'name' => 'ICP备案号',
'id' => 'beianhao',
'desc' => '这里是ICP备案号',
'std'=> '',
'type' => 'text'
);
$ashu_options[] = array(
'name' => '公安备案号',
'id' => 'gabeianhao',
'desc' => '这里是公安备案号',
'std'=> '',
'type' => 'text'
);
$ashu_options[] = array(
'name' => '公安备案链接',
'id' => 'gabeianhaolink',
'desc' => '这里是公安备案链接',
'std'=> '',
'type' => 'text'
);
$ashu_options[] = array(
'name' => '是否留言功能',
'id' => 'isliuyan',
'desc' => '如果前台有留言表单,这里选择是',
'std' => '2',
'subtype' => array(
'1' => '是',
'2' => '否',
),
'type' => 'radio',
'multiple' => false
);
/*
$ashu_options[] = array(
'name' => '首页数字',
'id' => 'fshuzi',
'desc' => '首页数字,用英文逗号隔开',
'std'=> '',
'type' => 'numbers_array'
);
调用:<?php $fshuzi = $general_options['fshuzi'] ? $general_options['fshuzi'] : array("700","600","80","3000"); ?>
<?php $fshuzi = $general_options['fshuzi'] ;?>
<?php if($fshuzi){echo $fshuzi[1];}else{echo '169';}?>
*/
$ashu_options[] = array(
'name' => '百度地图X轴标',
'id' => 'xmap',
'desc' => '这里是百度地图X轴标 <a href="https://api.map.baidu.com/lbsapi/getpoint/index.html" target="_blank">(查坐标)</a>',
'std'=> '117.072436',
'type' => 'text'
);
$ashu_options[] = array(
'name' => '百度地图Y轴标',
'id' => 'ymap',
'desc' => '这里是百度地图Y轴标',
'std'=> '36.699557',
'type' => 'text'
);
/*
$ashu_options[] = array(
'name' => '热搜关键词',
'id' => 'scwords',
'desc' => '这里是热搜关键词,显示在搜索框下,多个词用,隔开',
'std'=> '',
'type' => 'numbers_array'
);
*/
/*
$ashu_options[] = array(
'name' => 'Google分享',
'id' => 'google',
'desc' => '这里是Google分享链接',
'std'=> '',
'type' => 'text'
);
$ashu_options[] = array(
'name' => 'Facebook分享',
'id' => 'facebook',
'desc' => '这里是facebook分享链接',
'std'=> '',
'type' => 'text'
);
$ashu_options[] = array(
'name' => 'Twitter分享',
'id' => 'twitter',
'desc' => '这里是twitter分享链接',
'std'=> '',
'type' => 'text'
);
$ashu_options[] = array(
'name' => 'Youtube分享',
'id' => 'youtube',
'desc' => '这里是youtube分享链接',
'std'=> '',
'type' => 'text'
);
$ashu_options[] = array(
'name' => 'Linkdin分享',
'id' => 'linkdin',
'desc' => '这里是linkdin分享链接',
'std'=> '',
'type' => 'text'
);
*/
$ashu_options[] = array(
'name' => '首页设置',
'type' => 'title'
);
$ashu_options[] = array(
'name' => '产品中心分类ID',
'id' => 'catid01',
'desc' => '',
'std'=> '',
'type' => 'text'
);
$ashu_options[] = array(
'name' => '应用领域分类ID',
'id' => 'catid02',
'desc' => '',
'std'=> '',
'type' => 'text'
);
$ashu_options[] = array(
'name' => '新闻资讯分类ID',
'id' => 'catid03',
'desc' => '',
'std'=> '',
'type' => 'text'
);
$ashu_options[] = array(
'name' => '质量控制pageID',
'id' => 'catid04',
'desc' => '',
'std'=> '',
'type' => 'text'
);
/*
$ashu_options[] = array(
'name' => '用户反馈ID',
'id' => 'catidfankui',
'desc' => '这里是用户反馈ID',
'std'=> '',
'type' => 'text'
);
*/
$ashu_options[] = array(
'name' => '产品列表展示ID',
'id' => 'tuwenarr',
'desc' => '这是设置分类页,以产品列表展示的分类ID,多个ID用,隔开。其余以文章列表展示',
'type' => 'numbers_array'
);
$ashu_options[] = array(
'name' => '图片列表展示ID',
'id' => 'tuwenarr2',
'desc' => '这是设置分类页,以图片列表展示的分类ID,多个ID用,隔开。其余以文章列表展示',
'type' => 'numbers_array'
);
$ashu_options[] = array(
'name' => '产品类详情分类ID',
'id' => 'prowzarr',
'desc' => '这是设置内容页,以产品详情页展示的分类ID,用,隔开。(不填写将与“图片列表展示ID”对应)',
'type' => 'numbers_array'
);
$ashu_options[] = array(
'name' => '图片类详情分类ID',
'id' => 'prowzarr2',
'desc' => '这是设置内容页,以产品详情页展示的分类ID,用,隔开。(不填写将与“图片列表展示ID”对应)',
'type' => 'numbers_array'
);
$ashu_options[] = array(
'name' => '链接设置',
'type' => 'title'
);
$ashu_options[] = array(
'name' => '关于我们URL',
'id' => 'abouturl',
'desc' => '这里是关于我们页面ULR(需带http://)',
'std'=> '',
'type' => 'text'
);
$ashu_options[] = array(
'name' => '联系我们URL',
'id' => 'contactus',
'desc' => '这里是联系我们页面ULR(需带http://)',
'std'=> '',
'type' => 'text'
);
/*
$ashu_options[] = array(
'name' => '在线留言URL',
'id' => 'liuyan',
'desc' => '这里是在线留言页面ULR(需带http://)',
'std'=> '',
'type' => 'text'
);
$ashu_options[] = array(
'name' => '用户注册URL',
'id' => 'zhuce',
'desc' => '这里是用户注册页面ULR(需带http://)',
'std'=> '',
'type' => 'text'
);
$ashu_options[] = array(
'name' => '用户登录URL',
'id' => 'denglu',
'desc' => '这里是用户登录页面ULR(需带http://)',
'std'=> '',
'type' => 'text'
);
$ashu_options[] = array(
'name' => '会员中心URL',
'id' => 'hycenter',
'desc' => '这里是会员中心页面ULR(需带http://)',
'std'=> '',
'type' => 'text'
);
*/
/*
$ashu_options[] = array(
'name' => '邮件设置',
'type' => 'title'
);
$ashu_options[] = array(
'name' => 'SMTP服务器 ',
'id' => 'smtpfwq',
'std'=> 'ssl://smtp.163.com',
'type' => 'text'
);
$ashu_options[] = array(
'name' => 'SMTP服务器端口 ',
'id' => 'smtpdk',
'std'=> '465',
'type' => 'text'
);
$ashu_options[] = array(
'name' => 'SMTP服务器的用户邮箱 ',
'id' => 'smtpuseemail',
'std'=> 'wangzhanmoban@163.com',
'type' => 'text'
);
$ashu_options[] = array(
'name' => 'SMTP服务器的用户帐号 ',
'id' => 'smtpzh',
'std'=> 'wangzhanmoban@163.com',
'type' => 'text'
);
$ashu_options[] = array(
'name' => 'SMTP服务器的用户密码 ',
'id' => 'smtpmm',
'std'=> 'XLQDNNQGQXAUEPAT',
'type' => 'text'
);
$ashu_options[] = array(
'name' => '接收邮箱 ',
'id' => 'useyouxiang',
'std'=> '',
'type' => 'text'
);
*/
$ashu_options[] = array(
'name' => '文本设置',
'type' => 'title'
);
$ashu_options[] = array(
'name' => '关于我们',
'id' => 'aboutus',
'desc' => '这里是关于我们内容',
'std'=> '',
'media' => 0,
'type'=> 'tinymce'
);
$ashu_options[] = array(
'name' => '顶部自定义代码',
'id' => 'headdaima',
'desc' => '这里可以在网页顶部放自定义代码(在“文本”模式下粘贴)',
'std'=> '',
'media' => 0,
'type'=> 'tinymce'
);
$ashu_options[] = array(
'name' => '统计代码',
'id' => 'tongjidaima',
'desc' => '这里放网站统计代码(在“文本”模式下粘贴)',
'std'=> '',
'media' => 0,
'type'=> 'tinymce'
);
/*
$ashu_options[] = array(
'name' => '广告设置',
'type' => 'title'
);
$ashu_options[] = array(
'name' => '广告1',
'id' => 'adimg1',
'desc' => '上传广告图片,尺寸1000px*90px。',
'std'=> '',
'button_text' => '上传',
'type' => 'upload'
);
$ashu_options[] = array(
'name' => '广告1链接',
'id' => 'adlink1',
'std'=> '',
'type'=> 'text'
);
*/
$ashu_options[] = array(
'name' => '图片上传',
'type' => 'title'
);
$ashu_options[] = array(
'name' => 'ICO站标',
'id' => 'favicon',
'desc' => '上传网站Favicon站标(支持ico|jpg|png),尺寸30px*30px。',
'std'=> '',
'button_text' => '上传',
'type' => 'upload'
);
$ashu_options[] = array(
'name' => '网站LOGO图片',
'id' => 'logo',
'desc' => '这里是网站LOGO上传。尺寸:80px*80px.',
'std'=> '',
'button_text' => '上传',
'type' => 'upload'
);
/*
$ashu_options[] = array(
'name' => '网站底部LOGO',
'id' => 'flogo',
'desc' => '这里是网站底部LOGO上传。尺寸:465px*97px.',
'std'=> '',
'button_text' => '上传',
'type' => 'upload'
);
$ashu_options[] = array(
'name' => '手机网站LOGO',
'id' => 'waplogo',
'desc' => '这里是网站LOGO上传。尺寸:230px*90px.',
'std'=> '',
'button_text' => '上传',
'type' => 'upload'
);
*/
$ashu_options[] = array(
'name' => '首页视频封面图',
'id' => 'aboutusimg',
'desc' => '这里是单张图片上传。尺寸:495px*465px.',
'std'=> '',
'button_text' => '上传',
'type' => 'upload'
);
$ashu_options[] = array(
'name' => '微信二唯码',
'id' => 'weixinimg',
'desc' => '这里是微信二唯码上传。尺寸:300px*300px.',
'std'=> '',
'button_text' => '上传',
'type' => 'upload'
);
$ashu_options[] = array(
'name' => '手机站二唯码',
'id' => 'weixinimg2',
'desc' => '这里是手机站二唯码上传。尺寸:300px*300px.',
'std'=> '',
'button_text' => '上传',
'type' => 'upload'
);
/*
$ashu_options[] = array(
'name' => '图片组上传',
'id' => 'gallery_example',
'desc' => '请上传多张图片.',
'std'=> '',
'button_text' => '上传文件',
'type' => 'gallery'
);
$ashu_options[] = array(
'name'=> '编辑器',
'id'=> 'tinymce_example',
'desc'=> '使用编辑器编辑内容',
'std' => '',
'media' => 1,
'type'=> 'tinymce'
);*/
$ashu_options[] = array(
'name' => '轮播图设置',
'type' => 'title'
);
$ashu_options[] = array(
'name' => '添加轮播图',
'id' => 'banner',
'desc' => '',
'std'=> '',
'subtype' => array(
array(
'name' => '链接地址',
'id' => 'link',
'desc' => '图片链接地址(需包含http://)',
'std'=> '',
'type' => 'text'
),
array(
'name' => '图片地址',
'id' => 'image',
'desc' => '请上传图片或者填写图片URL(尺寸:1920*800).',
'std'=> '',
'button_text' => '上传',
'type' => 'upload'
),
),
'multiple' => true,
'type' => 'group'
);
/*
$ashu_options[] = array(
'name' => '添加手机站轮播图',
'id' => 'wapbanner',
'desc' => '',
'std'=> '',
'subtype' => array(
array(
'name' => '链接地址',
'id' => 'link',
'desc' => '图片链接地址(需包含http://)',
'std'=> '',
'type' => 'text'
),
array(
'name' => '图片地址',
'id' => 'image',
'desc' => '请上传图片或者填写图片URL(尺寸:1920*432).',
'std'=> '',
'button_text' => '上传',
'type' => 'upload'
),
),
'multiple' => true,
'type' => 'group'
);
*/
/*$ashu_options[] = array(
'name' => '轮播图上传',
'id' => 'banner2',
'desc' => '',
'std'=> '',
'subtype' => array(
array(
'name' => '文字标题',
'id' => 'title',
'desc' => '文字标题',
'std'=> '',
'type' => 'text'
),
array(
'name' => '文字介绍',
'id' => 'des',
'desc' => '文字介绍',
'std'=> '',
'type' => 'text'
),
array(
'name' => '链接地址',
'id' => 'link',
'desc' => '图片链接地址(需包含http://)',
'std'=> '',
'type' => 'text'
),
array(
'name' => '图片地址',
'id' => 'image',
'desc' => '请上传图片或者填写图片URL(尺寸:1920*432).',
'std'=> '',
'button_text' => '上传',
'type' => 'upload'
),
),
'type' => 'group'
);*/
$ashu_options[] = array(
'name' => '展示性内容',
'type' => 'title'
);
$ashu_options[] = array(
'name' => '首页数字',
'id' => 'shu',
'desc' => '',
'std'=> '',
'subtype' => array(
array(
'name' => '数字',
'id' => 'title',
'std'=> '',
'type' => 'text'
),
array(
'name' => '单位',
'id' => 'title3',
'std'=> '',
'type' => 'text'
),
array(
'name' => '文字标题',
'id' => 'title2',
'std'=> '',
'type' => 'text'
),
),
'multiple' => true,
'type' => 'group'
);
$ashu_options[] = array(
'name' => '企业优势',
'id' => 'youshi',
'desc' => '',
'std'=> '',
'subtype' => array(
array(
'name' => '文字标题',
'id' => 'title',
'std'=> '',
'type' => 'text'
),
array(
'name' => '链接地址',
'id' => 'link',
'std'=> '',
'type' => 'text'
),
array(
'name' => '简介',
'id' => 'des',
'std'=> '',
'type' => 'textarea'
),
array(
'name' => '图片地址',
'id' => 'image',
'desc' => '请上传图片或者填写图片URL.',
'std'=> '',
'button_text' => '上传',
'type' => 'upload'
),
),
'multiple' => true,
'type' => 'group'
);
$ashu_options[] = array(
'name' => '合作伙伴',
'id' => 'kehu',
'desc' => '',
'std'=> '',
'subtype' => array(
array(
'name' => '链接地址',
'id' => 'link',
'std'=> '',
'type' => 'text'
),
array(
'name' => '图片地址',
'id' => 'image',
'desc' => '请上传图片或者填写图片URL.',
'std'=> '',
'button_text' => '上传',
'type' => 'upload'
),
),
'multiple' => true,
'type' => 'group'
);
$ashu_options[] = array(
'name' => '办公环境6个',
'id' => 'hj',
'desc' => '',
'std'=> '',
'subtype' => array(
array(
'name' => '图片地址',
'id' => 'image',
'desc' => '请上传图片或者填写图片URL.',
'std'=> '',
'button_text' => '上传',
'type' => 'upload'
),
),
'multiple' => true,
'type' => 'group'
);
$ashu_options[] = array(
'name' => '发展历程',
'id' => 'lc',
'desc' => '',
'std'=> '',
'subtype' => array(
array(
'name' => '文字标题',
'id' => 'title',
'std'=> '',
'type' => 'text'
),
array(
'name' => '简介',
'id' => 'des',
'std'=> '',
'type' => 'textarea'
),
array(
'name' => '图片地址',
'id' => 'image',
'desc' => '请上传图片或者填写图片URL.',
'std'=> '',
'button_text' => '上传',
'type' => 'upload'
),
),
'multiple' => true,
'type' => 'group'
);
$ashu_options[] = array(
'name' => '人才招聘',
'id' => 'zp',
'desc' => '',
'std'=> '',
'subtype' => array(
array(
'name' => '职位名称',
'id' => 'title',
'std'=> '',
'type' => 'text'
),
array(
'name' => '工作地点',
'id' => 'title2',
'std'=> '',
'type' => 'text'
),
array(
'name' => '薪资待遇',
'id' => 'title3',
'std'=> '',
'type' => 'text'
),
array(
'name' => '招聘人数',
'id' => 'title4',
'std'=> '',
'type' => 'text'
),
array(
'name' => '截止时间',
'id' => 'title5',
'std'=> '',
'type' => 'text'
),
array(
'name' => '简介',
'id' => 'des',
'std'=> '',
'type' => 'textarea'
),
),
'multiple' => true,
'type' => 'group'
);
/*
$ashu_options[] = array(
'name' => '合作伙伴',
'id' => 'kehu',
'desc' => '',
'std'=> '',
'subtype' => array(
array(
'name' => '文字标题',
'id' => 'title',
'std'=> '',
'type' => 'text'
),
array(
'name' => '链接地址',
'id' => 'link',
'std'=> '',
'type' => 'text'
),
array(
'name' => '简介',
'id' => 'des',
'std'=> '',
'type' => 'textarea'
),
array(
'name' => '图片地址',
'id' => 'image',
'desc' => '请上传图片或者填写图片URL.',
'std'=> '',
'button_text' => '上传',
'type' => 'upload'
),
),
'multiple' => true,
'type' => 'group'
);
*/
$ashu_options[] = array(
'name' => '函数设置',
'type' => 'title'
);
$ashu_options[] = array(
'name' => '打开wp_head()函数',
'id' => 'wpheadhs',
'desc' => '<br>wp_head()函数在某些插件/古登堡编辑器需要,默认为关闭',
'std' => '2',
'subtype' => array(
'1' => '打开',
'2' => '关闭',
),
'type' => 'radio',
'multiple' => false
);
$ashu_options[] = array(
'name' => '',
'type' => 'title'
);
$option_page = new wpmbg_options_feild($ashu_options, $page_info);
/****import-export*****/
$import_info = array(
'full_name' => '设置数据导入/导出',
'child'=>true,
'parent_slug'=>'generalpage',
'filename' => 'import_page',
'options'=>array('general','childoption','toppage')
);
$import_page = new wpmbg_option_import_class($import_info);
if(get_option('closemoban') != 1){
add_action('admin_menu', 'my_submenu_page');
function my_submenu_page() {
add_submenu_page( 'generalpage', '网站/小程序模板', '网站/小程序模板', 'edit_themes', 'wpmobanlist','my_submenu_page_display' );
}
function my_submenu_page_display() {
include('wpmbg_mblist.php');
}
}