<?php
/*if( is_super_admin() ){
// error_reporting(E_ALL);
// ini_set("display_errors", 1);
}else{
// exit;
}*/
add_filter('upload_mimes', 'tb_upload_mimes');
function tb_upload_mimes($mimes = array()) {
$mimes['svg'] = 'image/svg+xml';
$mimes['ico'] = 'image/x-icon';
$mimes['webp'] = 'image/webp';
return $mimes;
}
add_action( 'after_setup_theme', 'xiu_woocommerce_support' );
function xiu_woocommerce_support() {
add_theme_support( 'woocommerce' );
}
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);
remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);
add_action('woocommerce_before_main_content', 'my_theme_wrapper_start', 10);
add_action('woocommerce_after_main_content', 'my_theme_wrapper_end', 10);
function my_theme_wrapper_start() {
echo '<section class="woomain">';
}
function my_theme_wrapper_end() {
echo '</section>';
}
/*
* define
* ====================================================
*/
define( 'THEME_VERSION' , '7.7' );
if ( ! function_exists( '_hui' ) ) {
function _hui( $name, $default = false ) {
$config = get_option( 'opshui' );
if ( ! isset( $config['id'] ) ) {
return $default;
}
$options = get_option( $config['id'] );
if ( isset( $options[$name] ) ) {
return $options[$name];
}
return $default;
}
}
// WordPress Emoji Delete
remove_action( 'admin_print_scripts' , 'print_emoji_detection_script');
remove_action( 'admin_print_styles' , 'print_emoji_styles');
remove_action( 'wp_head' , 'print_emoji_detection_script', 7);
remove_action( 'wp_print_styles' , 'print_emoji_styles');
remove_filter( 'the_content_feed' , 'wp_staticize_emoji');
remove_filter( 'comment_text_rss' , 'wp_staticize_emoji');
remove_filter( 'wp_mail' , 'wp_staticize_emoji_for_email');
// Avatar
////////////////////////////////////////////////////////////////////////////////////////////////////
if( _hui('gravatar_url') ){
if( _hui('gravatar_url') == 'ssl' ){
add_filter('get_avatar', '_get_ssl2_avatar');
}elseif( _hui('gravatar_url') == 'v2ex' ){
add_filter('get_avatar', '_get_v2ex_avatar');
}
}
function _get_ssl2_avatar($avatar) {
$avatar = preg_replace('/.*\/avatar\/(.*)\?s=([\d]+)&d=(.*).*/','<img src="https://secure.gravatar.com/avatar/$1?s=$2&d='.get_option('avatar_default').'" class="avatar avatar-$2">',$avatar);
return $avatar;
}
function _get_v2ex_avatar($avatar) {
$avatar = str_replace(array("www.gravatar.com/avatar", "secure.gravatar.com/avatar", "0.gravatar.com/avatar", "1.gravatar.com/avatar", "2.gravatar.com/avatar"), "cdn.v2ex.com/gravatar", $avatar);
return $avatar;
}
/*
* delete google fonts
* ====================================================
*/
// Remove Open Sans that WP adds from frontend
if (!function_exists('remove_wp_open_sans')) :
function remove_wp_open_sans() {
wp_deregister_style( 'open-sans' );
wp_register_style( 'open-sans', false );
}
add_action('wp_enqueue_scripts', 'remove_wp_open_sans');
// Uncomment below to remove from admin
// add_action('admin_enqueue_scripts', 'remove_wp_open_sans');
endif;
function remove_open_sans() {
wp_deregister_style( 'open-sans' );
wp_register_style( 'open-sans', false );
wp_enqueue_style('open-sans','');
}
add_action( 'init', 'remove_open_sans' );
function hui_breadcrumbs(){
if( !is_single() ) return false;
$categorys = get_the_category();
if( !$categorys ) return false;
$category = $categorys[0];
return '<span class="text-muted">当前位置:</span><a href="'.get_bloginfo('url').'">'.get_bloginfo('name').'</a> <small>></small> '.get_category_parents($category->term_id, true, ' <small>></small> ').'<span class="text-muted">'.(!_hui('breadcrumbs_single_text')?get_the_title():'正文').'</span>';
}
/**
* open link manager
* v4.1 at 2015-08-17
*
* @author http://themebetter.com/theme/xiu
* ====================================================================================================
**/
add_filter( 'pre_option_link_manager_enabled', '__return_true' );
/*
* languages
* ====================================================
*/
add_action('after_setup_theme', 'hui_languages');
function hui_languages(){
load_theme_textdomain('haoui', get_template_directory() . '/languages');
}
if( is_admin() ){
require_once get_template_directory() . '/functions.admin.php';
}
/*
* no categoty
* ====================================================
*/
if( _hui('no_categoty') ) require_once get_template_directory() . '/modules/no-category.php';
function hui_moloader($name = '', $apply = true) {
if (!function_exists($name)) {
include get_template_directory() . '/modules/' . $name . '.php';
}
if ($apply && function_exists($name)) {
$name();
}
}
/*
* widgets
* ====================================================
*/
if( _hui('layout') !== 'ui-c2' ){
if (function_exists('register_sidebar')){
$widgets = array(
'sitesidebar' => __('全站侧栏', 'haoui'),
'sidebar' => __('首页侧栏', 'haoui'),
'othersidebar' => __('分类/标签/搜索页侧栏', 'haoui'),
'postsidebar' => __('文章页侧栏', 'haoui'),
'pagesidebar' => __('页面侧栏', 'haoui'),
);
foreach ($widgets as $key => $value) {
register_sidebar(array(
'name' => $value,
'id' => 'widget_'.$key,
'before_widget' => '<div class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h3 class="title"><strong>',
'after_title' => '</strong></h3>'
));
}
}
require_once get_template_directory() . '/widgets/widget-index.php';
}
// require_once get_template_directory() . '/functions.xzh.php';
/*
* reg nav
* ====================================================
*/
if (function_exists('register_nav_menus')){
register_nav_menus( array(
'nav' => __('网站导航', 'haoui'),
'fixnav_m' => __('手机端底部菜单'),
));
}
/*
* nav
* ====================================================
*/
function hui_nav_menu($class='nav', $location='nav'){
echo '<ul class="'.$class.'"><li class="navmore"><i class="glyphicon glyphicon-align-justify"></i></li>'.str_replace("</ul></div>", "", preg_replace("/<div[^>]*><ul[^>]*>/", "", wp_nav_menu(array('theme_location' => $location, 'echo' => false)) )).'</ul>';
}
/*
* logo
* ====================================================
*/
function hui_logo($class='logo', $tag=array('h1', 'div')){
$tag = is_home() ? $tag[0] : $tag[1];
$src = '';
if( _hui('logo_src') ){
$src .= '<img class="logo-img-pc" src="'._hui('logo_src').'" alt="'. get_bloginfo('name') .'">';
}
if( _hui('logo_m_src') ){
$src .= '<img class="logo-img-m" src="'._hui('logo_m_src').'" alt="'. get_bloginfo('name') .'">';
}
echo '<'.$tag.' class="logo"><a href="'.get_bloginfo('url').'" title="'.get_bloginfo('name')._hui('connector').get_bloginfo('description').'">'. $src .get_bloginfo('name').'</a></'.$tag.'>';
}
/*
* from
* ====================================================
*/
function hui_get_post_from($pid='', $prevtext='图片参考:'){
if( !$pid ) $pid = get_the_ID();
$fromname = trim(get_post_meta($pid, "fromname_value", true));
$from
没有合适的资源?快使用搜索试试~ 我知道了~
wordpress主题 阿里百秀XIU更新_v7.7
共109个文件
php:47个
gif:23个
png:14个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 148 浏览量
2022-07-04
09:54:21
上传
评论
收藏 623KB ZIP 举报
温馨提示
本次XIU主题更新重点是几项功能新增,尤其是标签页的全面SEO功能,包含了标题、关键词和描述的独立设置。 值得一提的更新:新增手机端底部菜单 手机端底部菜单是很多用户想要的功能,此次专门开发了这个也是满足大家的需求,手机端底部菜单是始终固定在手机端底部的一个导航菜单,不限数量,但都能整齐排列,建议设置3-5个菜单项最佳。 设置方法:后台-外观-菜单,新建菜单,选择显示位置 手机端底部菜单,如果不想显示,就不勾选这个显示位置即可。 XIU主题7.7版本更新内容: 全面兼容 PHP 8.0 新增标签页的SEO设置(标题、关键词、描述) 新增手机端底部菜单 新增首页轮换图的alt属性以利于SEO 调整文章页图片弹窗在PC端也起作用 优化文章页图片弹窗点击效果
资源推荐
资源详情
资源评论
收起资源包目录
wordpress主题 阿里百秀XIU更新_v7.7 (109个子文件)
style.css 128KB
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
index.htm 275B
font.jpg 35KB
ui-02.jpg 16KB
ui-01.jpg 15KB
swiper.min.js 125KB
jquery.js 94KB
iris.min.js 48KB
custom.js 34KB
bootstrap.js 31KB
medialibrary-uploader.js 6KB
color-picker.min.js 2KB
options-custom.js 2KB
html5.js 2KB
en.mo 21KB
functions.xiu.php 46KB
options.php 45KB
functions.admin.php 17KB
options-interface.php 16KB
options-ui.php 12KB
options-sanitize.php 10KB
options-medialibrary-uploader.php 8KB
hui_recent_posts_most.php 5KB
comments.php 5KB
functions.xzh.php 4KB
widget-postlist.php 4KB
single.php 4KB
comment.php 4KB
image.php 4KB
header.php 4KB
no-category.php 4KB
excerpt.php 3KB
widget-textads.php 3KB
footer.php 3KB
widget-comments.php 3KB
tags.php 2KB
widget-searchbox.php 2KB
index.php 2KB
archives.php 2KB
readers.php 2KB
widget-tags.php 2KB
license.php 1KB
widget-ads.php 1KB
hui_focusslide.php 1KB
pagehasmenu.php 1KB
index.php 1KB
likes.php 1KB
category.php 995B
hui_posts_focus.php 906B
hui_posts_sticky.php 835B
sidebar.php 797B
archive.php 692B
links.php 666B
widget-index.php 594B
search.php 526B
author.php 512B
tag.php 494B
page.php 424B
blank-content.php 406B
woocommerce.php 323B
404.php 141B
functions.php 102B
404.png 10KB
icn.png 8KB
share.png 7KB
qrcode.png 6KB
screenshot.png 4KB
logo.png 3KB
sprite.png 3KB
thumbnail.png 2KB
backtop.png 1KB
navtop.png 1017B
共 109 条
- 1
- 2
资源评论
智慧浩海
- 粉丝: 1w+
- 资源: 5113
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功