HEX
Server: nginx/1.16.1
System: Linux iZ7xv2zauie3qihz0jlnrxZ 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: www (1000)
PHP: 7.2.33
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/shzthfdcpg.com/wp-content/themes/shzhaotao/options.php
<?php
/**
 * A unique identifier is defined to store the options in the database and reference them from the theme.
 * By default it uses the theme name, in lowercase and without spaces, but this can be changed if needed.
 * If the identifier changes, it'll appear as if the options have been reset.
 */

function optionsframework_option_name() {

	// 从样式表获取主题名称
	$themename = wp_get_theme();
	$themename = preg_replace("/\W/", "_", strtolower($themename) );

	$optionsframework_settings = get_option( 'optionsframework' );
	$optionsframework_settings['id'] = $themename;
	update_option( 'optionsframework', $optionsframework_settings );
}

/**
 * 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 'options_framework_theme'
 * with the actual text domain for your theme.  请阅读:
 * 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' => __('logo设置', 'GJ') ,
        'id' => 'logo_src',
        "std" => '',
        'type' => 'upload'
    );
     $options[] = array(
        'name' => __('公司名称', 'GJ') ,
        'id' => 'title',
        "std" => '',
        'type' => 'text'
    );
    $options[] = array(
        'name' => __('热线电话', 'GJ') ,
        'id' => 'phone',
        "std" => '',
        'type' => 'text'
    );
    $options[] = array(
        'name' => __('备案号', 'GJ') ,
        'id' => 'ba',
        "std" => '',
        'type' => 'text'
    );



	// 轮播图
    $options[] = array(
        'name' => __('轮播图设置', 'GJ') ,
        'type' => 'heading'
    );
    for ($i = 1; $i <= 3; $i++) {
        $options[] = array(
            'name' => __('轮播图' . $i, 'GJ') ,
            'desc' => __('大小:1920px*555px', 'GJ') ,
            'id' => 'banner_src' . $i,
            "std" => '',
            'type' => 'upload'
        );
        $options[] = array(
            'name' => __('轮播图(手机)' . $i, 'GJ') ,
            'desc' => __('大小:1000px*555px', 'GJ') ,
            'id' => 'banner_phone_src' . $i,
            "std" => '',
            'type' => 'upload'
        );
        $options[] = array(
            'name' => __('轮播图链接', 'GJ') ,
            'id' => 'banner_link' . $i,
            "std" => '',
            'type' => 'text'
        );
    }

    /*分隔*/
	 $options[] = array(
        'name' => __('自定义代码', 'GJ') ,
        'type' => 'heading'
    );
	 $options[] = array(
        'name' => __('网站统计代码', 'Solome') ,
        'desc' => __('位于底部,用于添加第三方流量数据统计代码,如:Google analytics、百度统计、CNZZ、51la,国内站点推荐使用百度统计,国外站点推荐使用Google analytics', 'Solome') ,
        'id' => 'trackcode',
        'std' => '',
        'type' => 'textarea'
    );

   
	return $options;
}