File: /www/wwwroot/shenzhouhuazhang.com/wp-content/themes/sy/options.php
<?php
/**
* A unique identifier is defined to store the options in the database and reference them from the theme.
*/
function optionsframework_option_name() {
// Change this to use your theme slug
return 'options-framework-theme';
}
/**
* Defines an array of options that will be used to generate the settings page and be saved in the database.
* When creating the 'id' fields, make sure to use all lowercase and no spaces.
*
* If you are making your theme translatable, you should replace 'theme-textdomain'
* with the actual text domain for your theme. Read more:
* http://codex.wordpress.org/Function_Reference/load_theme_textdomain
*/
function optionsframework_options() {
// 将所有分类(categories)加入数组
$options_categories = array();
$options_categories_obj = get_categories();
foreach ($options_categories_obj as $category) {
$options_categories[$category->cat_ID] = $category->cat_name;
}
$options = array();
$options[] = array(
'name' => __('全站设置', 'GJ') ,
'type' => 'heading'
);
$options[] = array(
'name' => __('公司名称', 'GJ') ,
'id' => 'company_name',
'type' => 'text'
);
$options[] = array(
'name' => __('公司地址', 'GJ') ,
'id' => 'address',
'type' => 'text'
);
$options[] = array(
'name' => __('电脑端LOGO设置', 'GJ') ,
'id' => 'pc_logo',
'type' => 'upload'
);
$options[] = array(
'name' => __('座机号码', 'GJ') ,
'id' => 'zuoji_tel',
'type' => 'text'
);
$options[] = array(
'name' => __('手机号码', 'GJ') ,
'id' => 'shouji_tel',
'type' => 'text'
);
$options[] = array(
'name' => __('QQ', 'GJ') ,
'id' => 'qq',
'type' => 'text'
);
$options[] = array(
'name' => __('微信号', 'GJ') ,
'id' => 'wechat',
'type' => 'text'
);
$options[] = array(
'name' => __('邮箱', 'GJ') ,
'id' => 'email',
'type' => 'text'
);
$options[] = array(
'name' => __('ICP备案号', 'GJ') ,
'id' => 'icp_number',
'type' => 'text'
);
/*******分隔*******/
$options[] = array(
'name' => __('首页轮播图/广告图', 'GJ') ,
'type' => 'heading'
);
for ($i = 1; $i <= 3; $i++) {
$options[] = array(
'name' => __('轮播图' . $i, 'GJ') ,
'id' => 'banner_src' . $i,
'std' => '',
'type' => 'upload'
);
}
/*******分隔*******/
$options[] = array(
'name' => __('内页横幅(Banner)', 'GJ') ,
'type' => 'heading'
);
$options[] = array(
'id' => 'banner_news',
'desc' => __('新闻中心', 'GJ') ,
'type' => 'upload'
);
$options[] = array(
'id' => 'banner_products',
'desc' => __('我们的产品', 'GJ') ,
'type' => 'upload'
);
$options[] = array(
'id' => 'banner_rd',
'desc' => __('我们的业务', 'GJ') ,
'type' => 'upload'
);
$options[] = array(
'id' => 'banner_about',
'desc' => __('关于德琪', 'GJ') ,
'type' => 'upload'
);
$options[] = array(
'id' => 'banner_partnerships',
'desc' => __('合作伙伴', 'GJ') ,
'type' => 'upload'
);
$options[] = array(
'id' => 'banner_career',
'desc' => __('职业发展', 'GJ') ,
'type' => 'upload'
);
/*******分隔*******/
$options[] = array(
'name' => __('R&D', 'GJ') ,
'type' => 'heading'
);
$options[] = array(
'name' => __('药物发现', 'Solome') ,
'id' => 'ywfx',
'type' => 'textarea'
);
$options[] = array(
'name' => __('临床开发', 'Solome') ,
'id' => 'lckf',
'type' => 'textarea'
);
$options[] = array(
'name' => __('临床开发展示图片', 'Solome') ,
'id' => 'lckfimg',
'type' => 'upload'
);
$options[] = array(
'name' => __('药品生产', 'Solome') ,
'id' => 'ywsc',
'type' => 'textarea'
);
$options[] = array(
'name' => __('药品生产展示图片', 'Solome') ,
'id' => 'ywscimg',
'type' => 'upload'
);
$options[] = array(
'name' => __('商业化', 'Solome') ,
'id' => 'syh',
'type' => 'textarea'
);
$options[] = array(
'name' => __('商业化展示图片', 'Solome') ,
'id' => 'syhimg',
'type' => 'upload'
);
return $options;
}