Skip to content

Commit

Permalink
Merge pull request #727 from mirai-mamori/preview
Browse files Browse the repository at this point in the history
Ver 2.6.1.1
  • Loading branch information
mirai-mamori authored May 15, 2023
2 parents 85c5f11 + 8f38f4b commit d21c577
Show file tree
Hide file tree
Showing 22 changed files with 1,221 additions and 921 deletions.
12 changes: 6 additions & 6 deletions footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<?php wp_nav_menu( array( 'depth' => 2, 'theme_location' => 'primary', 'container' => false ) ); ?>
</div><!-- m-nav-center end -->
<button id="moblieGoTop" title="<?=__('Go to top','sakurairo');?>"><i class="fa-solid fa-caret-up fa-lg"></i></button>
<button id="changskin"><i class="fa-solid fa-compass-drafting fa-lg fa-flip" style="--fa-animation-duration: 3s;"></i></button>
<button id="changskin" title="<?=__('Control Panel','sakurairo');?>" ><i class="fa-solid fa-compass-drafting fa-lg fa-flip" style="--fa-animation-duration: 3s;"></i></button>
<!-- search start -->
<form class="js-search search-form search-form--modal" method="get" action="<?php echo home_url(); ?>" role="search">
<div class="search-form__inner">
Expand Down Expand Up @@ -117,16 +117,16 @@
<div class="theme-controls row-container">
<?php if (iro_opt('widget_daynight', 'true')): ?>
<ul class="menu-list">
<li id="white-bg">
<li id="white-bg" title="<?=__('Light Mode','sakurairo');?>" >
<i class="fa-solid fa-display fa-sm"></i>
</li><!--Default-->
<li id="dark-bg">
<li id="dark-bg" title="<?=__('Dark Mode','sakurairo');?>" >
<i class="fa-regular fa-moon"></i>
</li><!--Night-->
</ul>
<?php endif; ?>
<?php if(array_search(1, $reception_background) !== false): ?>
<ul class="menu-list">
<ul class="menu-list" title="<?=__('Toggle Page Background Image','sakurairo');?>">
<?php
$bgIcons = [
['heart_shaped', 'fa-regular fa-heart', 'diy1-bg'],
Expand All @@ -147,10 +147,10 @@
<?php endif; ?>
<?php if (iro_opt('widget_font', 'true')): ?>
<div class="font-family-controls row-container">
<button type="button" class="control-btn-serif selected" data-name="serif">
<button type="button" class="control-btn-serif selected" title="<?=__('Switch To Font A','sakurairo');?>" data-name="serif">
<i class="fa-solid fa-font fa-lg"></i>
</button>
<button type="button" class="control-btn-sans-serif" data-name="sans-serif">
<button type="button" class="control-btn-sans-serif" title="<?=__('Switch To Font B','sakurairo');?>" data-name="sans-serif">
<i class="fa-solid fa-bold fa-lg"></i>
</button>
</div>
Expand Down
39 changes: 25 additions & 14 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


define('IRO_VERSION', wp_get_theme()->get('Version'));
define('INT_VERSION', '18.0.0');
define('INT_VERSION', '18.1.1');
define('BUILD_VERSION', '2');

function check_php_version($preset_version) {
Expand Down Expand Up @@ -503,12 +503,21 @@ function is_webp(): bool
return (isset($_COOKIE['su_webp']) || (isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'image/webp')));
}

/*
* 友情链接
/**
* 获取友情链接列表
* @Param: string $sorting_mode 友情链接列表排序模式,name、updated、rating、rand四种模式
* @Param: string $link_order 友情链接列表排序方法,ASC、DESC(升序或降序)
* @Param: mixed $id 友情链接ID
* @Param: string $output HTML格式化输出
*/
function get_the_link_items($id = null)
{
$bookmarks = get_bookmarks('orderby=date&category=' . $id);
{ $sorting_mode = iro_opt('friend_link_sorting_mode');
$link_order = iro_opt('friend_link_order');
$bookmarks = get_bookmarks(array(
'orderby' => $sorting_mode,
'order' => $link_order,
'category' => $id
));
$output = '';
if (!empty($bookmarks)) {
$output .= '<ul class="link-items fontSmooth">';
Expand All @@ -532,7 +541,7 @@ function get_link_items()
{
$linkcats = get_terms('link_category');
$result = null;
if (empty($linkcats)) return get_the_link_items();
if (empty($linkcats)) return get_the_link_items(); // 友链无分类,直接返回全部列表
$link_category_need_display = get_post_meta(get_queried_object_id(), 'link_category_need_display', false);
foreach ($linkcats as $linkcat) {
if (!empty($link_category_need_display) && !in_array($linkcat->name, $link_category_need_display, true)) {
Expand Down Expand Up @@ -1172,14 +1181,16 @@ function toc_support($content)
add_filter('the_content_feed', 'toc_support');

function check_title_tags($content) {
$dom = new DOMDocument();
@$dom->loadHTML($content);
$headings = $dom->getElementsByTagName('h1');
for ($i = 1; $i <= 6; $i++) {
$headings = $dom->getElementsByTagName('h' . $i);
foreach ($headings as $heading) {
if (trim($heading->nodeValue) != '') {
return true;
if (!empty($content)) {
$dom = new DOMDocument();
@$dom->loadHTML($content);
$headings = $dom->getElementsByTagName('h1');
for ($i = 1; $i <= 6; $i++) {
$headings = $dom->getElementsByTagName('h' . $i);
foreach ($headings as $heading) {
if (trim($heading->nodeValue) != '') {
return true;
}
}
}
}
Expand Down
1 change: 1 addition & 0 deletions inc/decorate.php
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,7 @@ function customizer_css() { ?>
-moz-animation: fadeInLeft <?=iro_opt('nav_menu_animation_time'); ?>s;
-webkit-animation:fadeInLeft <?=iro_opt('nav_menu_animation_time'); ?>s;
animation: fadeInLeft <?=iro_opt('nav_menu_animation_time'); ?>s;
max-width: 76vw;
}
@-moz-keyframes fadeInLeft {
0% {
Expand Down
Binary file modified languages/ja.mo
Binary file not shown.
56 changes: 40 additions & 16 deletions languages/ja.po
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
msgid ""
msgstr ""
"Project-Id-Version: Sakurairo\n"
"POT-Creation-Date: 2023-05-10 18:08+0800\n"
"PO-Revision-Date: 2023-05-10 18:08+0800\n"
"POT-Creation-Date: 2023-05-15 10:36+0800\n"
"PO-Revision-Date: 2023-05-15 10:37+0800\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: ja_JP\n"
Expand Down Expand Up @@ -139,6 +139,10 @@ msgstr "ロード時間 %.3f 秒 | %d クエリ | RAM 使用量 %.2f MB "
msgid "Go to top"
msgstr "このページのトップへ"

#: footer.php:69
msgid "Control Panel"
msgstr "コントロールパネル"

#: footer.php:75 footer.php:83
msgid "Want to find something?"
msgstr "何かを見つけたいですか?"
Expand All @@ -147,6 +151,26 @@ msgstr "何かを見つけたいですか?"
msgid "Search"
msgstr "検索"

#: footer.php:120
msgid "Light Mode"
msgstr "ライトフィルター"

#: footer.php:123
msgid "Dark Mode"
msgstr "ダークモード"

#: footer.php:129
msgid "Toggle Page Background Image"
msgstr "検索エリア背景画像"

#: footer.php:150
msgid "Switch To Font A"
msgstr "フォントAに切り替え"

#: footer.php:153
msgid "Switch To Font B"
msgstr "フォントBに切り替え"

#: functions.php:97
msgid "Nav Menus"
msgstr "メニュー"
Expand Down Expand Up @@ -329,47 +353,47 @@ msgstr "いいえ"
msgid "Edit"
msgstr "編集"

#: functions.php:517
#: functions.php:526
msgid "This guy is so lazy ╮(╯▽╰)╭"
msgstr "こやつはとても怠惰な╮(╯▽╰)╭"

#: functions.php:762
#: functions.php:771
msgid "Download Link"
msgstr "ダウンロードリンク"

#: functions.php:835
#: functions.php:844
msgid "Remember me"
msgstr "ログイン状態を保存する"

#: functions.php:1254
#: functions.php:1265
msgid "All expand/collapse"
msgstr "すべての展開/折りたたみ"

#: functions.php:1287
#: functions.php:1298
msgid " "
msgstr " "

#: functions.php:1291
#: functions.php:1302
msgid " post(s)"
msgstr " 記事"

#: functions.php:1319 functions.php:1322 inc/theme_plus.php:427
#: functions.php:1330 functions.php:1333 inc/theme_plus.php:427
msgid "Dashboard"
msgstr "ダッシュボード"

#: functions.php:1627
#: functions.php:1638
msgid "<b>ERROR</b>: This email domain (<b>@"
msgstr "<b>エラー</b>: このメールドメイン (<b>@"

#: functions.php:1752
#: functions.php:1763
msgid "QQ"
msgstr "QQ"

#: functions.php:1836
#: functions.php:1847
msgid "Sidebar"
msgstr "サイドバー"

#: functions.php:1965
#: functions.php:1976
msgid ""
"<b> For a better experience, please do not set <a href=\"/wp-admin/options-"
"permalink.php\"> permalink </a> as plain. To do this, you may need to "
Expand All @@ -381,7 +405,7 @@ msgstr ""
"href=\"https://qiita.com/cyborg__ninja/items/8a191a00d402e78d8823\" "
"target=\"_blank\"> 擬似静的化 </a>を構成する必要があります。 </b>"

#: functions.php:2095
#: functions.php:2106
msgid "Expand / Collapse"
msgstr "展開/折りたたみ"

Expand Down Expand Up @@ -658,11 +682,11 @@ msgstr "前の投稿"
msgid "Next Post"
msgstr "次の投稿"

#: page-word.php:39
#: page-word.php:41
msgid "You have not posted a comment yet"
msgstr "あなたはまだコメントを投稿していません"

#: page-word.php:40
#: page-word.php:42
msgid "Go and post your first comment now"
msgstr "今すぐ最初のコメントを投稿してください"

Expand Down
54 changes: 39 additions & 15 deletions languages/sakurairo.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Sakurairo\n"
"POT-Creation-Date: 2023-05-10 18:08+0800\n"
"POT-Creation-Date: 2023-05-15 10:36+0800\n"
"PO-Revision-Date: 2021-06-26 15:15+0800\n"
"Last-Translator: \n"
"Language-Team: \n"
Expand Down Expand Up @@ -139,6 +139,10 @@ msgstr ""
msgid "Go to top"
msgstr ""

#: footer.php:69
msgid "Control Panel"
msgstr ""

#: footer.php:75 footer.php:83
msgid "Want to find something?"
msgstr ""
Expand All @@ -147,6 +151,26 @@ msgstr ""
msgid "Search"
msgstr ""

#: footer.php:120
msgid "Light Mode"
msgstr ""

#: footer.php:123
msgid "Dark Mode"
msgstr ""

#: footer.php:129
msgid "Toggle Page Background Image"
msgstr ""

#: footer.php:150
msgid "Switch To Font A"
msgstr ""

#: footer.php:153
msgid "Switch To Font B"
msgstr ""

#: functions.php:97
msgid "Nav Menus"
msgstr ""
Expand Down Expand Up @@ -318,55 +342,55 @@ msgstr ""
msgid "Edit"
msgstr ""

#: functions.php:517
#: functions.php:526
msgid "This guy is so lazy ╮(╯▽╰)╭"
msgstr ""

#: functions.php:762
#: functions.php:771
msgid "Download Link"
msgstr ""

#: functions.php:835
#: functions.php:844
msgid "Remember me"
msgstr ""

#: functions.php:1254
#: functions.php:1265
msgid "All expand/collapse"
msgstr ""

#: functions.php:1287
#: functions.php:1298
msgid " "
msgstr ""

#: functions.php:1291
#: functions.php:1302
msgid " post(s)"
msgstr ""

#: functions.php:1319 functions.php:1322 inc/theme_plus.php:427
#: functions.php:1330 functions.php:1333 inc/theme_plus.php:427
msgid "Dashboard"
msgstr ""

#: functions.php:1627
#: functions.php:1638
msgid "<b>ERROR</b>: This email domain (<b>@"
msgstr ""

#: functions.php:1752
#: functions.php:1763
msgid "QQ"
msgstr ""

#: functions.php:1836
#: functions.php:1847
msgid "Sidebar"
msgstr ""

#: functions.php:1965
#: functions.php:1976
msgid ""
"<b> For a better experience, please do not set <a href=\"/wp-admin/options-"
"permalink.php\"> permalink </a> as plain. To do this, you may need to "
"configure <a href=\"https://www.wpdaxue.com/wordpress-rewriterule.html\" "
"target=\"_blank\"> pseudo-static </a>. </ b>"
msgstr ""

#: functions.php:2095
#: functions.php:2106
msgid "Expand / Collapse"
msgstr ""

Expand Down Expand Up @@ -644,11 +668,11 @@ msgstr ""
msgid "Next Post"
msgstr ""

#: page-word.php:39
#: page-word.php:41
msgid "You have not posted a comment yet"
msgstr ""

#: page-word.php:40
#: page-word.php:42
msgid "Go and post your first comment now"
msgstr ""

Expand Down
Binary file modified languages/zh_CN.mo
Binary file not shown.
Loading

0 comments on commit d21c577

Please sign in to comment.