File: /usr/home/qxu1650030446/htdocs/wp-content/themes/aly/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' => __('电脑端LOGO设置', 'GJ') ,
        'desc' => __('电脑端LOGO,高度不超过60px', 'GJ') ,
        'id' => 'pc_logo',
        'type' => 'upload'
    );
	$options[] = array(
	    'name' => __('手机端LOGO设置', 'GJ') ,
	    'desc' => __('手机端LOGO,高度不超过40px', 'GJ') ,
	    'id' => 'm_logo',
	    'type' => 'upload'
	);
	$options[] = array(
	    'name' => __('座机号码', 'GJ') ,
	    'id' => 'zuoji_tel',
	    'type' => 'text'
	);
    $options[] = array(
        'name' => __('400号码', 'GJ') ,
        'id' => '400_tel',
        'type' => 'text'
    );
    $options[] = array(
        'name' => __('手机号码', 'GJ') ,
        'id' => 'shouji_tel',
        'type' => 'text'
    );       
    $options[] = array(
        'name' => __('邮箱', 'GJ') ,
        'id' => 'email',
        'type' => 'text'
    ); 
    $options[] = array(
        'name' => __('邮编', 'GJ') ,
        'id' => 'cope',
        'type' => 'text'
	);  
	$options[] = array(
        'name' => __('传真', 'GJ') ,
        'id' => 'fax',
        'type' => 'text'
    ); 
    $options[] = array(
        'name' => __('公司地址', 'GJ') ,
        'id' => 'address',
        'type' => 'text'
    );
    $options[] = array(
        'name' => __('QQ', 'GJ') ,
        'id' => 'contact_qq',
        'type' => 'text'
    );
	$options[] = array(
	    'name' => __('QQ咨询链接', 'GJ') ,
	    'id' => 'qqzx_link',
	    'type' => 'text'
	);
	$options[] = array(
	    'name' => __('百度商桥咨询链接', 'GJ') ,
	    'id' => 'bdzx_link',
	    'type' => 'text'
	);
    $options[] = array(
        'name' => __('ICP备案号', 'GJ') ,
        'id' => 'icp_number',
        'type' => 'text'
    );
	$options[] = array(
	    'name' => __('ICP备案号链接', 'GJ') ,
	    'id' => 'icp_n_link',
	    'type' => 'text'
	);
	$options[] = array(
	    'name' => __('公安备案号图标', 'GJ') ,
	    'id' => 'safe_n_icon',
	    'type' => 'upload'
	);
    $options[] = array(
        'name' => __('公安备案号', 'GJ') ,
        'id' => 'safe_number',
        'type' => 'text'
    );
	$options[] = array(
	    'name' => __('公安备案号链接', 'GJ') ,
	    'id' => 'safe_n_link',
	    'type' => 'text'
	);
     $options[] = array(
        'name' => __('微信二维码', 'GJ') ,
        'id' => 'weixin_erweima',
        'type' => 'upload'
    );
	/*******分隔*******/
    $options[] = array(
        'name' => __('首页轮播图/广告图', 'GJ') ,
        'type' => 'heading'
    );
	$options[] = array(
	    'name' => __('以下图片宽度应为1920px', 'GJ') ,
	);
    for ($i = 1; $i <= 3; $i++) {
        $options[] = array(
            'name' => __('轮播图' . $i, 'GJ') ,
            'id' => 'banner_src' . $i,
            'std' => '',
            'type' => 'upload'
        );
        $options[] = array(
            'name' => __('手机端轮播图' . $i, 'GJ') ,
            'id' => 'banner_m_src' . $i,
            'std' => '',
            'type' => 'upload'
        );
		$options[] = array(
		    'name' => __('轮播图超链接' . $i, 'GJ') ,
		    'id' => 'banner_link' . $i,
		    'std' => '',
		    'type' => 'text'
		);
    }
   /*******分隔*******/
    $options[] = array(
        'name' => __('内页横幅(Banner)', 'GJ') ,
        'type' => 'heading'
    );
    $options[] = array(
        'name' => __('以下图片宽度应为1920px', 'GJ') ,
    );
    $options[] = array(
	    'id' => 'banner_news',
	    'desc' => __('资讯中心', 'GJ') ,
	    'type' => 'upload'
    );
    $options[] = array(
	    'id' => 'm_banner_news',
	    'desc' => __('手机端资讯中心', 'GJ') ,
	    'type' => 'upload'
    );
    $options[] = array(
	    'id' => 'banner_gszz',
	    'desc' => __('公司资质', 'GJ') ,
	    'type' => 'upload'
    );
    $options[] = array(
	    'id' => 'm_banner_gszz',
	    'desc' => __('手机端公司资质', 'GJ') ,
	    'type' => 'upload'
    );
    $options[] = array(
	    'id' => 'banner_zxhd',
	    'desc' => __('最新活动', 'GJ') ,
	    'type' => 'upload'
    );
    $options[] = array(
	    'id' => 'm_banner_zxhd',
	    'desc' => __('手机端最新活动', 'GJ') ,
	    'type' => 'upload'
    );
    $options[] = array(
	    'id' => 'banner_gmlc',
	    'desc' => __('优惠购买流程', 'GJ') ,
	    'type' => 'upload'
    );
    $options[] = array(
	    'id' => 'm_banner_gmlc',
	    'desc' => __('手机端优惠购买流程', 'GJ') ,
	    'type' => 'upload'
    );
    $options[] = array(
	    'id' => 'banner_alygmlc',
	    'desc' => __('阿里云优惠购买流程', 'GJ') ,
	    'type' => 'upload'
    );
    $options[] = array(
	    'id' => 'm_banner_alygmlc',
	    'desc' => __('手机端阿里云优惠购买流程', 'GJ') ,
	    'type' => 'upload'
    );
    $options[] = array(
	    'id' => 'banner_alyyxgmlc',
	    'desc' => __('阿里云企业邮箱价格及购买流程', 'GJ') ,
	    'type' => 'upload'
    );
    $options[] = array(
	    'id' => 'm_banner_alyyxgmlc',
	    'desc' => __('手机端阿里云企业邮箱价格及购买流程', 'GJ') ,
	    'type' => 'upload'
    );
    $options[] = array(
	    'id' => 'banner_cpgn',
	    'desc' => __('产品功能', 'GJ') ,
	    'type' => 'upload'
    );
    $options[] = array(
	    'id' => 'm_banner_cpgn',
	    'desc' => __('手机端产品功能', 'GJ') ,
	    'type' => 'upload'
    );
    $options[] = array(
	    'id' => 'banner_jszc',
	    'desc' => __('技术支持', 'GJ') ,
	    'type' => 'upload'
    );
    $options[] = array(
	    'id' => 'm_banner_jszc',
	    'desc' => __('手机端技术支持', 'GJ') ,
	    'type' => 'upload'
    );
    $options[] = array(
	    'id' => 'banner_join',
	    'desc' => __('加入合伙人', 'GJ') ,
	    'type' => 'upload'
    );
    $options[] = array(
	    'id' => 'm_banner_join',
	    'desc' => __('手机端加入合伙人', 'GJ') ,
	    'type' => 'upload'
	);
    $options[] = array(
	    'id' => 'banner_dingyou',
	    'desc' => __('钉钉+邮箱', 'GJ') ,
	    'type' => 'upload'
    );
    $options[] = array(
	    'id' => 'm_banner_dingyou',
	    'desc' => __('手机端钉钉+邮箱', 'GJ') ,
	    'type' => 'upload'
	);
    $options[] = array(
	    'id' => 'banner_shenqing',
	    'desc' => __('申请免费试用', 'GJ') ,
	    'type' => 'upload'
    );
    $options[] = array(
	    'id' => 'm_banner_shenqing',
	    'desc' => __('手机端申请免费试用', 'GJ') ,
	    'type' => 'upload'
	);
	$options[] = array(
	    'id' => 'banner_contact',
	    'desc' => __('联系我们', 'GJ') ,
	    'type' => 'upload'
    );
    $options[] = array(
	    'id' => 'm_banner_contact',
	    'desc' => __('手机端联系我们', 'GJ') ,
	    'type' => 'upload'
	);
	/*******分隔*******/
    $options[] = array(
        'name' => __('合作伙伴', 'GJ') ,
        'type' => 'heading'
    );
    for ($i = 1; $i <= 10; $i++) {
        $options[] = array(
            'name' => __('合作伙伴' . $i, 'GJ') ,
            'id' => 'case_src' . $i,
            'std' => '',
            'type' => 'upload'
        );
    }
	
     /*******分隔*******/
	 $options[] = array(
        'name' => __('统计代码', 'GJ') ,
        'type' => 'heading'
    );
    $options[] = array(
        'name' => __('网站统计代码', 'Solome') ,
        'desc' => __('位于底部,用于添加第三方流量数据统计代码,如:Google analytics、百度统计、CNZZ、51la,国内站点推荐使用百度统计,国外站点推荐使用Google analytics', 'Solome') ,
        'id' => 'trackcode',
        'std' => '',
        'type' => 'textarea'
    );
	/*******分隔*******/
	 $options[] = array(
	    'name' => __('客服系统代码', 'GJ') ,
	    'type' => 'heading'
	);
	$options[] = array(
	    'name' => __('百度商桥代码', 'Solome') ,
	    'desc' => __('百度商桥代码直接粘贴在左方区域', 'Solome') ,
	    'id' => 'shangqiaocode',
	    'std' => '',
	    'type' => 'textarea'
	);
	$options[] = array(
	    'name' => __('其它客服系统代码', 'Solome') ,
	    'desc' => __('如:商务通,53客服等', 'Solome') ,
	    'id' => 'qitacode',
	    'std' => '',
	    'type' => 'textarea'
	);
	return $options;
}