mirror of https://github.com/vtrois/kratos
Merge branch '1' into test
# Conflicts: # README.md # README.zh-CN.md # assets/js/kratos.js # functions.php # inc/update-checker/update.json # languages/kratos.pot # style.csspull/620/head
commit
d3c9107432
|
@ -1,6 +1,87 @@
|
||||||
|
#################### VisualStudioCode.gitignore ####################
|
||||||
|
|
||||||
|
.vscode/*
|
||||||
|
!.vscode/settings.json
|
||||||
|
!.vscode/tasks.json
|
||||||
|
!.vscode/launch.json
|
||||||
|
!.vscode/extensions.json
|
||||||
|
!.vscode/*.code-snippets
|
||||||
|
|
||||||
|
# Local History for Visual Studio Code
|
||||||
|
.history/
|
||||||
|
|
||||||
|
#################### Linux.gitignore ####################
|
||||||
|
|
||||||
|
*~
|
||||||
|
|
||||||
|
# temporary files which can be created if a process still has a handle open of a deleted file
|
||||||
|
.fuse_hidden*
|
||||||
|
|
||||||
|
# KDE directory preferences
|
||||||
|
.directory
|
||||||
|
|
||||||
|
# Linux trash folder which might appear on any partition or disk
|
||||||
|
.Trash-*
|
||||||
|
|
||||||
|
# .nfs files are created when an open file is removed but is still being accessed
|
||||||
|
.nfs*
|
||||||
|
|
||||||
|
#################### Windows.gitignore ####################
|
||||||
|
|
||||||
|
# Windows thumbnail cache files
|
||||||
|
Thumbs.db
|
||||||
|
Thumbs.db:encryptable
|
||||||
|
ehthumbs.db
|
||||||
|
ehthumbs_vista.db
|
||||||
|
|
||||||
|
# Dump file
|
||||||
|
*.stackdump
|
||||||
|
|
||||||
|
# Folder config file
|
||||||
|
[Dd]esktop.ini
|
||||||
|
|
||||||
|
# Recycle Bin used on file shares
|
||||||
|
$RECYCLE.BIN/
|
||||||
|
|
||||||
|
# Windows Installer files
|
||||||
|
*.cab
|
||||||
|
*.msi
|
||||||
|
*.msix
|
||||||
|
*.msm
|
||||||
|
*.msp
|
||||||
|
|
||||||
|
# Windows shortcuts
|
||||||
|
*.lnk
|
||||||
|
|
||||||
|
#################### macOS.gitignore ####################
|
||||||
|
|
||||||
|
# General
|
||||||
.DS_Store
|
.DS_Store
|
||||||
vendor/
|
.AppleDouble
|
||||||
composer.lock
|
.LSOverride
|
||||||
composer.phar
|
|
||||||
package.tar
|
# Icon must end with two \r
|
||||||
/packages.json
|
Icon
|
||||||
|
|
||||||
|
# Thumbnails
|
||||||
|
._*
|
||||||
|
|
||||||
|
# Files that might appear in the root of a volume
|
||||||
|
.DocumentRevisions-V100
|
||||||
|
.fseventsd
|
||||||
|
.Spotlight-V100
|
||||||
|
.TemporaryItems
|
||||||
|
.Trashes
|
||||||
|
.VolumeIcon.icns
|
||||||
|
.com.apple.timemachine.donotpresent
|
||||||
|
|
||||||
|
# Directories potentially created on remote AFP share
|
||||||
|
.AppleDB
|
||||||
|
.AppleDesktop
|
||||||
|
Network Trash Folder
|
||||||
|
Temporary Items
|
||||||
|
.apdisk
|
||||||
|
|
||||||
|
#################### Custom.gitignore ####################
|
||||||
|
|
||||||
|
!.gitkeep
|
|
@ -1,12 +1,12 @@
|
||||||
English | [简体中文](README.zh-CN.md)
|
**English** | [简体中文](README.zh-CN.md)
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<img src="assets/img/options/about.png">
|
<img src="assets/img/options/about.png">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<img src="https://img.shields.io/badge/PHP-%3E7.4-777BB4?style=flat-square&logo=php&logoColor=#777BB4">
|
<img src="https://img.shields.io/badge/PHP-%3E8.0-777BB4?style=flat-square&logo=php&logoColor=#777BB4">
|
||||||
<img src="https://img.shields.io/badge/WordPress-v6.4%20alpha%20tested-21759B?style=flat-square&logo=wordpress">
|
<img src="https://img.shields.io/badge/WordPress-v6.7%20tested-21759B?style=flat-square&logo=wordpress">
|
||||||
<a href="https://github.com/devhaozi/kratos/issues">
|
<a href="https://github.com/devhaozi/kratos/issues">
|
||||||
<img src="https://img.shields.io/github/issues/devhaozi/kratos?style=flat-square&color=blue">
|
<img src="https://img.shields.io/github/issues/devhaozi/kratos?style=flat-square&color=blue">
|
||||||
</a>
|
</a>
|
||||||
|
@ -40,7 +40,7 @@ English | [简体中文](README.zh-CN.md)
|
||||||
|
|
||||||
## 🤝 Contributing
|
## 🤝 Contributing
|
||||||
|
|
||||||
We welcome all contributions. You can submit any ideas as pull requests or as issues, have a good time! :)
|
We welcome all contributions. You can submit any ideas as Pull requests or as Issues, have a good time!
|
||||||
|
|
||||||
## 📃 License
|
## 📃 License
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
[English](README.md) | 简体中文
|
[English](README.md) | **简体中文**
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<img src="assets/img/options/about.png">
|
<img src="assets/img/options/about.png">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<img src="https://img.shields.io/badge/PHP-%3E7.4-777BB4?style=flat-square&logo=php&logoColor=#777BB4">
|
<img src="https://img.shields.io/badge/PHP-%3E8.0-777BB4?style=flat-square&logo=php&logoColor=#777BB4">
|
||||||
<img src="https://img.shields.io/badge/WordPress-v6.4%20alpha%20tested-21759B?style=flat-square&logo=wordpress">
|
<img src="https://img.shields.io/badge/WordPress-v6.7%20tested-21759B?style=flat-square&logo=wordpress">
|
||||||
<a href="https://github.com/devhaozi/kratos/issues">
|
<a href="https://github.com/devhaozi/kratos/issues">
|
||||||
<img src="https://img.shields.io/github/issues/devhaozi/kratos?style=flat-square&color=blue">
|
<img src="https://img.shields.io/github/issues/devhaozi/kratos?style=flat-square&color=blue">
|
||||||
</a>
|
</a>
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
|
|
||||||
## 🤝 参与共建
|
## 🤝 参与共建
|
||||||
|
|
||||||
我们欢迎所有的贡献,你可以将任何想法作为 pull requests 或 issues 提交,顺颂商祺 :)
|
我们欢迎所有的贡献,你可以将任何想法作为 Pull requests 或 Issues 提交,顺颂商祺!
|
||||||
|
|
||||||
## 📃 开源许可
|
## 📃 开源许可
|
||||||
|
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 91 KiB |
|
@ -3,21 +3,21 @@
|
||||||
* Seaton Jiang <hi@seatonjiang.com>
|
* Seaton Jiang <hi@seatonjiang.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var KRATOS_VERSION = "4.2.4.2";
|
var $ = jQuery.noConflict();
|
||||||
|
|
||||||
var $ = jQuery.noConflict();
|
var KRATOS_VERSION = "4.3.1";
|
||||||
|
|
||||||
var navbarConfig = function () {
|
var navbarConfig = function () {
|
||||||
$("#navbutton").on("click", function () {
|
$("#navbutton").on("click", function () {
|
||||||
$(".navbar-toggler").toggleClass("nav-close");
|
$(".navbar-toggler").toggleClass("nav-close");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
var tooltipConfig = function () {
|
var tooltipConfig = function () {
|
||||||
$("[data-toggle=\"tooltip\"]").tooltip();
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
};
|
};
|
||||||
|
|
||||||
var gotopConfig = function () {
|
var gotopConfig = function () {
|
||||||
$(window).on("load", function () {
|
$(window).on("load", function () {
|
||||||
var $win = $(window);
|
var $win = $(window);
|
||||||
var setShowOrHide = function () {
|
var setShowOrHide = function () {
|
||||||
|
@ -35,9 +35,9 @@ var gotopConfig = function () {
|
||||||
$("html, body").animate({ scrollTop: $("html").offset().top }, 500);
|
$("html, body").animate({ scrollTop: $("html").offset().top }, 500);
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
var searchConfig = function () {
|
var searchConfig = function () {
|
||||||
$(".search").on("click", function (e) {
|
$(".search").on("click", function (e) {
|
||||||
$(".search-form").animate({ width: "200px" }, 200);
|
$(".search-form").animate({ width: "200px" }, 200);
|
||||||
$(".search-form input").css("display", "block");
|
$(".search-form input").css("display", "block");
|
||||||
|
@ -50,18 +50,18 @@ var searchConfig = function () {
|
||||||
$(".search-form").on("click", function (e) {
|
$(".search-form").on("click", function (e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
var wechatConfig = function () {
|
var wechatConfig = function () {
|
||||||
$(".wechat").mouseout(function () {
|
$(".wechat").mouseout(function () {
|
||||||
$(".wechat-pic")[0].style.display = "none";
|
$(".wechat-pic")[0].style.display = "none";
|
||||||
});
|
});
|
||||||
$(".wechat").mouseover(function () {
|
$(".wechat").mouseover(function () {
|
||||||
$(".wechat-pic")[0].style.display = "block";
|
$(".wechat-pic")[0].style.display = "block";
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
var smiliesConfig = function () {
|
var smiliesConfig = function () {
|
||||||
$("#addsmile").on("click", function (e) {
|
$("#addsmile").on("click", function (e) {
|
||||||
$(".smile").toggleClass("open");
|
$(".smile").toggleClass("open");
|
||||||
$(document).one("click", function () {
|
$(document).one("click", function () {
|
||||||
|
@ -70,9 +70,9 @@ var smiliesConfig = function () {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
var postlikeConfig = function () {
|
var postlikeConfig = function () {
|
||||||
$.fn.postLike = function () {
|
$.fn.postLike = function () {
|
||||||
if ($(this).hasClass("done")) {
|
if ($(this).hasClass("done")) {
|
||||||
layer.msg(kratos.repeat, function () {});
|
layer.msg(kratos.repeat, function () {});
|
||||||
|
@ -90,7 +90,7 @@ var postlikeConfig = function () {
|
||||||
$.post(
|
$.post(
|
||||||
kratos.site + "/wp-admin/admin-ajax.php",
|
kratos.site + "/wp-admin/admin-ajax.php",
|
||||||
ajax_data,
|
ajax_data,
|
||||||
function (data) {},
|
function (data) {}
|
||||||
);
|
);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -98,9 +98,9 @@ var postlikeConfig = function () {
|
||||||
$(document).on("click", ".btn-thumbs", function () {
|
$(document).on("click", ".btn-thumbs", function () {
|
||||||
$(this).postLike();
|
$(this).postLike();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
var donateConfig = function () {
|
var donateConfig = function () {
|
||||||
$("#donate").on("click", function () {
|
$("#donate").on("click", function () {
|
||||||
layer.open({
|
layer.open({
|
||||||
type: 1,
|
type: 1,
|
||||||
|
@ -109,19 +109,19 @@ var donateConfig = function () {
|
||||||
resize: false,
|
resize: false,
|
||||||
scrollbar: false,
|
scrollbar: false,
|
||||||
content:
|
content:
|
||||||
"<div class=\"donate-box\"><div class=\"meta-pay text-center my-2\"><strong>" +
|
'<div class="donate-box"><div class="meta-pay text-center my-2"><strong>' +
|
||||||
kratos.scan +
|
kratos.scan +
|
||||||
"</strong></div><div class=\"qr-pay text-center\"><img class=\"pay-img\" id=\"alipay_qr\" src=\"" +
|
'</strong></div><div class="qr-pay text-center"><img class="pay-img" id="alipay_qr" src="' +
|
||||||
kratos.alipay +
|
kratos.alipay +
|
||||||
"\"><img class=\"pay-img d-none\" id=\"wechat_qr\" src=\"" +
|
'"><img class="pay-img d-none" id="wechat_qr" src="' +
|
||||||
kratos.wechat +
|
kratos.wechat +
|
||||||
"\"></div><div class=\"choose-pay text-center mt-2\"><input id=\"alipay\" type=\"radio\" name=\"pay-method\" checked><label for=\"alipay\" class=\"pay-button\"><img src=\"" +
|
'"></div><div class="choose-pay text-center mt-2"><input id="alipay" type="radio" name="pay-method" checked><label for="alipay" class="pay-button"><img src="' +
|
||||||
kratos.directory +
|
kratos.directory +
|
||||||
"/assets/img/payment/alipay.png\"></label><input id=\"wechatpay\" type=\"radio\" name=\"pay-method\"><label for=\"wechatpay\" class=\"pay-button\"><img src=\"" +
|
'/assets/img/payment/alipay.png"></label><input id="wechatpay" type="radio" name="pay-method"><label for="wechatpay" class="pay-button"><img src="' +
|
||||||
kratos.directory +
|
kratos.directory +
|
||||||
"/assets/img/payment/wechat.png\"></label></div></div>",
|
'/assets/img/payment/wechat.png"></label></div></div>',
|
||||||
});
|
});
|
||||||
$(".choose-pay input[type=\"radio\"]").click(function () {
|
$('.choose-pay input[type="radio"]').click(function () {
|
||||||
var id = $(this).attr("id");
|
var id = $(this).attr("id");
|
||||||
if (id == "alipay") {
|
if (id == "alipay") {
|
||||||
$(".qr-pay #alipay_qr").removeClass("d-none");
|
$(".qr-pay #alipay_qr").removeClass("d-none");
|
||||||
|
@ -133,9 +133,9 @@ var donateConfig = function () {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
var accordionConfig = function () {
|
var accordionConfig = function () {
|
||||||
$(".acheader").on("click", function (event) {
|
$(".acheader").on("click", function (event) {
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
$this.closest(".accordion").find(".contents").slideToggle(300);
|
$this.closest(".accordion").find(".contents").slideToggle(300);
|
||||||
|
@ -146,26 +146,26 @@ var accordionConfig = function () {
|
||||||
}
|
}
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
var consoleConfig = function () {
|
var consoleConfig = function () {
|
||||||
console.log(
|
console.log(
|
||||||
"\n Kratos Pjax Edition v" +
|
"\n Kratos Pjax Edition v" +
|
||||||
KRATOS_VERSION +
|
KRATOS_VERSION +
|
||||||
"\n\n https://github.com/devhaozi/kratos \n\n",
|
"\n\n https://github.com/devhaozi/kratos \n\n"
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
var lightGalleryConfig = function () {
|
var lightGalleryConfig = function () {
|
||||||
if (kratos.lightgallery === "1" && window.lightGallery !== undefined) {
|
if (typeof lightGallery !== 'undefined') {
|
||||||
lightGallery(document.getElementById("lightgallery"), {
|
lightGallery(document.getElementById("lightgallery"), {
|
||||||
selector:
|
selector:
|
||||||
"a[href$=\".jpg\"], a[href$=\".jpeg\"], a[href$=\".png\"], a[href$=\".gif\"], a[href$=\".bmp\"], a[href$=\".webp\"]",
|
'a[href$=".jpg"], a[href$=".jpeg"], a[href$=".png"], a[href$=".gif"], a[href$=".bmp"], a[href$=".webp"]',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
document.addEventListener("DOMContentLoaded", function () {
|
document.addEventListener("DOMContentLoaded", function () {
|
||||||
accordionConfig();
|
accordionConfig();
|
||||||
navbarConfig();
|
navbarConfig();
|
||||||
tooltipConfig();
|
tooltipConfig();
|
||||||
|
@ -177,7 +177,7 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||||
donateConfig();
|
donateConfig();
|
||||||
consoleConfig();
|
consoleConfig();
|
||||||
lightGalleryConfig();
|
lightGalleryConfig();
|
||||||
});
|
});
|
||||||
|
|
||||||
function afterPjax() {
|
function afterPjax() {
|
||||||
accordionConfig();
|
accordionConfig();
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* @version 2023.08.25
|
* @version 2023.08.25
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('THEME_VERSION', '4.2.4.2');
|
define('THEME_VERSION', '4.3.1.1');
|
||||||
|
|
||||||
if (defined('WP_USE_THEMES') && WP_USE_THEMES === false) {
|
if (defined('WP_USE_THEMES') && WP_USE_THEMES === false) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* 核心函数
|
* 核心函数
|
||||||
* @author Seaton Jiang <hi@seatonjiang.com>
|
* @author Seaton Jiang <hi@seatonjiang.com>
|
||||||
* @license GPL-3.0 License
|
* @license GPL-3.0 License
|
||||||
* @version 2023.04.04
|
* @version 2024.08.05
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use YahnisElsts\PluginUpdateChecker\v5\PucFactory;
|
use YahnisElsts\PluginUpdateChecker\v5\PucFactory;
|
||||||
|
@ -43,7 +43,7 @@ function theme_autoload()
|
||||||
wp_enqueue_style('bootstrap', ASSET_PATH . '/assets/css/bootstrap.min.css', array(), '4.5.0');
|
wp_enqueue_style('bootstrap', ASSET_PATH . '/assets/css/bootstrap.min.css', array(), '4.5.0');
|
||||||
wp_enqueue_style('kicon', ASSET_PATH . '/assets/css/iconfont.min.css', array(), THEME_VERSION);
|
wp_enqueue_style('kicon', ASSET_PATH . '/assets/css/iconfont.min.css', array(), THEME_VERSION);
|
||||||
wp_enqueue_style('layer', ASSET_PATH . '/assets/css/layer.min.css', array(), '3.1.1');
|
wp_enqueue_style('layer', ASSET_PATH . '/assets/css/layer.min.css', array(), '3.1.1');
|
||||||
if (kratos_option('g_lightgallery', true)) {
|
if ((kratos_option('g_article_lightgallery', true) && is_single()) || (kratos_option('g_page_lightgallery', true) && is_page())) {
|
||||||
wp_enqueue_script('lightgallery', ASSET_PATH . '/assets/js/lightgallery.min.js', array(), '1.4.0', true);
|
wp_enqueue_script('lightgallery', ASSET_PATH . '/assets/js/lightgallery.min.js', array(), '1.4.0', true);
|
||||||
wp_enqueue_style('lightgallery', ASSET_PATH . '/assets/css/lightgallery.min.css', array(), '1.4.0');
|
wp_enqueue_style('lightgallery', ASSET_PATH . '/assets/css/lightgallery.min.css', array(), '1.4.0');
|
||||||
}
|
}
|
||||||
|
@ -112,7 +112,6 @@ function theme_autoload()
|
||||||
'directory' => ASSET_PATH,
|
'directory' => ASSET_PATH,
|
||||||
'alipay' => kratos_option('g_donate_fieldset')['g_donate_alipay'] ?? '',
|
'alipay' => kratos_option('g_donate_fieldset')['g_donate_alipay'] ?? '',
|
||||||
'wechat' => kratos_option('g_donate_fieldset')['g_donate_wechat'] ?? '',
|
'wechat' => kratos_option('g_donate_fieldset')['g_donate_wechat'] ?? '',
|
||||||
'lightgallery' => kratos_option('g_lightgallery', true),
|
|
||||||
'repeat' => __('您已经赞过了', 'kratos'),
|
'repeat' => __('您已经赞过了', 'kratos'),
|
||||||
'thanks' => __('感谢您的支持', 'kratos'),
|
'thanks' => __('感谢您的支持', 'kratos'),
|
||||||
'donate' => __('打赏作者', 'kratos'),
|
'donate' => __('打赏作者', 'kratos'),
|
||||||
|
@ -131,6 +130,16 @@ function kratos_admin_enqueue()
|
||||||
|
|
||||||
add_action('admin_enqueue_scripts', 'kratos_admin_enqueue', 20);
|
add_action('admin_enqueue_scripts', 'kratos_admin_enqueue', 20);
|
||||||
|
|
||||||
|
// 后台提示
|
||||||
|
if (kratos_option('g_admin_notice', true)) {
|
||||||
|
function custom_admin_notice()
|
||||||
|
{
|
||||||
|
$message = __('感谢您使用 Kratos 主题进行创作,全新主题 Fraise 即将上线,欢迎加入 QQ 群讨论交流:618958939,可在「主题设置 - 全站配置 - 后台管理员通知」关闭此通知。', 'kratos');
|
||||||
|
echo '<div class="notice notice-info "><p>' . $message . '</p></div>';
|
||||||
|
}
|
||||||
|
add_action('admin_notices', 'custom_admin_notice');
|
||||||
|
}
|
||||||
|
|
||||||
// 前台管理员导航
|
// 前台管理员导航
|
||||||
if (!kratos_option('g_adminbar', true)) {
|
if (!kratos_option('g_adminbar', true)) {
|
||||||
add_filter('show_admin_bar', '__return_false');
|
add_filter('show_admin_bar', '__return_false');
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WP Bootstrap Navwalker
|
* WP Bootstrap Navwalker
|
||||||
*
|
*
|
||||||
|
@ -8,7 +9,7 @@
|
||||||
* Plugin Name: WP Bootstrap Navwalker
|
* Plugin Name: WP Bootstrap Navwalker
|
||||||
* Plugin URI: https://github.com/wp-bootstrap/wp-bootstrap-navwalker
|
* Plugin URI: https://github.com/wp-bootstrap/wp-bootstrap-navwalker
|
||||||
* Description: A custom WordPress nav walker class to implement the Bootstrap 4 navigation style in a custom theme using the WordPress built in menu manager.
|
* Description: A custom WordPress nav walker class to implement the Bootstrap 4 navigation style in a custom theme using the WordPress built in menu manager.
|
||||||
* Author: Edward McIntyre - @twittem, WP Bootstrap, William Patton - @pattonwebz
|
* Author: Edward McIntyre - @twittem, WP Bootstrap, William Patton - @pattonwebz, IanDelMar - @IanDelMar
|
||||||
* Version: 4.3.0
|
* Version: 4.3.0
|
||||||
* Author URI: https://github.com/wp-bootstrap
|
* Author URI: https://github.com/wp-bootstrap
|
||||||
* GitHub Plugin URI: https://github.com/wp-bootstrap/wp-bootstrap-navwalker
|
* GitHub Plugin URI: https://github.com/wp-bootstrap/wp-bootstrap-navwalker
|
||||||
|
@ -310,7 +311,6 @@ if (!class_exists('WP_Bootstrap_Navwalker')) {
|
||||||
|
|
||||||
// END appending the internal item contents to the output.
|
// END appending the internal item contents to the output.
|
||||||
$output .= apply_filters('walker_nav_menu_start_el', $item_output, $item, $depth, $args);
|
$output .= apply_filters('walker_nav_menu_start_el', $item_output, $item, $depth, $args);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -337,11 +337,13 @@ if (!class_exists('WP_Bootstrap_Navwalker')) {
|
||||||
public function display_element($element, &$children_elements, $max_depth, $depth, $args, &$output)
|
public function display_element($element, &$children_elements, $max_depth, $depth, $args, &$output)
|
||||||
{
|
{
|
||||||
if (!$element) {
|
if (!$element) {
|
||||||
return;}
|
return;
|
||||||
|
}
|
||||||
$id_field = $this->db_fields['id'];
|
$id_field = $this->db_fields['id'];
|
||||||
// Display this element.
|
// Display this element.
|
||||||
if (is_object($args[0])) {
|
if (is_object($args[0])) {
|
||||||
$args[0]->has_children = !empty($children_elements[$element->$id_field]);}
|
$args[0]->has_children = !empty($children_elements[$element->$id_field]);
|
||||||
|
}
|
||||||
parent::display_element($element, $children_elements, $max_depth, $depth, $args, $output);
|
parent::display_element($element, $children_elements, $max_depth, $depth, $args, $output);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -381,9 +383,11 @@ if (!class_exists('WP_Bootstrap_Navwalker')) {
|
||||||
}
|
}
|
||||||
$fallback_output .= '<ul';
|
$fallback_output .= '<ul';
|
||||||
if ($menu_id) {
|
if ($menu_id) {
|
||||||
$fallback_output .= ' id="' . esc_attr($menu_id) . '"';}
|
$fallback_output .= ' id="' . esc_attr($menu_id) . '"';
|
||||||
|
}
|
||||||
if ($menu_class) {
|
if ($menu_class) {
|
||||||
$fallback_output .= ' class="' . esc_attr($menu_class) . '"';}
|
$fallback_output .= ' class="' . esc_attr($menu_class) . '"';
|
||||||
|
}
|
||||||
$fallback_output .= '>';
|
$fallback_output .= '>';
|
||||||
$fallback_output .= '<li class="nav-item"><a href="' . esc_url(admin_url('nav-menus.php')) . '" class="nav-link">' . esc_attr__('添加导航', 'kratos') . '</a></li>';
|
$fallback_output .= '<li class="nav-item"><a href="' . esc_url(admin_url('nav-menus.php')) . '" class="nav-link">' . esc_attr__('添加导航', 'kratos') . '</a></li>';
|
||||||
$fallback_output .= '</ul>';
|
$fallback_output .= '</ul>';
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* 主题选项
|
* 主题选项
|
||||||
* @author Seaton Jiang <hi@seatonjiang.com>
|
* @author Seaton Jiang <hi@seatonjiang.com>
|
||||||
* @license GPL-3.0 License
|
* @license GPL-3.0 License
|
||||||
* @version 2023.08.25
|
* @version 2024.01.17
|
||||||
*/
|
*/
|
||||||
|
|
||||||
defined('ABSPATH') || exit;
|
defined('ABSPATH') || exit;
|
||||||
|
@ -172,6 +172,20 @@ CSF::createSection($prefix, array(
|
||||||
'subtitle' => __('启用/禁用 Gutenberg 编辑器', 'kratos'),
|
'subtitle' => __('启用/禁用 Gutenberg 编辑器', 'kratos'),
|
||||||
'default' => false,
|
'default' => false,
|
||||||
),
|
),
|
||||||
|
array(
|
||||||
|
'id' => 'g_page_lightgallery',
|
||||||
|
'type' => 'switcher',
|
||||||
|
'title' => __('页面图片灯箱', 'kratos'),
|
||||||
|
'subtitle' => __('启用/禁用页面图片灯箱功能', 'kratos'),
|
||||||
|
'default' => true,
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'id' => 'g_admin_notice',
|
||||||
|
'type' => 'switcher',
|
||||||
|
'title' => __('后台管理员通知', 'kratos'),
|
||||||
|
'subtitle' => __('启用/禁用后台管理员通知', 'kratos'),
|
||||||
|
'default' => true,
|
||||||
|
),
|
||||||
array(
|
array(
|
||||||
'id' => 'g_excerpt_length',
|
'id' => 'g_excerpt_length',
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
|
@ -739,7 +753,7 @@ CSF::createSection($prefix, array(
|
||||||
'default' => true,
|
'default' => true,
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'id' => 'g_lightgallery',
|
'id' => 'g_article_lightgallery',
|
||||||
'type' => 'switcher',
|
'type' => 'switcher',
|
||||||
'title' => __('文章图片灯箱', 'kratos'),
|
'title' => __('文章图片灯箱', 'kratos'),
|
||||||
'subtitle' => __('启用/禁用文章图片灯箱功能', 'kratos'),
|
'subtitle' => __('启用/禁用文章图片灯箱功能', 'kratos'),
|
||||||
|
@ -1282,7 +1296,7 @@ CSF::createSection($prefix, array(
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'type' => 'content',
|
'type' => 'content',
|
||||||
'content' => '如果您有用到我开发维护的项目,请考虑支持一下我的工作,让我可以持续的维护它们,您可在爱发电(<a href="https://afdian.net/a/seatonjiang" target="_blank">https://afdian.net/a/seatonjiang</a>)中进行打赏,谢谢!',
|
'content' => '如果您有用到我开发维护的项目,请考虑支持一下我的工作,让我可以持续的维护它们,您可在爱发电(<a href="https://afdian.com/a/seatonjiang" target="_blank">https://afdian.com/a/seatonjiang</a>)中进行打赏,谢谢!',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
));
|
));
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "4.2.4.2",
|
"version": "4.3.1.1",
|
||||||
"details_url": "https://github.com/devhaozi/kratos/releases/tag/v4.2.4.2",
|
"details_url": "https://github.com/devhaozi/kratos/releases/tag/v4.3.1.1",
|
||||||
"download_url": "https://dl.cdn.haozi.net/kratos/v4.2.4.2.zip"
|
"download_url": "https://dl.cdn.haozi.net/kratos/v4.3.1.1.zip"
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -4,7 +4,7 @@
|
||||||
* Template Name: 单页样式
|
* Template Name: 单页样式
|
||||||
* @author Seaton Jiang <hi@seatonjiang.com>
|
* @author Seaton Jiang <hi@seatonjiang.com>
|
||||||
* @license GPL-3.0 License
|
* @license GPL-3.0 License
|
||||||
* @version 2022.11.27
|
* @version 2024.01.17
|
||||||
*/
|
*/
|
||||||
|
|
||||||
get_header(); ?>
|
get_header(); ?>
|
||||||
|
@ -18,7 +18,7 @@ get_header(); ?>
|
||||||
<div class="header text-center">
|
<div class="header text-center">
|
||||||
<h1 class="title m-0"><?php the_title(); ?></h1>
|
<h1 class="title m-0"><?php the_title(); ?></h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content" id="lightgallery">
|
||||||
<?php
|
<?php
|
||||||
the_content();
|
the_content();
|
||||||
wp_link_pages(
|
wp_link_pages(
|
||||||
|
|
4
page.php
4
page.php
|
@ -4,7 +4,7 @@
|
||||||
* 页面模板
|
* 页面模板
|
||||||
* @author Seaton Jiang <hi@seatonjiang.com>
|
* @author Seaton Jiang <hi@seatonjiang.com>
|
||||||
* @license GPL-3.0 License
|
* @license GPL-3.0 License
|
||||||
* @version 2022.01.26
|
* @version 2024.01.17
|
||||||
*/
|
*/
|
||||||
|
|
||||||
get_header(); ?>
|
get_header(); ?>
|
||||||
|
@ -18,7 +18,7 @@ get_header(); ?>
|
||||||
<div class="header text-center">
|
<div class="header text-center">
|
||||||
<h1 class="title m-0"><?php the_title(); ?></h1>
|
<h1 class="title m-0"><?php the_title(); ?></h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content" id="lightgallery">
|
||||||
<?php
|
<?php
|
||||||
the_content();
|
the_content();
|
||||||
wp_link_pages(
|
wp_link_pages(
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
/*
|
/*
|
||||||
Theme Name: Kratos Pjax Edition
|
Theme Name: Kratos Pjax Edition
|
||||||
Text Domain: kratos
|
Text Domain: kratos
|
||||||
Version: 4.2.4.2
|
Version: 4.3.1
|
||||||
Requires PHP: 7.4
|
Requires PHP: 8.0
|
||||||
Requires at least: 5.3.0
|
Requires at least: 5.3.0
|
||||||
Description: 主题提供了多种针对自媒体博客需求的侧栏工具,删繁就简专注于用户的阅读体验,优化的邮件中心为你的网站留存加分添彩。
|
Description: 主题提供了多种针对自媒体博客需求的侧栏工具,删繁就简专注于用户的阅读体验,优化的邮件中心为你的网站留存加分添彩。
|
||||||
Tags: 博客, 双栏, 响应式, 自定义背景, 自定义颜色, 自定义图标, 自定义菜单, 特色图像, 收录优化, 邮件中心, 主题选项, 小工具, 文章置顶, 无障碍友好
|
Tags: 博客, 双栏, 响应式, 自定义背景, 自定义颜色, 自定义图标, 自定义菜单, 特色图像, 收录优化, 邮件中心, 主题选项, 小工具, 文章置顶, 无障碍友好
|
||||||
|
|
Loading…
Reference in New Issue