<?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 opshui_option_name() {
// This gets the theme name from the stylesheet
$themename = get_option( 'stylesheet' );
$themename = preg_replace("/\W/", "_", strtolower($themename) );
$opshui_settings = get_option( 'opshui' );
$opshui_settings['id'] = $themename;
update_option( 'opshui', $opshui_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.
*/
function opshui_options() {
// Multicheck Defaults
$multicheck_defaults = array(
'one' => '1',
'five' => '1'
);
// Background Defaults
$background_defaults = array(
'color' => '',
'image' => '',
'repeat' => 'repeat',
'position' => 'top center',
'attachment'=>'scroll' );
// Typography Defaults
$typography_defaults = array(
'face' => 'yahei',
'style' => 'normal',
'color' => '#383121' );
$typography_content = array(
'size' => '13px',
'face' => 'yahei',
'style' => 'normal',
'color' => '#000000' );
// Typography Options
$typography_options = array(
'sizes' => false
);
// Pull all the categories into an array
$options_categories = array();
$options_categories_obj = get_categories();
foreach ($options_categories_obj as $category) {
$options_categories[$category->cat_ID] = $category->cat_name;
}
// Pull all the pages into an array
$options_pages = array();
$options_pages_obj = get_pages('sort_column=post_parent,menu_order');
// $options_pages[''] = 'Select a page:';
foreach ($options_pages_obj as $page) {
$options_pages[$page->ID] = $page->post_title;
}
$options_linkcats = array();
$options_linkcats_obj = get_terms('link_category');
foreach ( $options_linkcats_obj as $tag ) {
$options_linkcats[$tag->term_id] = $tag->name;
}
// If using image radio buttons, define a directory path
$imagepath = get_template_directory_uri() . '/images/';
$adsdesc = __('可添加任意广告联盟代码或自定义代码', 'haoui');
$rrr = ' / ';
$nnn = ' / ';
$options = array();
$qrcode = get_stylesheet_directory_uri() . '/images/qrcode.png';
/*
* BASIC
* ====================================================================================================
*/
$options[] = array(
'name' => __('基本', 'haoui'),
'type' => 'heading');
$options[] = array(
'name' => __('Logo', 'haoui').$rrr.__('图片', 'haoui').'(v5.0+)',
'id' => 'logo_src',
'desc' => __('尺寸:', 'haoui').'190*120',
'std' => $imagepath.'logo.png',
'type' => 'upload');
$options[] = array(
'name' => __('Logo 手机端', 'haoui').$rrr.__('图片', 'haoui').'(v5.3+)',
'id' => 'logo_m_src',
'desc' => __('尺寸:', 'haoui').'190*42,如果为空手机端将显示网站名称作为logo',
'std' => $imagepath.'logo.png',
'type' => 'upload');
$options[] = array(
'name' => __("布局", 'haoui'),
'desc' => __("3种布局供选择,点击选择你喜欢的布局方式,保存后前端展示会有所改变。", 'haoui'),
'id' => "layout",
'std' => "ui-c3",
'type' => "images",
'options' => array(
'ui-navtop' => $imagepath.'layout/navtop.png',
'ui-c3' => $imagepath.'layout/c3.png',
'ui-c2' => $imagepath.'layout/c2.png'
)
);
$options[] = array(
'name' => __('模块化布局', 'haoui').'(v5.0+)',
'id' => 'layout_mo',
'type' => "checkbox",
'std' => false,
'desc' => __('开启', 'haoui'));
$options[] = array(
'name' => __("主题风格", 'haoui'),
'desc' => __("13种颜色供选择,点击选择你喜欢的颜色,保存后前端展示会有所改变。", 'haoui'),
'id' => "theme_skin",
'std' => "FF5E52",
'type' => "colorradio",
'options' => array(
'FF5E52' => 1,
'2CDB87' => 2,
'00D6AC' => 3,
'16C0F8' => 4,
'EA84FF' => 5,
'FDAC5F' => 6,
'FD77B2' => 7,
'76BDFF' => 8,
'C38CFF' => 9,
'FF926F' => 10,
'8AC78F' => 11,
'C7C183' => 12,
'555555' => 13
)
);
$options[] = array(
'id' => 'theme_skin_custom',
'std' => "",
'desc' => __('不喜欢上面提供的颜色,你好可以在这里自定义设置,如果不用自定义颜色清空即可(默认不用自定义)', 'haoui'),
'type' => "color");
$options[] = array(
'name' => __('全站连接符', 'haoui'),
'id' => 'connector',
'desc' => __('一经选择,切勿更改,对SEO不友好,一般为“-”或“_”', 'haoui'),
'std' => _hui('connector') ? _hui('connector') : '-',
'type' => 'text',
'class' => 'mini');
$options[] = array(
'name' => __('网页最大宽度', 'haoui'),
'id' => 'site_width',
'std' => 1280,
'class' => 'mini',
'desc' => __('默认:1280,单位:px(像素)', 'haoui'),
'type' => 'text');
$options[] = array(
'name' => __('jQuery底部加载', 'haoui'),
'id' => 'jquery_bom',
'type' => "checkbox",
'std' => false,
'desc' => __('开启', 'haoui').__('(可提高页面内容加载速度,但部分依赖jQuery的插件可能失效)', 'haoui'));
$options[] = array(
'name' => __('Gravatar 头像获取', 'haoui'),
'id' => 'gravatar_url',
'std' => "ssl",
'type' => "radio",
'options' => array(
'no' => __(' 原有方式', 'haoui'),
'ssl' => __(' 从Gravatar官方ssl获取', 'haoui')
));
$options[] = array(
'name' => __('JS文件托管(可大幅提速JS加载)', 'haoui'),
'id' => 'js_outlink',
'std' => "no",
'type' => "radio",
'options' => array(
'no' => __(' 不托管', 'haoui'),
'baidu' => __(' 百度', 'haoui'),
'he' => __(' 框架来源站点(分别引入jquery和bootstrap官方站点JS文件)', 'haoui')
));
$options[] = array(
'name' => __('网站整体变灰', 'haoui'),
'id' => 'site_gray',
'type' => "checkbox",
'std' => false,
'desc' => __('开启', 'haoui').__('(支持IE、Chrome,基本上覆盖了大部分用户,不会降低访问速度)', 'haoui'));
$options[] = array(
'name' => __('分类url去除category字样', 'haoui'),
'id' => 'no_categoty',
'type' => "checkbox",
'std' => false,
'desc' => __('开启', 'haoui').__('(该功能和no-category插件作用相同)', 'haoui'));
$options[] = array(
'name' => __('导航搜索框', 'haoui').'(v4.1+)',
'id' => 'search_nav',
'type' => "checkbox",
'std' => false,
'desc' => __('开启', 'haoui').' '.__('开启后会在导航区域增加搜索框,不同布局不同展示方式', 'haoui'));
$options[] = array(
'name' => __('移动端搜索框', 'haoui').'(v4.1+)',
'id' => 'search_nav_m',
'type' => "checkbox",
'std' => false,
'desc' => __('开启', 'haoui'));
$options[] = array(
'name' => __('前端登录注册链接', 'haoui').'(v4.1+)',
'id' => 'sign_f',
'type' => "checkbox",
'std' => false,
'desc' => __('开启', 'haoui'));
$options[] = array(
'name' => __('头部菜单设置', 'haoui'),
'desc' => __('案例:', 'haoui').'<a href="'.site_url().'" title="'.__('链接', 'haoui').'01">'.__('链接', 'haoui').'01</a>',
'id' => 'menu_links',
'std' => '<a href="'.site_url().'" title="'.__('链接', 'haoui').'01">'.__('链接', 'haoui').'01</a>|<a href="'.site_url().'" title="'.__('链接', 'haoui').'02">'.__('链接', 'haoui').'02</a><br><a href="'.site_url().'" title="'.__('链接', 'haoui').'03">'.__('链接', 'haoui').'03</a>',
'type' => 'textarea');
$options[] = array(
'name' => __('网站底部信息', 'haoui'),
'id' =
没有合适的资源?快使用搜索试试~ 我知道了~
价值100元WordPress收费主题阿里百秀主题v6.0
共103个文件
php:43个
gif:23个
png:13个
需积分: 0 0 下载量 114 浏览量
2023-04-01
12:32:36
上传
评论
收藏 525KB RAR 举报
温馨提示
6.0版本升级内容: 新添加全面支持百度熊掌号、粉丝关注、JSON_LD数据、文章实时推送、原创保护 新添加首页热门排行显示在移动端(主题设置-首页) 新添加首页SEO标题设置(主题设置-SEO) 新添加去除底部版权说明的选项(主题设置-基本) 新添加文章和页面内容分页时标题自动增加第几页 调整底部友情链接只在首页开启的时候首页分页中不显示 处理PHP7.2环境下主题设置中上传图片可能的报错问题 处理侧栏随动有可能存在的JS报错 移除多说头像获取方式 修复开启Debug后端有Notice提醒 修复文章页内容底部的点赞打赏直达链接按钮组合错位
资源推荐
资源详情
资源评论
收起资源包目录
价值100元WordPress收费主题阿里百秀主题v6.0 (103个子文件)
style.css 106KB
opshui.css 5KB
color-picker.min.css 2KB
editor-style.css 2KB
share.css 2KB
glyphicons-halflings-regular.eot 20KB
icon_question.gif 5KB
icon_mad.gif 4KB
icon_wink.gif 3KB
icon_biggrin.gif 2KB
ajax-loader.gif 2KB
icon_cry.gif 2KB
icon_redface.gif 2KB
icon_exclaim.gif 2KB
icon_evil.gif 1KB
icon_confused.gif 1KB
icon_razz.gif 1KB
icon_rolleyes.gif 878B
icon_neutral.gif 808B
icon_sad.gif 795B
icon_eek.gif 786B
icon_idea.gif 740B
icon_twisted.gif 694B
icon_mrgreen.gif 646B
icon_lol.gif 623B
icon_arrow.gif 622B
icon_smile.gif 563B
icon_cool.gif 534B
icon_surprised.gif 505B
font.jpg 35KB
ui-02.jpg 16KB
ui-01.jpg 15KB
jquery.js 94KB
bootstrap.js 31KB
custom.js 29KB
iris.min.js 21KB
hammer.min.js 18KB
medialibrary-uploader.js 6KB
color-picker.min.js 2KB
options-custom.js 2KB
html5.js 2KB
en.mo 21KB
options.php 43KB
functions.xiu.php 41KB
options-interface.php 16KB
functions.admin.php 13KB
options-ui.php 12KB
options-sanitize.php 10KB
options-medialibrary-uploader.php 8KB
comments.php 6KB
hui_recent_posts_most.php 5KB
comment.php 5KB
functions.xzh.php 4KB
widget-postlist.php 4KB
image.php 4KB
header.php 4KB
no-category.php 4KB
single.php 3KB
widget-textads.php 3KB
excerpt.php 3KB
footer.php 3KB
widget-comments.php 3KB
index.php 2KB
tags.php 2KB
widget-searchbox.php 2KB
archives.php 2KB
readers.php 2KB
widget-tags.php 2KB
hui_focusslide.php 1KB
widget-ads.php 1KB
pagehasmenu.php 1KB
index.php 1KB
category.php 1KB
likes.php 1KB
hui_posts_focus.php 906B
hui_posts_sticky.php 835B
archive.php 692B
links.php 666B
sidebar.php 644B
search.php 592B
tag.php 557B
widget-index.php 547B
author.php 512B
page.php 424B
functions.php 102B
404.png 10KB
share.png 7KB
qrcode.png 6KB
screenshot.png 4KB
logo.png 3KB
sprite.png 3KB
thumbnail.png 2KB
backtop.png 1KB
navtop.png 1017B
c3.png 988B
c2.png 979B
ico-delete.png 715B
avatar-default.png 616B
en.po 33KB
share.psd 390KB
共 103 条
- 1
- 2
资源评论
迈步从天越
- 粉丝: 0
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功