mirror of
https://github.com/mashirozx/sakura.git
synced 2024-11-25 08:18:14 +08:00
commit
bcdcba96ea
9
404.php
9
404.php
@ -14,7 +14,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title itemprop="name"><?php global $page, $paged;wp_title( '-', true, 'right' );
|
||||
bloginfo( 'name' );$site_description = get_bloginfo( 'description', 'display' );
|
||||
if ( $site_description && ( is_home() || is_front_page() ) ) echo " - $site_description";if ( $paged >= 2 || $page >= 2 ) echo ' - ' . sprintf( __( '第 %s 页'), max( $paged, $page ) );?>
|
||||
if ( $site_description && ( is_home() || is_front_page() ) ) echo " - $site_description";if ( $paged >= 2 || $page >= 2 ) echo ' - ' . sprintf( __( 'page %s'), max( $paged, $page ) );/*第 %s 页*/?>
|
||||
</title>
|
||||
<link type="text/css" media="all" href="https://cdn.jsdelivr.net/gh/moezx/cdn@3.2.2/css/lib.css" rel="stylesheet" />
|
||||
<?php wp_head(); ?>
|
||||
@ -43,12 +43,11 @@ if (!no_report) httpGet(report_url);
|
||||
<div class="anim-icon" id="404" style="height: 66%;"></div>
|
||||
</div>
|
||||
<div class="err-button back">
|
||||
<a id="golast" href=javascript:history.go(-1);>返回上一页</a>
|
||||
<a id="gohome" href="<?php bloginfo('url');?>">返回主页</a>
|
||||
<a id="golast" href=javascript:history.go(-1);><?php _e('return to previous page','sakura');/*返回上一页*/?></a>
|
||||
<a id="gohome" href="<?php bloginfo('url');?>"><?php _e('return to home page','sakura');/*返回主页*/?></a>
|
||||
</div>
|
||||
<div style="display:block; width:284px;margin: auto;">
|
||||
<p style="margin-bottom: 1em;margin-top: 1.5em;text-align: center;font-size: 15px;">别急,试试站内搜索?</p>
|
||||
<p style="margin-bottom: 1em;text-align: center;font-size: 15px;">Don't worry, search in site?</p>
|
||||
<p style="margin-bottom: 1em;margin-top: 1.5em;text-align: center;font-size: 15px;"><?php _e('Don\'t worry, search in site?','sakura');/*别急,试试站内搜索?*/?></p>
|
||||
<form class="s-search" method="get" action="/" role="search">
|
||||
<i class="iconfont icon-search" style="bottom: 8px;left: 12px;"></i>
|
||||
<input class="text-input" style="padding: 8px 20px 8px 46px;" type="search" name="s" placeholder="<?php _e('Search...', 'akina') ?>" required>
|
||||
|
@ -924,6 +924,6 @@
|
||||
}
|
||||
|
||||
/*other fix*/
|
||||
.entry-content ol, ul {
|
||||
.entry-content ol,.entry-content ul {
|
||||
margin: auto !important;
|
||||
}
|
||||
}
|
||||
|
36
comments.php
36
comments.php
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/*if('comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
|
||||
die(esc_html__('Please do not load this page directly.', 'akina'));*/
|
||||
die(__('Please do not load this page directly.', 'akina'));*/
|
||||
|
||||
if(post_password_required()){
|
||||
return;
|
||||
@ -18,13 +18,13 @@
|
||||
<section id="comments" class="comments">
|
||||
|
||||
<div class="commentwrap comments-hidden">
|
||||
<div class="notification"><i class="iconfont icon-mark"></i><?php esc_html_e('查看评论', 'akina'); ?> -
|
||||
<span class="noticom"><?php comments_number('NOTHING', '1 条评论', '% 条评论'); ?> </span>
|
||||
<div class="notification"><i class="iconfont icon-mark"></i><?php _e('view comments', 'sakura'); /*查看评论*/?> -
|
||||
<span class="noticom"><?php comments_number('NOTHING', '1'.__(" comment","sakura"), '%'.__(" comments","sakura")); ?> </span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="comments-main">
|
||||
<h3 id="comments-list-title">Comments | <span class="noticom"><?php comments_number('NOTHING', '1 条评论', '% 条评论'); ?> </span></h3>
|
||||
<h3 id="comments-list-title">Comments | <span class="noticom"><?php comments_number('NOTHING', '1'.__(" comment","sakura"), '%'.__(" comments","sakura")); ?> </span></h3>
|
||||
<div id="loading-comments"><span></span></div>
|
||||
<?php if(have_comments()): ?>
|
||||
|
||||
@ -40,7 +40,7 @@
|
||||
|
||||
<?php if(comments_open()): ?>
|
||||
<div class="commentwrap">
|
||||
<div class="notification-hidden"><i class="iconfont icon-mark"></i> <?php esc_html_e('暂无评论', 'akina'); ?></div>
|
||||
<div class="notification-hidden"><i class="iconfont icon-mark"></i> <?php _e('no comment', 'sakura'); /*暂无评论*/?></div>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
@ -50,22 +50,22 @@
|
||||
<?php
|
||||
|
||||
if(comments_open()){
|
||||
if(akina_option('norobot')) $robot_comments = '<label class="siren-checkbox-label"><input class="siren-checkbox-radio" type="checkbox" name="no-robot"><span class="siren-no-robot-checkbox siren-checkbox-radioInput"></span>滴,学生卡 | I\'m not a robot</label>';
|
||||
$private_ms = akina_option('open_private_message') ? '<label class="siren-checkbox-label"><input class="siren-checkbox-radio" type="checkbox" name="is-private"><span class="siren-is-private-checkbox siren-checkbox-radioInput"></span>悄悄话 | Comment in private</label>' : '';
|
||||
$mail_notify = akina_option('mail_notify') ? '<label class="siren-checkbox-label"><input class="siren-checkbox-radio" type="checkbox" name="mail-notify"><span class="siren-mail-notify-checkbox siren-checkbox-radioInput"></span>邮件通知 | Comment reply notify</label>' : '';
|
||||
if(akina_option('norobot')) $robot_comments = '<label class="siren-checkbox-label"><input class="siren-checkbox-radio" type="checkbox" name="no-robot"><span class="siren-no-robot-checkbox siren-checkbox-radioInput"></span>'.__('I\'m not a robot', 'sakura').'</label>';
|
||||
$private_ms = akina_option('open_private_message') ? '<label class="siren-checkbox-label"><input class="siren-checkbox-radio" type="checkbox" name="is-private"><span class="siren-is-private-checkbox siren-checkbox-radioInput"></span>'.__('Comment in private', 'sakura').'</label>' : '';
|
||||
$mail_notify = akina_option('mail_notify') ? '<label class="siren-checkbox-label"><input class="siren-checkbox-radio" type="checkbox" name="mail-notify"><span class="siren-mail-notify-checkbox siren-checkbox-radioInput"></span>'.__('Comment reply notify', 'sakura').'</label>' : '';
|
||||
$args = array(
|
||||
'id_form' => 'commentform',
|
||||
'id_submit' => 'submit',
|
||||
'title_reply' => '',
|
||||
'title_reply_to' => '<div class="graybar"><i class="fa fa-comments-o"></i>' . esc_html__('Leave a Reply to', 'akina') . ' %s' . '</div>',
|
||||
'cancel_reply_link' => esc_html__('Cancel Reply', 'akina'),
|
||||
'label_submit' => esc_html__('BiuBiuBiu~', 'akina'),
|
||||
'comment_field' => '<p><i class="iconfont icon-markdown"></i> Markdown Supported while <i class="fa fa-code" aria-hidden="true"></i> Forbidden</p><div class="comment-textarea"><textarea placeholder="' . esc_attr__('你是我一生只会遇见一次的惊喜', 'akina') . ' ..." name="comment" class="commentbody" id="comment" rows="5" tabindex="4"></textarea><label class="input-label">你是我一生只会遇见一次的惊喜 ...</label></div>
|
||||
'title_reply_to' => '<div class="graybar"><i class="fa fa-comments-o"></i>' . __('Leave a Reply to', 'sakura') . ' %s' . '</div>',
|
||||
'cancel_reply_link' => __('Cancel Reply', 'sakura'),
|
||||
'label_submit' => __('BiuBiuBiu~', 'sakura'),
|
||||
'comment_field' => '<p><i class="iconfont icon-markdown"></i> Markdown Supported while <i class="fa fa-code" aria-hidden="true"></i> Forbidden</p><div class="comment-textarea"><textarea placeholder="' . __("You are a surprise that I will only meet once in my life", "sakura") . ' ..." name="comment" class="commentbody" id="comment" rows="5" tabindex="4"></textarea><label class="input-label">' . __("You are a surprise that I will only meet once in my life", "sakura") . ' ...</label></div>
|
||||
<div id="upload-img-show"></div>
|
||||
<!--插入表情面版-->
|
||||
<p id="emotion-toggle" class="no-select">
|
||||
<span class="emotion-toggle-off">戳我试试 OωO</span>
|
||||
<span class="emotion-toggle-on">嘿嘿嘿 ヾ(≧∇≦*)ゝ</span>
|
||||
<span class="emotion-toggle-off">' . __("Click me OωO", "sakura")/*戳我试试 OωO*/ . '</span>
|
||||
<span class="emotion-toggle-on">' . __("Woooooow ヾ(≧∇≦*)ゝ", "sakura")/*嘿嘿嘿 ヾ(≧∇≦*)ゝ*/ . '</span>
|
||||
</p>
|
||||
<div class="emotion-box no-select">
|
||||
<table class="motion-switcher-table">
|
||||
@ -90,13 +90,13 @@
|
||||
'fields' => apply_filters( 'comment_form_default_fields', array(
|
||||
'avatar' => '<div class="cmt-info-container"><div class="comment-user-avatar"><img src="https://gravatar.shino.cc/avatar/f11f237b3de93c93b24045e71f7f65c6?s=80&d=mm&r=g"><div class="socila-check qq-check"><i class="fa fa-qq" aria-hidden="true"></i></div><div class="socila-check gravatar-check"><i class="fa fa-google" aria-hidden="true"></i></div></div>',
|
||||
'author' =>
|
||||
'<div class="popup cmt-popup cmt-author" onclick="cmt_showPopup(this)"><span class="popuptext" id="thePopup" style="margin-left: -115px;width: 230px;">输入QQ号将自动拉取昵称和头像</span><input type="text" placeholder="' . esc_attr__('昵称或QQ号', 'akina') . ' ' . ( $req ? '(' . esc_attr__('必须 Name* ', 'akina') . ')' : '') . '" name="author" id="author" value="' . esc_attr($comment_author) . '" size="22" autocomplete="off" tabindex="1" ' . ($req ? "aria-required='true'" : '' ). ' /></div>',
|
||||
'<div class="popup cmt-popup cmt-author" onclick="cmt_showPopup(this)"><span class="popuptext" id="thePopup" style="margin-left: -115px;width: 230px;">' . __("Auto pull nickname and avatar with a QQ num. entered", "sakura")/*输入QQ号将自动拉取昵称和头像*/ . '</span><input type="text" placeholder="' . __("Nickname or QQ number", "sakura") /*昵称或QQ号*/. ' ' . ( $req ? '(' . __("Name* ", "sakura") . ')' : '') . '" name="author" id="author" value="' . esc_attr($comment_author) . '" size="22" autocomplete="off" tabindex="1" ' . ($req ? "aria-required='true'" : '' ). ' /></div>',
|
||||
'email' =>
|
||||
'<div class="popup cmt-popup" onclick="cmt_showPopup(this)"><span class="popuptext" id="thePopup" style="margin-left: -65px;width: 130px;">你将收到回复通知</span><input type="text" placeholder="' . esc_attr__('邮箱', 'akina') . ' ' . ( $req ? '(' . esc_attr__('必须 Email* ', 'akina') . ')' : '') . '" name="email" id="email" value="' . esc_attr($comment_author_email) . '" size="22" tabindex="1" autocomplete="off" ' . ($req ? "aria-required='true'" : '' ). ' /></div>',
|
||||
'<div class="popup cmt-popup" onclick="cmt_showPopup(this)"><span class="popuptext" id="thePopup" style="margin-left: -65px;width: 130px;">' . __("You\' receive notification by email", "sakura")/*你将收到回复通知*/ . '</span><input type="text" placeholder="' . __("email", "sakura") . ' ' . ( $req ? '(' . __("Must* ", "sakura") . ')' : '') . '" name="email" id="email" value="' . esc_attr($comment_author_email) . '" size="22" tabindex="1" autocomplete="off" ' . ($req ? "aria-required='true'" : '' ). ' /></div>',
|
||||
'url' =>
|
||||
'<div class="popup cmt-popup" onclick="cmt_showPopup(this)"><span class="popuptext" id="thePopup" style="margin-left: -55px;width: 110px;">禁止小广告😀</span><input type="text" placeholder="' . esc_attr__('网站 (选填 Site)', 'akina') . '" name="url" id="url" value="' . esc_attr($comment_author_url) . '" size="22" autocomplete="off" tabindex="1" /></div></div>' . $robot_comments . $private_ms . $mail_notify ,
|
||||
'<div class="popup cmt-popup" onclick="cmt_showPopup(this)"><span class="popuptext" id="thePopup" style="margin-left: -55px;width: 110px;">' . __("Advertisement is forbidden 😀", "sakura")/*禁止小广告😀*/ . '</span><input type="text" placeholder="' . __("Site", "sakura") . '" name="url" id="url" value="' . esc_attr($comment_author_url) . '" size="22" autocomplete="off" tabindex="1" /></div></div>' . $robot_comments . $private_ms . $mail_notify ,
|
||||
'qq' =>
|
||||
'<input type="text" placeholder="' . esc_attr__('QQ', 'akina') . '" name="new_field_qq" id="qq" value="' . esc_attr($comment_author_url) . '" style="display:none" autocomplete="off"/><!--此栏不可见-->'
|
||||
'<input type="text" placeholder="QQ" name="new_field_qq" id="qq" value="' . esc_attr($comment_author_url) . '" style="display:none" autocomplete="off"/><!--此栏不可见-->'
|
||||
)
|
||||
)
|
||||
);
|
||||
|
@ -59,7 +59,7 @@
|
||||
</div>
|
||||
<div class="m-search">
|
||||
<form class="m-search-form" method="get" action="<?php echo home_url(); ?>" role="search">
|
||||
<input class="m-search-input" type="search" name="s" placeholder="<?php _e('搜索...', 'akina') ?>" required>
|
||||
<input class="m-search-input" type="search" name="s" placeholder="<?php _e('Search...', 'sakura') /*搜索...*/?>" required>
|
||||
</form>
|
||||
</div>
|
||||
<?php wp_nav_menu( array( 'depth' => 2, 'theme_location' => 'primary', 'container' => false ) ); ?>
|
||||
@ -72,7 +72,7 @@
|
||||
<?php if(akina_option('live_search')){ ?>
|
||||
<div class="micro">
|
||||
<i class="iconfont icon-search"></i>
|
||||
<input id="search-input" class="text-input" type="search" name="s" placeholder="<?php _e('想要找点什么呢?', 'akina') ?>" required>
|
||||
<input id="search-input" class="text-input" type="search" name="s" placeholder="<?php _e('Want to find something?', 'sakura') /*想要找点什么呢*/?>" required>
|
||||
</div>
|
||||
<div class="ins-section-wrapper">
|
||||
<a id="Ty" href="#"></a>
|
||||
@ -80,9 +80,9 @@
|
||||
</div>
|
||||
<?php }else{ ?>
|
||||
<div class="micro">
|
||||
<p class="micro mb-"><?php _e('想要找点什么呢?', 'akina') ?></p>
|
||||
<p class="micro mb-"><?php _e('Want to find something?', 'sakura') /*想要找点什么呢*/?></p>
|
||||
<i class="iconfont icon-search"></i>
|
||||
<input class="text-input" type="search" name="s" placeholder="<?php _e('Search', 'akina') ?>" required>
|
||||
<input class="text-input" type="search" name="s" placeholder="<?php _e('Search', 'sakura') ?>" required>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
@ -50,7 +50,7 @@ function akina_setup() {
|
||||
|
||||
// This theme uses wp_nav_menu() in one location.
|
||||
register_nav_menus( array(
|
||||
'primary' => esc_html__( '导航菜单', 'akina' ),
|
||||
'primary' => __( 'Nav Menus', 'sakura' ), //导航菜单
|
||||
) );
|
||||
|
||||
/*
|
||||
@ -355,7 +355,7 @@ function convertip($ip) {
|
||||
if( $ipaddr != ' ' )
|
||||
return $ipaddr;
|
||||
else
|
||||
$ipaddr = '火星来客';
|
||||
$ipaddr = 'Unknown';
|
||||
return $ipaddr;
|
||||
}
|
||||
//Comment Location End
|
||||
@ -384,22 +384,22 @@ if(!function_exists('akina_comment_format')){
|
||||
<div class="commentinfo">
|
||||
<section class="commeta">
|
||||
<div class="left">
|
||||
<h4 class="author"><a href="<?php comment_author_url(); ?>" target="_blank" rel="nofollow"><?php echo get_avatar( $comment->comment_author_email, '24', '', get_comment_author() ); ?><span class="bb-comment isauthor" title="中央钦定的<?php #esc_attr_e('Author', 'akina'); ?>">博主</span> <?php comment_author(); ?> <?php echo get_author_class($comment->comment_author_email,$comment->user_id); ?></a></h4>
|
||||
<h4 class="author"><a href="<?php comment_author_url(); ?>" target="_blank" rel="nofollow"><?php echo get_avatar( $comment->comment_author_email, '24', '', get_comment_author() ); ?><span class="bb-comment isauthor" title="<?php _e('Author', 'mashiro'); ?>"><?php _e('Blogger', 'mashiro'); /*博主*/?></span> <?php comment_author(); ?> <?php echo get_author_class($comment->comment_author_email,$comment->user_id); ?></a></h4>
|
||||
</div>
|
||||
<?php comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth']))); ?>
|
||||
<div class="right">
|
||||
<div class="info"><time datetime="<?php comment_date('Y-m-d'); ?>"><?php echo poi_time_since(strtotime($comment->comment_date_gmt), true );//comment_date(get_option('date_format')); ?></time><?php echo siren_get_useragent($comment->comment_agent); ?><?php echo mobile_get_useragent_icon($comment->comment_agent); ?> 来自: <?php echo convertip(get_comment_author_ip()); ?>
|
||||
<div class="info"><time datetime="<?php comment_date('Y-m-d'); ?>"><?php echo poi_time_since(strtotime($comment->comment_date_gmt), true );//comment_date(get_option('date_format')); ?></time><?php echo siren_get_useragent($comment->comment_agent); ?><?php echo mobile_get_useragent_icon($comment->comment_agent); ?> <?php _e('Location', 'mashiro'); /*来自*/?>: <?php echo convertip(get_comment_author_ip()); ?>
|
||||
<?php if (current_user_can('manage_options') and (wp_is_mobile() == false) ) {
|
||||
$comment_ID = $comment->comment_ID;
|
||||
$i_private = get_comment_meta($comment_ID, '_private', true);
|
||||
$flag .= ' <i class="fa fa-snowflake-o" aria-hidden="true"></i> 状态: <a href="javascript:;" data-actionp="set_private" data-idp="' . get_comment_id() . '" id="sp" class="sm" style="color:rgba(0,0,0,.35)">私密(<span class="has_set_private">';
|
||||
$flag .= ' <i class="fa fa-snowflake-o" aria-hidden="true"></i> <a href="javascript:;" data-actionp="set_private" data-idp="' . get_comment_id() . '" id="sp" class="sm" style="color:rgba(0,0,0,.35)">'.__('Private', 'mashiro').': <span class="has_set_private">';
|
||||
if (!empty($i_private)) {
|
||||
$flag .= '是 <i class="fa fa-lock" aria-hidden="true"></i>';
|
||||
$flag .= __('Yes', 'mashiro').' <i class="fa fa-lock" aria-hidden="true"></i>';
|
||||
} else {
|
||||
$flag .= '否 <i class="fa fa-unlock" aria-hidden="true"></i>';
|
||||
$flag .= __('No', 'mashiro').' <i class="fa fa-unlock" aria-hidden="true"></i>';
|
||||
}
|
||||
$flag .= '</span>)</a>';
|
||||
$flag .= edit_comment_link(__('<i class="fa fa-pencil-square-o" aria-hidden="true"></i> 编辑'), '<span>', '</span>');
|
||||
$flag .= '</span></a>';
|
||||
$flag .= edit_comment_link('<i class="fa fa-pencil-square-o" aria-hidden="true"></i> '.__("Edit", "mashiro"), ' <span style="color:rgba(0,0,0,.35)">', '</span>');
|
||||
echo $flag;
|
||||
} ?></div>
|
||||
</div>
|
||||
@ -427,17 +427,17 @@ if(!function_exists('akina_comment_format')){
|
||||
if($author_count>=1 && $author_count< 5 )//数字可自行修改,代表评论次数。
|
||||
echo '<span class="showGrade0" title="萌萌哒新人~"><img src="https://cdn.jsdelivr.net/gh/moezx/cdn@3.1.9/img/Sakura/images/level/level_0.svg" style="height: 1.5em; max-height: 1.5em; display: inline-block;"></span>';
|
||||
else if($author_count>=6 && $author_count< 10)
|
||||
echo '<span class="showGrade1" title="巴拉巴拉小魔仙"><img src="https://cdn.jsdelivr.net/gh/moezx/cdn@3.1.9/img/Sakura/images/level/level_1.svg" style="height: 1.5em; max-height: 1.5em; display: inline-block;"></span>';
|
||||
echo '<span class="showGrade1" title="Lv1"><img src="https://cdn.jsdelivr.net/gh/moezx/cdn@3.1.9/img/Sakura/images/level/level_1.svg" style="height: 1.5em; max-height: 1.5em; display: inline-block;"></span>';
|
||||
else if($author_count>=10 && $author_count< 20)
|
||||
echo '<span class="showGrade2" title="初露头角"><img src="https://cdn.jsdelivr.net/gh/moezx/cdn@3.1.9/img/Sakura/images/level/level_2.svg" style="height: 1.5em; max-height: 1.5em; display: inline-block;"></span>';
|
||||
echo '<span class="showGrade2" title="Lv2"><img src="https://cdn.jsdelivr.net/gh/moezx/cdn@3.1.9/img/Sakura/images/level/level_2.svg" style="height: 1.5em; max-height: 1.5em; display: inline-block;"></span>';
|
||||
else if($author_count>=20 && $author_count< 40)
|
||||
echo '<span class="showGrade3" title="大水笔"><img src="https://cdn.jsdelivr.net/gh/moezx/cdn@3.1.9/img/Sakura/images/level/level_3.svg" style="height: 1.5em; max-height: 1.5em; display: inline-block;"></span>';
|
||||
echo '<span class="showGrade3" title="Lv3"><img src="https://cdn.jsdelivr.net/gh/moezx/cdn@3.1.9/img/Sakura/images/level/level_3.svg" style="height: 1.5em; max-height: 1.5em; display: inline-block;"></span>';
|
||||
else if($author_count>=40 && $author_count< 80)
|
||||
echo '<span class="showGrade4" title="大佬 orz"><img src="https://cdn.jsdelivr.net/gh/moezx/cdn@3.1.9/img/Sakura/images/level/level_4.svg" style="height: 1.5em; max-height: 1.5em; display: inline-block;"></span>';
|
||||
echo '<span class="showGrade4" title="Lv4 orz"><img src="https://cdn.jsdelivr.net/gh/moezx/cdn@3.1.9/img/Sakura/images/level/level_4.svg" style="height: 1.5em; max-height: 1.5em; display: inline-block;"></span>';
|
||||
else if($author_count>=80 && $author_count< 160)
|
||||
echo '<span class="showGrade5" title="日暮里大魔王"><img src="https://cdn.jsdelivr.net/gh/moezx/cdn@3.1.9/img/Sakura/images/level/level_5.svg" style="height: 1.5em; max-height: 1.5em; display: inline-block;"></span>';
|
||||
echo '<span class="showGrade5" title="Lv5"><img src="https://cdn.jsdelivr.net/gh/moezx/cdn@3.1.9/img/Sakura/images/level/level_5.svg" style="height: 1.5em; max-height: 1.5em; display: inline-block;"></span>';
|
||||
else if($author_count>=160)
|
||||
echo '<span class="showGrade6" title="德国骨科"><img src="https://cdn.jsdelivr.net/gh/moezx/cdn@3.1.9/img/Sakura/images/level/level_6.svg" style="height: 1.5em; max-height: 1.5em; display: inline-block;"></span>';
|
||||
echo '<span class="showGrade6" title="Lv6"><img src="https://cdn.jsdelivr.net/gh/moezx/cdn@3.1.9/img/Sakura/images/level/level_6.svg" style="height: 1.5em; max-height: 1.5em; display: inline-block;"></span>';
|
||||
}
|
||||
|
||||
/**
|
||||
@ -461,9 +461,6 @@ function restyle_text($number) {
|
||||
default:
|
||||
return $number;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
function set_post_views() {
|
||||
@ -483,7 +480,7 @@ add_action('get_header', 'set_post_views');
|
||||
function get_post_views($post_id) {
|
||||
if (akina_option('statistics_api')=='wp_statistics'){
|
||||
if (!function_exists('wp_statistics_pages')) {
|
||||
return '请安装 <a href="https://wordpress.org/plugins/wp-statistics/" target="_blank">WP-Statistics 插件</a>';
|
||||
return __('Please install pulgin <a href="https://wordpress.org/plugins/wp-statistics/" target="_blank">WP-Statistics</a>', 'sakura');
|
||||
} else {
|
||||
return restyle_text(wp_statistics_pages('total','uri',$post_id));
|
||||
}
|
||||
@ -536,7 +533,7 @@ function get_the_link_items($id = null){
|
||||
if ( !empty($bookmarks) ) {
|
||||
$output .= '<ul class="link-items fontSmooth">';
|
||||
foreach ($bookmarks as $bookmark) {
|
||||
if (empty($bookmark->link_description)) $bookmark->link_description = '这家伙好懒╮(╯▽╰)╭';
|
||||
if (empty($bookmark->link_description)) $bookmark->link_description = __('This guy is so lazy ╮(╯▽╰)╭', 'sakura');
|
||||
if (empty($bookmark->link_image)) $bookmark->link_image = 'https://view.moezx.cc/images/2017/12/30/Transparent_Akkarin.th.jpg';
|
||||
$output .= '<li class="link-item"><a class="link-item-inner effect-apollo" href="' . $bookmark->link_url . '" title="' . $bookmark->link_description . '" target="_blank" rel="friend"><img class="lazyload" onerror="imgError(this,1)" data-src="' . $bookmark->link_image . '" src="https://cdn.jsdelivr.net/gh/moezx/cdn@3.0.2/img/svg/loader/trans.ajax-spinner-preloader.svg"><span class="sitename">'. $bookmark->link_name .'</span><div class="linkdes">'. $bookmark->link_description .'</div></a></li>';
|
||||
}
|
||||
@ -1257,7 +1254,7 @@ function siren_private(){
|
||||
//时间序列
|
||||
function memory_archives_list() {
|
||||
if( true ){
|
||||
$output = '<div id="archives"><p style="text-align:right;">[<span id="al_expand_collapse">全部展开/收缩</span>]<!-- (注: 点击月份可以展开)--></p>';
|
||||
$output = '<div id="archives"><p style="text-align:right;">[<span id="al_expand_collapse">'.__( "All expand/collapse", "sakura" )/*全部展开/收缩*/.'</span>]<!-- (注: 点击月份可以展开)--></p>';
|
||||
$the_query = new WP_Query( 'posts_per_page=-1&ignore_sticky_posts=1&post_type=post' ); //update: 加上忽略置顶文章
|
||||
$year=0; $mon=0; $i=0; $j=0;
|
||||
while ( $the_query->have_posts() ) : $the_query->the_post();
|
||||
@ -1268,13 +1265,13 @@ function memory_archives_list() {
|
||||
if ($year != $year_tmp && $year > 0) $output .= '</ul>';
|
||||
if ($year != $year_tmp) {
|
||||
$year = $year_tmp;
|
||||
$output .= '<h3 class="al_year">'. $year .' 年</h3><ul class="al_mon_list">'; //输出年份
|
||||
$output .= '<h3 class="al_year">'. $year . __("","sakura"). /*年*/' </h3><ul class="al_mon_list">'; //输出年份
|
||||
}
|
||||
if ($mon != $mon_tmp) {
|
||||
$mon = $mon_tmp;
|
||||
$output .= '<li class="al_li"><span class="al_mon">'.$mon.'月 (<span id="post-num"></span>篇文章)</span><ul class="al_post_list">'; //输出月份
|
||||
$output .= '<li class="al_li"><span class="al_mon"><span style="color:#0bf;">'.get_the_time('M').'</span> (<span id="post-num"></span>'.__(" post(s)","sakura") /*篇文章*/.')</span><ul class="al_post_list">'; //输出月份
|
||||
}
|
||||
$output .= '<li>'.'<a href="'. get_permalink() .'"><span style="color:#0bf;">'.get_the_time('d日 ') .'</span>'. get_the_title() .' <span>('.get_post_views(get_the_ID()).' <span class="fa fa-fire" aria-hidden="true"></span> / '. get_comments_number('0', '1', '%') .' <span class="fa fa-commenting" aria-hidden="true"></span>)</span></a></li>'; //输出文章日期和标题
|
||||
$output .= '<li>'.'<a href="'. get_permalink() .'"><span style="color:#0bf;">'/*get_the_time('d'.__(" ","sakura")) 日*/.'</span>'. get_the_title() .' <span>('.get_post_views(get_the_ID()).' <span class="fa fa-fire" aria-hidden="true"></span> / '. get_comments_number('0', '1', '%') .' <span class="fa fa-commenting" aria-hidden="true"></span>)</span></a></li>'; //输出文章日期和标题
|
||||
endwhile;
|
||||
wp_reset_postdata();
|
||||
$output .= '</ul></li></ul> <!--<ul class="al_mon_list"><li><ul class="al_post_list" style="display: block;"><li>博客已经萌萌哒运行了<span id="monitorday"></span>天</li></ul></li></ul>--></div>';
|
||||
@ -1667,7 +1664,7 @@ EOS;
|
||||
foreach ($comments as $comment) {
|
||||
$is_private = get_comment_meta($comment->comment_ID, '_private', true);
|
||||
if($is_private){
|
||||
$output .= '{"type":"comment","link":"'.get_comment_link($comment).'","title":'.json_encode(get_the_title($comment->comment_post_ID)).',"comments":"","text":'.json_encode($comment->comment_author.":该评论为私密评论").'},';
|
||||
$output .= '{"type":"comment","link":"'.get_comment_link($comment).'","title":'.json_encode(get_the_title($comment->comment_post_ID)).',"comments":"","text":'.json_encode($comment->comment_author.":".__("The comment is private","sakura")/*该评论为私密评论*/).'},';
|
||||
continue;
|
||||
}else{
|
||||
$output .= '{"type":"comment","link":"'.get_comment_link($comment).'","title":'.json_encode(get_the_title($comment->comment_post_ID)).',"comments":"","text":'.json_encode(str_replace($vowels, " ",preg_replace($regex," ",$comment->comment_author.":".$comment->comment_content))).'},';
|
||||
|
@ -32,7 +32,7 @@ Theme by Mashiro
|
||||
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
|
||||
<title itemprop="name"><?php global $page, $paged;wp_title( '-', true, 'right' );
|
||||
bloginfo( 'name' );$site_description = get_bloginfo( 'description', 'display' );
|
||||
if ( $site_description && ( is_home() || is_front_page() ) ) echo " - $site_description";if ( $paged >= 2 || $page >= 2 ) echo ' - ' . sprintf( __( '第 %s 页'), max( $paged, $page ) );?>
|
||||
if ( $site_description && ( is_home() || is_front_page() ) ) echo " - $site_description";if ( $paged >= 2 || $page >= 2 ) echo ' - ' . sprintf( __( 'page %s ','sakura'), max( $paged, $page ) );/*第 %s 页*/?>
|
||||
</title>
|
||||
<?php
|
||||
if (akina_option('akina_meta') == true) {
|
||||
|
@ -42,10 +42,10 @@ function z_add_texonomy_field() {
|
||||
}
|
||||
|
||||
echo '<div class="form-field">
|
||||
<label for="taxonomy_image">' . __('分类/标签图像', 'categories-images') . '</label>
|
||||
<label for="taxonomy_image">' . __('category/tag image', 'sakura') /*分类/标签图像*/. '</label>
|
||||
<input type="text" name="taxonomy_image" id="taxonomy_image" value="" />
|
||||
<br/>
|
||||
<button class="z_upload_image_button button">' . __('添加图像', 'categories-images') . '</button>
|
||||
<button class="z_upload_image_button button">' . __('add image', 'sakura') /*添加图像*/. '</button>
|
||||
</div>'.z_script();
|
||||
}
|
||||
|
||||
@ -63,10 +63,10 @@ function z_edit_texonomy_field($taxonomy) {
|
||||
else
|
||||
$image_url = z_taxonomy_image_url( $taxonomy->term_id, NULL, TRUE );
|
||||
echo '<tr class="form-field">
|
||||
<th scope="row" valign="top"><label for="taxonomy_image">' . __('分类/标签图像', 'categories-images') . '</label></th>
|
||||
<th scope="row" valign="top"><label for="taxonomy_image">' .__('category/tag image', 'sakura') /*分类/标签图像*/. '</label></th>
|
||||
<td><img class="taxonomy-image" src="' . z_taxonomy_image_url( $taxonomy->term_id, 'medium', TRUE ) . '"/><br/><input type="text" name="taxonomy_image" id="taxonomy_image" value="'.$image_url.'" /><br />
|
||||
<button class="z_upload_image_button button">' . __('添加图像', 'categories-images') . '</button>
|
||||
<button class="z_remove_image_button button">' . __('删除图像', 'categories-images') . '</button>
|
||||
<button class="z_upload_image_button button">' . __('add image', 'sakura') /*添加图像*/. '</button>
|
||||
<button class="z_remove_image_button button">' . __('remove image', 'sakura') /*删除图像*/. '</button>
|
||||
</td>
|
||||
</tr>'.z_script();
|
||||
}
|
||||
@ -194,8 +194,8 @@ function z_quick_edit_custom_box($column_name, $screen, $name) {
|
||||
<span class="title"><img src="" alt="暂无"/></span>
|
||||
<span class="input-text-wrap"><input type="text" name="taxonomy_image" value="" class="tax_list" /></span>
|
||||
<span class="input-text-wrap">
|
||||
<button class="z_upload_image_button button">' . __('添加图像', 'categories-images') . '</button>
|
||||
<button class="z_remove_image_button button">' . __('删除图像', 'categories-images') . '</button>
|
||||
<button class="z_upload_image_button button">' . __('add image', 'sakura') /*添加图像*/. '</button>
|
||||
<button class="z_remove_image_button button">' . __('remove image', 'sakura') /*删除图像*/. '</button>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
@ -208,7 +208,7 @@ function z_quick_edit_custom_box($column_name, $screen, $name) {
|
||||
function z_taxonomy_columns( $columns ) {
|
||||
$new_columns = array();
|
||||
$new_columns['cb'] = $columns['cb'];
|
||||
$new_columns['thumb'] = __('图像', 'categories-images');
|
||||
$new_columns['thumb'] = __('image', 'sakura')/*图像*/;
|
||||
|
||||
unset( $columns['cb'] );
|
||||
|
||||
@ -220,7 +220,7 @@ function z_taxonomy_columns( $columns ) {
|
||||
*/
|
||||
function z_taxonomy_column( $columns, $column, $id ) {
|
||||
if ( $column == 'thumb' )
|
||||
$columns = '<span><img src="' . z_taxonomy_image_url($id, 'thumbnail', TRUE) . '" alt="' . __('暂无', 'categories-images') . '" class="wp-post-image" /></span>';
|
||||
$columns = '<span><img src="' . z_taxonomy_image_url($id, 'thumbnail', TRUE) . '" alt="' . __('no image', 'sakura') /*暂无*/. '" class="wp-post-image" /></span>';
|
||||
|
||||
return $columns;
|
||||
}
|
||||
|
@ -25,20 +25,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
/* If the user can't edit theme options, no use running this plugin */
|
||||
|
||||
if ( get_user_locale( get_current_user_id() ) == "zh_CN") {
|
||||
define( 'SAKURA_OPTIONS', 'Sakura主题设置' );
|
||||
}
|
||||
if ( get_user_locale( get_current_user_id() ) == "zh_TW") {
|
||||
define( 'SAKURA_OPTIONS', 'Sakura主題設置' );
|
||||
}
|
||||
if ( get_user_locale( get_current_user_id() ) == "ja") {
|
||||
define( 'SAKURA_OPTIONS', 'さくらテーマの設定' );
|
||||
}
|
||||
if ( get_user_locale( get_current_user_id() ) == "ja-JP") {
|
||||
define( 'SAKURA_OPTIONS', 'さくらテーマの設定' );
|
||||
} else {
|
||||
define( 'SAKURA_OPTIONS', 'Sakura Options' );
|
||||
}
|
||||
define( 'SAKURA_OPTIONS', __('Sakura Options', 'sakura') );
|
||||
|
||||
add_action( 'init', 'optionsframework_rolescheck' );
|
||||
|
||||
@ -288,8 +275,8 @@ function optionsframework_page() { ?>
|
||||
<?php settings_fields( 'optionsframework' ); ?>
|
||||
<?php optionsframework_fields(); /* Settings */ ?>
|
||||
<div id="optionsframework-submit">
|
||||
<input type="submit" class="button-primary" name="update" value="<?php esc_attr_e( '保存设置', 'options_framework_theme' ); ?>" />
|
||||
<input type="submit" class="reset-button button-secondary" name="reset" value="<?php esc_attr_e( '恢复默认', 'options_framework_theme' ); ?>" onclick="return confirm( '<?php print esc_js( __( '如果单击“确定”会导致之前所有的设置都丢失,确定要这样做吗?', 'options_framework_theme' ) ); ?>' );" />
|
||||
<input type="submit" class="button-primary" name="update" value="<?php esc_attr_e( 'Save', 'sakaura' ); ?>" />
|
||||
<input type="submit" class="reset-button button-secondary" name="reset" value="<?php esc_attr_e( 'Restore default', 'sakura' ); ?>" onclick="return confirm( '<?php print esc_js( __( 'All setting will be lost, sure?', 'sakura' ) ); ?>' );" />
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -48,15 +48,15 @@ function optionsframework_uploader( $_id, $_value, $_desc = '', $_name = '' ) {
|
||||
if ( $value ) {
|
||||
$class = ' has-file';
|
||||
}
|
||||
$output .= '<input id="' . $id . '" class="upload' . $class . '" type="text" name="'.$name.'" value="' . $value . '" placeholder="' . __('未选择文件', 'options_framework_theme') .'" />' . "\n";
|
||||
$output .= '<input id="' . $id . '" class="upload' . $class . '" type="text" name="'.$name.'" value="' . $value . '" placeholder="' . __('Choose file', 'sakura') .'" />' . "\n";
|
||||
if ( function_exists( 'wp_enqueue_media' ) ) {
|
||||
if ( ( $value == '' ) ) {
|
||||
$output .= '<input id="upload-' . $id . '" class="upload-button button" type="button" value="' . __( '上传', 'options_framework_theme' ) . '" />' . "\n";
|
||||
$output .= '<input id="upload-' . $id . '" class="upload-button button" type="button" value="' . __( 'Upload', 'sakura' ) . '" />' . "\n";
|
||||
} else {
|
||||
$output .= '<input id="remove-' . $id . '" class="remove-file button" type="button" value="' . __( '移除', 'options_framework_theme' ) . '" />' . "\n";
|
||||
$output .= '<input id="remove-' . $id . '" class="remove-file button" type="button" value="' . __( 'Remove', 'sakura' ) . '" />' . "\n";
|
||||
}
|
||||
} else {
|
||||
$output .= '<p><i>' . __( 'Upgrade your version of WordPress for full media support.', 'options_framework_theme' ) . '</i></p>';
|
||||
$output .= '<p><i>' . __( 'Upgrade your version of WordPress for full media support.', 'sakura' ) . '</i></p>';
|
||||
}
|
||||
|
||||
if ( $_desc != '' ) {
|
||||
@ -80,7 +80,7 @@ function optionsframework_uploader( $_id, $_value, $_desc = '', $_name = '' ) {
|
||||
$output .= '';
|
||||
|
||||
// Standard generic output if it's not an image.
|
||||
$title = __( 'View File', 'options_framework_theme' );
|
||||
$title = __( 'View File', 'sakura' );
|
||||
$output .= '<div class="no-image"><span class="file_link"><a href="' . $value . '" target="_blank" rel="external">'.$title.'</a></span></div>';
|
||||
}
|
||||
}
|
||||
@ -110,8 +110,8 @@ function optionsframework_media_scripts( $hook ) {
|
||||
wp_register_script( 'of-media-uploader', OPTIONS_FRAMEWORK_DIRECTORY .'js/media-uploader.js', array( 'jquery' ) );
|
||||
wp_enqueue_script( 'of-media-uploader' );
|
||||
wp_localize_script( 'of-media-uploader', 'optionsframework_l10n', array(
|
||||
'upload' => __( '上传', 'options_framework_theme' ),
|
||||
'remove' => __( '移除', 'options_framework_theme' )
|
||||
'upload' => __( 'Upload', 'sakura' ),
|
||||
'remove' => __( 'Remove', 'sakura' )
|
||||
) );
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@ mashiro_option.qq_api_url = "https://api.2heng.xin/qqinfo/";
|
||||
mashiro_option.qq_avatar_api_url = "https://api.2heng.xin/qqinfo/";
|
||||
mashiro_option.live_search = <?php if ( akina_option('live_search') ){ echo 'true'; } else { echo 'false'; } ?>;
|
||||
|
||||
<?php if( akina_option('sakura_skin_bg' )){ $bg_arry=explode(" ", akina_option('sakura_skin_bg' ));?>
|
||||
<?php if( akina_option('sakura_skin_bg' )){ $bg_arry=explode(",", akina_option('sakura_skin_bg' ));?>
|
||||
mashiro_option.skin_bg0 = "<?php echo $bg_arry[0] ?>";
|
||||
mashiro_option.skin_bg1 = "<?php echo $bg_arry[1] ?>";
|
||||
mashiro_option.skin_bg2 = "<?php echo $bg_arry[2] ?>";
|
||||
|
@ -25,12 +25,12 @@ function akina_posted_on() {
|
||||
);
|
||||
|
||||
$posted_on = sprintf(
|
||||
esc_html_x( 'Posted on %s', 'post date', 'akina' ),
|
||||
_x( 'Posted on %s', 'post date', 'sakura' ),
|
||||
'<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</a>'
|
||||
);
|
||||
|
||||
$byline = sprintf(
|
||||
esc_html_x( 'by %s', 'post author', 'akina' ),
|
||||
_x( 'by %s', 'post author', 'sakura' ),
|
||||
'<span class="author vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '">' . esc_html( get_the_author() ) . '</a></span>'
|
||||
);
|
||||
|
||||
@ -47,29 +47,29 @@ function akina_entry_footer() {
|
||||
// Hide category and tag text for pages.
|
||||
if ( 'post' === get_post_type() ) {
|
||||
/* translators: used between list items, there is a space after the comma */
|
||||
$categories_list = get_the_category_list( esc_html__( ', ', 'akina' ) );
|
||||
$categories_list = get_the_category_list( __( ', ', 'sakura' ) );
|
||||
if ( $categories_list && akina_categorized_blog() ) {
|
||||
printf( '<span class="cat-links">' . esc_html__( 'Posted in %1$s', 'akina' ) . '</span>', $categories_list ); // WPCS: XSS OK.
|
||||
printf( '<span class="cat-links">' . __( 'Posted in %1$s', 'sakura' ) . '</span>', $categories_list ); // WPCS: XSS OK.
|
||||
}
|
||||
|
||||
/* translators: used between list items, there is a space after the comma */
|
||||
$tags_list = get_the_tag_list( '', esc_html__( ', ', 'akina' ) );
|
||||
$tags_list = get_the_tag_list( '', __( ', ', 'sakura' ) );
|
||||
if ( $tags_list ) {
|
||||
printf( '<span class="tags-links">' . esc_html__( 'Tagged %1$s', 'akina' ) . '</span>', $tags_list ); // WPCS: XSS OK.
|
||||
printf( '<span class="tags-links">' . __( 'Tagged %1$s', 'sakura' ) . '</span>', $tags_list ); // WPCS: XSS OK.
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
|
||||
echo '<span class="comments-link">';
|
||||
/* translators: %s: post title */
|
||||
comments_popup_link( sprintf( wp_kses( __( 'Leave a Comment<span class="screen-reader-text"> on %s</span>', 'akina' ), array( 'span' => array( 'class' => array() ) ) ), get_the_title() ) );
|
||||
comments_popup_link( sprintf( wp_kses( __( 'Leave a Comment<span class="screen-reader-text"> on %s</span>', 'sakura' ), array( 'span' => array( 'class' => array() ) ) ), get_the_title() ) );
|
||||
echo '</span>';
|
||||
}
|
||||
|
||||
edit_post_link(
|
||||
sprintf(
|
||||
/* translators: %s: Name of current post */
|
||||
esc_html__( 'Edit %s', 'akina' ),
|
||||
__( 'Edit %s', 'sakura' ),
|
||||
the_title( '<span class="screen-reader-text">"', '"</span>', false )
|
||||
),
|
||||
'<span class="edit-link">',
|
||||
|
@ -61,10 +61,10 @@ function get_random_bg_url(){
|
||||
*/
|
||||
function poi_time_since( $older_date, $comment_date = false, $text = false ) {
|
||||
$chunks = array(
|
||||
array( 24 * 60 * 60, __( ' 天前', 'akina' ) ),
|
||||
array( 60 * 60 , __( ' 小时前', 'akina' ) ),
|
||||
array( 60 , __( ' 分钟前', 'akina' ) ),
|
||||
array( 1, __( ' 秒前', 'akina' ) )
|
||||
array( 24 * 60 * 60, __( ' days ago', 'sakura' ) ),/*天前*/
|
||||
array( 60 * 60 , __( ' hours ago', 'sakura' ) ),/*小时前*/
|
||||
array( 60 , __( ' minutes ago', 'sakura' ) ),/*分钟前*/
|
||||
array( 1, __( ' seconds ago', 'sakura' ) )/*秒前*/
|
||||
);
|
||||
|
||||
$newer_date = time() - (akina_option('time_zone_fix')*60*60);
|
||||
@ -72,7 +72,7 @@ function poi_time_since( $older_date, $comment_date = false, $text = false ) {
|
||||
if($text){
|
||||
$output = '';
|
||||
}else{
|
||||
$output = '发布于 ';
|
||||
$output = __('Posted on ','sakura')/*发布于*/;
|
||||
}
|
||||
|
||||
if ( $since < 30 * 24 * 60 * 60 ) {
|
||||
@ -128,7 +128,7 @@ add_filter( 'comment_text' , 'comment_add_at', 20, 2);
|
||||
/*
|
||||
* Ajax评论
|
||||
*/
|
||||
if ( version_compare( $GLOBALS['wp_version'], '4.4-alpha', '<' ) ) { wp_die('请升级到4.4以上版本'); }
|
||||
if ( version_compare( $GLOBALS['wp_version'], '4.4-alpha', '<' ) ) { wp_die(__('Please upgrade wordpress to version 4.4+','sakura')); }/*请升级到4.4以上版本*/
|
||||
// 提示
|
||||
if(!function_exists('siren_ajax_comment_err')) {
|
||||
function siren_ajax_comment_err($t) {
|
||||
@ -184,7 +184,7 @@ if(!function_exists('siren_ajax_comment_callback')) {
|
||||
<div class="commentinfo">
|
||||
<section class="commeta">
|
||||
<div class="left">
|
||||
<h4 class="author"><a href="<?php comment_author_url(); ?>"><?php echo get_avatar( $comment->comment_author_email, '80', '', get_comment_author() ); ?><?php comment_author(); ?> <span class="isauthor" title="<?php esc_attr_e('Author', 'akina'); ?>"></span></a></h4>
|
||||
<h4 class="author"><a href="<?php comment_author_url(); ?>"><?php echo get_avatar( $comment->comment_author_email, '80', '', get_comment_author() ); ?><?php comment_author(); ?> <span class="isauthor" title="<?php esc_attr_e('Author', 'sakura'); ?>"></span></a></h4>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="info"><time datetime="<?php comment_date('Y-m-d'); ?>"><?php echo poi_time_since(strtotime($comment->comment_date), true );//comment_date(get_option('date_format')); ?></time></div>
|
||||
@ -230,16 +230,16 @@ function Exuser_center(){ ?>
|
||||
function gopage(url,type){
|
||||
URL = url;
|
||||
if(type == 1){
|
||||
TYPE = '管理后台';
|
||||
TYPE = <?php _e('dashboard','sakura')/*管理后台*/?>;
|
||||
}else{
|
||||
TYPE = '主页';
|
||||
TYPE = <?php _e('home','sakura')/*主页*/?>;
|
||||
}
|
||||
for(var i=secs;i>=0;i--){
|
||||
window.setTimeout('doUpdate(' + i + ')', (secs-i) * 1000);
|
||||
}
|
||||
}
|
||||
function doUpdate(num){
|
||||
document.getElementById('login-showtime').innerHTML = '空降成功,'+num+'秒后自动转到'+TYPE;
|
||||
document.getElementById('login-showtime').innerHTML = '<?php _e("Login successful, ","sakura")/*空降成功*/?>'+num+'<?php _e("seconds later automatically transfer to","sakura")/*秒后自动转到*/?>'+TYPE;
|
||||
if(num == 0) { window.location=URL; }
|
||||
}
|
||||
</script>
|
||||
@ -262,16 +262,16 @@ function login_ok(){
|
||||
global $current_user;
|
||||
get_currentuserinfo();
|
||||
?>
|
||||
<p class="ex-login-avatar"><a href="http://cn.gravatar.com/" title="更换头像" target="_blank" rel="nofollow"><?php echo get_avatar( $current_user->user_email, '110' ); ?></a></p>
|
||||
<p class="ex-login-username">你好,<strong><?php echo $current_user->display_name; ?></strong></p>
|
||||
<p class="ex-login-avatar"><a href="http://cn.gravatar.com/" title="<?php _e('Change avatar','sakura')/*更换头像*/?>" target="_blank" rel="nofollow"><?php echo get_avatar( $current_user->user_email, '110' ); ?></a></p>
|
||||
<p class="ex-login-username"><?php _e('Hello, ','sakura')/*你好,*/?><strong><?php echo $current_user->display_name; ?></strong></p>
|
||||
<?php if($current_user->user_email){echo '<p>'.$current_user->user_email.'</p>';} ?>
|
||||
<p id="login-showtime"></p>
|
||||
<p class="ex-logout">
|
||||
<a href="<?php bloginfo('url'); ?>" title="首页">首页</a>
|
||||
<a href="<?php bloginfo('url'); ?>" title="<?php _e('Home','sakura')/*首页*/?>"><?php _e('Home','sakura')/*首页*/?></a>
|
||||
<?php if(current_user_can('level_10')){ ?>
|
||||
<a href="<?php bloginfo('url'); ?>/wp-admin/" title="后台" target="_top">后台</a>
|
||||
<a href="<?php bloginfo('url'); ?>/wp-admin/" title="<?php _e('Manage','sakura')/*后台*/?>" target="_top"><?php _e('Manage','sakura')/*后台*/?></a>
|
||||
<?php } ?>
|
||||
<a href="<?php echo wp_logout_url(get_bloginfo('url')); ?>" title="登出" target="_top">登出?</a>
|
||||
<a href="<?php echo wp_logout_url(get_bloginfo('url')); ?>" title="<?php _e('Logout','sakura')/*登出*/?>" target="_top"><?php _e('Sign out? ','sakura')/*登出?*/?></a>
|
||||
</p>
|
||||
<?php
|
||||
}
|
||||
@ -296,7 +296,7 @@ function the_headPattern(){
|
||||
$edit_this_post_link = '';
|
||||
}
|
||||
$t .= the_title( '<h1 class="entry-title">', '</h1>', false);
|
||||
$t .= '<p class="entry-census"><span><a href="'. esc_url(get_author_posts_url(get_the_author_meta('ID'),get_the_author_meta( 'user_nicename' ))) .'"><img src="'. get_avatar_url( get_the_author_meta('ID'), 64 )/*$ava*/ .'"></a></span><span><a href="'. esc_url(get_author_posts_url(get_the_author_meta('ID'),get_the_author_meta( 'user_nicename' ))) .'">'. get_the_author() .'</a></span><span class="bull">·</span>'. poi_time_since(get_post_time('U', true),false,true) .'<span class="bull">·</span>'. get_post_views(get_the_ID()) .' 次阅读'.$edit_this_post_link.'</p>';
|
||||
$t .= '<p class="entry-census"><span><a href="'. esc_url(get_author_posts_url(get_the_author_meta('ID'),get_the_author_meta( 'user_nicename' ))) .'"><img src="'. get_avatar_url( get_the_author_meta('ID'), 64 )/*$ava*/ .'"></a></span><span><a href="'. esc_url(get_author_posts_url(get_the_author_meta('ID'),get_the_author_meta( 'user_nicename' ))) .'">'. get_the_author() .'</a></span><span class="bull">·</span>'. poi_time_since(get_post_time('U', true),false,true) .'<span class="bull">·</span>'. get_post_views(get_the_ID()) .' '._n("View","Views",get_post_views(get_the_ID()),"sakura")/*次阅读*/.$edit_this_post_link.'</p>';
|
||||
endwhile; endif;
|
||||
}elseif(is_page()){
|
||||
$full_image_url = $full_image_url[0];
|
||||
@ -308,7 +308,7 @@ function the_headPattern(){
|
||||
$t .= ' <span class="cat-des">'.$des.'</span>';
|
||||
}elseif(is_search()){
|
||||
$full_image_url = get_random_bg_url();
|
||||
$t .= '<h1 class="entry-title search-title"> 关于“ '.get_search_query().' ”的搜索结果</h1>';
|
||||
$t .= '<h1 class="entry-title search-title"> '.printf( __( "Search results for \" %s \"","sakura" ), get_search_query()) ./*关于“ '.get_search_query().' ”的搜索结果*/'</h1>';
|
||||
}
|
||||
if(akina_option('patternimg')) $full_image_url = false;
|
||||
if(!is_home() && $full_image_url) : ?>
|
||||
@ -351,7 +351,7 @@ function the_video_headPattern_hls(){
|
||||
$edit_this_post_link = '';
|
||||
}
|
||||
$t .= the_title( '<h1 class="entry-title">', '<button id="coverVideo-btn" class=".constant-width-to-height-ratio" onclick="coverVideo()"><i class="fa fa-pause" aria-hidden="true"></i></button></h1>', false);
|
||||
$t .= '<p class="entry-census"><span><a href="'. esc_url(get_author_posts_url(get_the_author_meta('ID'),get_the_author_meta( 'user_nicename' ))) .'"><img src="'. get_avatar_url( get_the_author_meta('ID'), 64 )/*$ava*/ .'"></a></span><span><a href="'. esc_url(get_author_posts_url(get_the_author_meta('ID'),get_the_author_meta( 'user_nicename' ))) .'">'. get_the_author() .'</a></span><span class="bull">·</span>'. poi_time_since(get_post_time('U', true),false,true) .'<span class="bull">·</span>'. get_post_views(get_the_ID()) .' 次阅读'.$edit_this_post_link.'</p>';
|
||||
$t .= '<p class="entry-census"><span><a href="'. esc_url(get_author_posts_url(get_the_author_meta('ID'),get_the_author_meta( 'user_nicename' ))) .'"><img src="'. get_avatar_url( get_the_author_meta('ID'), 64 )/*$ava*/ .'"></a></span><span><a href="'. esc_url(get_author_posts_url(get_the_author_meta('ID'),get_the_author_meta( 'user_nicename' ))) .'">'. get_the_author() .'</a></span><span class="bull">·</span>'. poi_time_since(get_post_time('U', true),false,true) .'<span class="bull">·</span>'. get_post_views(get_the_ID()) .' '._n("View","Views",get_post_views(get_the_ID()),"sakura")/*次阅读*/.$edit_this_post_link.'</p>';
|
||||
endwhile; endif;
|
||||
}elseif(is_page()){
|
||||
$full_image_url = $full_image_url[0];
|
||||
@ -366,7 +366,7 @@ function the_video_headPattern_hls(){
|
||||
}elseif(is_search()){
|
||||
$full_image_url = get_random_bg_url();
|
||||
$thubm_image_url = 'https://cdn.jsdelivr.net/gh/moezx/cdn@3.0.1/img/svg/loader/orange.progress-bar-stripe-loader.svg';
|
||||
$t .= '<h1 class="entry-title search-title"> 关于“ '.get_search_query().' ”的搜索结果</h1>';
|
||||
$t .= '<h1 class="entry-title search-title"> '.printf( __( "Search results for \" %s \"","sakura" ), get_search_query()) ./*关于“ '.get_search_query().' ”的搜索结果*/'</h1>';
|
||||
}
|
||||
$thubm_image_url = $thubm_image_url . "#lazyload-blur";
|
||||
$thubm_image_url = str_replace(akina_option('qiniu_cdn'),'https://cdn.2heng.xin/',$thubm_image_url);
|
||||
@ -414,12 +414,12 @@ function the_video_headPattern_normal(){
|
||||
$ava = akina_option('focus_logo', '') ? akina_option('focus_logo', '') : get_avatar_url(get_the_author_meta('user_email'));
|
||||
global $user_ID;
|
||||
if($user_ID && current_user_can('level_10')) {
|
||||
$edit_this_post_link = '<span class="bull">·</span><a href="'.get_edit_post_link().'">EDIT</a>';
|
||||
$edit_this_post_link = '<span class="bull">·</span><a href="'.get_edit_post_link().'">'._e("EDIT","sakura").'</a>';
|
||||
} else {
|
||||
$edit_this_post_link = '';
|
||||
}
|
||||
$t .= the_title( '<h1 class="entry-title">', '<button id="coverVideo-btn" class=".constant-width-to-height-ratio" onclick="coverVideo()"><i class="fa fa-pause" aria-hidden="true"></i></button></h1>', false);
|
||||
$t .= '<p class="entry-census"><span><a href="'. esc_url(get_author_posts_url(get_the_author_meta('ID'),get_the_author_meta( 'user_nicename' ))) .'"><img src="'. get_avatar_url( get_the_author_meta('ID'), 64 )/*$ava*/ .'"></a></span><span><a href="'. esc_url(get_author_posts_url(get_the_author_meta('ID'),get_the_author_meta( 'user_nicename' ))) .'">'. get_the_author() .'</a></span><span class="bull">·</span>'. poi_time_since(get_post_time('U', true),false,true) .'<span class="bull">·</span>'. get_post_views(get_the_ID()) .' 次阅读'.$edit_this_post_link.'</p>';
|
||||
$t .= '<p class="entry-census"><span><a href="'. esc_url(get_author_posts_url(get_the_author_meta('ID'),get_the_author_meta( 'user_nicename' ))) .'"><img src="'. get_avatar_url( get_the_author_meta('ID'), 64 )/*$ava*/ .'"></a></span><span><a href="'. esc_url(get_author_posts_url(get_the_author_meta('ID'),get_the_author_meta( 'user_nicename' ))) .'">'. get_the_author() .'</a></span><span class="bull">·</span>'. poi_time_since(get_post_time('U', true),false,true) .'<span class="bull">·</span>'. get_post_views(get_the_ID()) .' '._n("View","Views",get_post_views(get_the_ID()),"sakura")/*次阅读*/.$edit_this_post_link.'</p>';
|
||||
endwhile; endif;
|
||||
}elseif(is_page()){
|
||||
$full_image_url = $full_image_url[0];
|
||||
@ -434,7 +434,7 @@ function the_video_headPattern_normal(){
|
||||
}elseif(is_search()){
|
||||
$full_image_url = get_random_bg_url();
|
||||
$thubm_image_url = 'https://cdn.jsdelivr.net/gh/moezx/cdn@3.0.1/img/svg/loader/orange.progress-bar-stripe-loader.svg';
|
||||
$t .= '<h1 class="entry-title search-title"> 关于“ '.get_search_query().' ”的搜索结果</h1>';
|
||||
$t .= '<h1 class="entry-title search-title"> '.printf( __( "Search results for \" %s \"","sakura" ), get_search_query()) ./*关于“ '.get_search_query().' ”的搜索结果*/'</h1>';
|
||||
}
|
||||
$thubm_image_url = $thubm_image_url . "#lazyload-blur";
|
||||
$thubm_image_url = str_replace(akina_option('qiniu_cdn'),'https://cdn.2heng.xin/',$thubm_image_url);
|
||||
@ -476,11 +476,11 @@ function header_user_menu(){
|
||||
</div>
|
||||
<div class="user-menu-option">
|
||||
<?php if (current_user_can('level_10')) { ?>
|
||||
<a href="<?php bloginfo('url'); ?>/wp-admin/" target="_blank">管理中心</a>
|
||||
<a href="<?php bloginfo('url'); ?>/wp-admin/post-new.php" target="_blank">撰写文章</a>
|
||||
<a href="<?php bloginfo('url'); ?>/wp-admin/" target="_blank"><?php _e('Dashboard','sakura')/*管理中心*/?></a>
|
||||
<a href="<?php bloginfo('url'); ?>/wp-admin/post-new.php" target="_blank"><?php _e('New post','sakura')/*撰写文章*/?></a>
|
||||
<?php } ?>
|
||||
<a href="<?php bloginfo('url'); ?>/wp-admin/profile.php" target="_blank">个人资料</a>
|
||||
<a href="<?php echo wp_logout_url(get_bloginfo('url')); ?>" target="_top">退出登录</a>
|
||||
<a href="<?php bloginfo('url'); ?>/wp-admin/profile.php" target="_blank"><?php _e('Profile','sakura')/*个人资料*/?></a>
|
||||
<a href="<?php echo wp_logout_url(get_bloginfo('url')); ?>" target="_top"><?php _e('Sign out','sakura')/*退出登录*/?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -723,7 +723,7 @@ function siren_private_message_hook($comment_content , $comment){
|
||||
$current_commenter = wp_get_current_commenter();
|
||||
if ( $is_private ) $comment_content = '#私密# ' . $comment_content;
|
||||
if ( $current_commenter['comment_author_email'] == $email || $parent_email == $current_commenter['comment_author_email'] || current_user_can('delete_user') ) return $comment_content;
|
||||
if ( $is_private ) return '<i class="fa fa-lock" aria-hidden="true"></i> 该评论为私密评论';
|
||||
if ( $is_private ) return '<i class="fa fa-lock" aria-hidden="true"></i> '.__("The comment is private","sakura")/*该评论为私密评论*/;
|
||||
return $comment_content;
|
||||
}
|
||||
add_filter('get_comment_text','siren_private_message_hook',10,2);
|
||||
|
Binary file not shown.
1606
languages/en_US.po
1606
languages/en_US.po
File diff suppressed because it is too large
Load Diff
1686
languages/sakura.pot
Normal file
1686
languages/sakura.pot
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
1997
languages/zh_CN.po
1997
languages/zh_CN.po
File diff suppressed because it is too large
Load Diff
@ -9,7 +9,7 @@
|
||||
<?php if (!is_home()&&(comments_open()) ){ ?>
|
||||
<section class="duoshuowrapper comments">
|
||||
<div class="commentwrap comments-hidden">
|
||||
<div class="notification"><i class="iconfont icon-comment"></i><?php esc_html_e('查看评论', 'akina'); ?></div>
|
||||
<div class="notification"><i class="iconfont icon-comment"></i><?php _e('View comments', 'sakura'); /*查看评论*/?></div>
|
||||
</div>
|
||||
<div class="comments-main">
|
||||
<div class="commentwrap">
|
||||
|
575
options.php
575
options.php
File diff suppressed because it is too large
Load Diff
@ -16,7 +16,7 @@ get_header(); ?>
|
||||
if ( have_posts() ) : ?>
|
||||
<?php if(akina_option('patternimg') || !get_random_bg_url()){ ?>
|
||||
<header class="page-header">
|
||||
<h1 class="page-title"><?php printf( esc_html__( '搜索结果: %s', 'akina' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
|
||||
<h1 class="page-title"><?php printf( __( 'search result: %s', 'sakura' )/*搜索结果*/, '<span>' . get_search_query() . '</span>' ); ?></h1>
|
||||
</header><!-- .page-header -->
|
||||
<?php } ?>
|
||||
<?php
|
||||
@ -39,7 +39,7 @@ get_header(); ?>
|
||||
<!-- search start -->
|
||||
<form class="s-search">
|
||||
<i class="iconfont icon-search"></i>
|
||||
<input class="text-input" type="search" name="s" placeholder="<?php _e('Search...', 'akina') ?>" required>
|
||||
<input class="text-input" type="search" name="s" placeholder="<?php _e('Search...', 'sakura') ?>" required>
|
||||
</form>
|
||||
<!-- search end -->
|
||||
</div>
|
||||
|
@ -4,7 +4,7 @@ Theme Name: Sakura
|
||||
Theme URI: https://2heng.xin/theme-sakura/
|
||||
Author: Mashiro, Louie, Fuzzz
|
||||
Author URI: http://2heng.xin
|
||||
Description: Akina主题分支(原版地址 http://www.akina.pw/themeakina)
|
||||
Description: A branch of theme Akina
|
||||
Version: 3.2.7
|
||||
License: GNU General Public License v2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
@ -27,7 +27,7 @@
|
||||
</div>
|
||||
<div class="works-meta">
|
||||
<div class="works-comnum">
|
||||
<span><i class="iconfont icon-mark"></i> <?php comments_popup_link('暂无', '1 ', '% '); ?></span>
|
||||
<span><i class="iconfont icon-mark"></i> <?php comments_popup_link(__('NOTHING','sakura'), '1 ', '% '); /*暂无*/?></span>
|
||||
</div>
|
||||
<div class="works-views">
|
||||
<span><i class="iconfont icon-attention"></i> <?php echo get_post_views(get_the_ID()); ?> </span>
|
||||
|
@ -32,10 +32,10 @@
|
||||
</div>
|
||||
<div class="info-meta">
|
||||
<div class="comnum">
|
||||
<span><i class="iconfont icon-mark"></i><?php comments_popup_link('NOTHING', '1 条评论', '% 条评论'); ?></span>
|
||||
<span><i class="iconfont icon-mark"></i><?php comments_popup_link('NOTHING', '1 '.__("Comment","sakura")/*条评论*/, '% '.__("Comments","sakura")/*条评论*/); ?></span>
|
||||
</div>
|
||||
<div class="views">
|
||||
<span><i class="iconfont icon-attention"></i><?php echo get_post_views(get_the_ID()); ?> 热度</span>
|
||||
<span><i class="iconfont icon-attention"></i><?php echo get_post_views(get_the_ID()).' '._n('Hit','Hits',get_post_views(get_the_ID()),'sakura')/*热度*/?></span>
|
||||
</div>
|
||||
</div>
|
||||
</footer><!-- .entry-footer -->
|
||||
|
@ -11,18 +11,18 @@
|
||||
|
||||
<section class="no-results not-found">
|
||||
<header class="page-header">
|
||||
<h1 class="page-title"><?php esc_html_e( '没有找到任何东西!', 'akina' ); ?></h1>
|
||||
<h1 class="page-title"><?php _e( 'There is noyhing here!', 'sakura' ); /*没有找到任何东西*/?></h1>
|
||||
</header><!-- .page-header -->
|
||||
|
||||
<div class="page-content">
|
||||
<?php
|
||||
if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
|
||||
|
||||
<p><?php printf( wp_kses( __( '准备好发布你的第一篇文章了么? <a href="%1$s">点击这里开始</a>.', 'akina' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( admin_url( 'post-new.php' ) ) ); ?></p>
|
||||
<p><?php printf( wp_kses( __( 'Ready to post your first article? <a href="%1$s">Click here to start</a>.', 'sakura' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( admin_url( 'post-new.php' ) ) ); /*准备好发布你的第一篇文章了么? <a href="%1$s">点击这里开始</a>.*/?></p>
|
||||
|
||||
<?php elseif ( is_search() ) : ?>
|
||||
<div class="sorry">
|
||||
<p><?php esc_html_e( '没有找到你想要的,看看其他的吧。', 'akina' ); ?></p>
|
||||
<p><?php _e( 'Didn\'t find what you want, look at the other ones.', 'sakura' ); /*没有找到你想要的,看看其他的吧。*/?></p>
|
||||
<div class="sorry-inner">
|
||||
<ul class="search-no-reasults">
|
||||
<?php
|
||||
@ -40,7 +40,7 @@
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<p><?php esc_html_e( '我们似乎没有找到你想要的东西. 或许你可以搜索一下试试.', 'akina' ); ?></p>
|
||||
<p><?php _e( 'We didn\'t seem to find what you want. Maybe you can search for it.', 'sakura' ); /*我们似乎没有找到你想要的东西. 或许你可以搜索一下试试.*/?></p>
|
||||
<?php
|
||||
|
||||
endif; ?>
|
||||
|
@ -21,7 +21,7 @@
|
||||
the_content();
|
||||
|
||||
wp_link_pages( array(
|
||||
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'akina' ),
|
||||
'before' => '<div class="page-links">' . __( 'Pages:', 'sakura' ),
|
||||
'after' => '</div>',
|
||||
) );
|
||||
?>
|
||||
@ -32,7 +32,7 @@
|
||||
edit_post_link(
|
||||
sprintf(
|
||||
/* translators: %s: Name of current post */
|
||||
esc_html__( 'Edit %s', 'akina' ),
|
||||
__( 'Edit %s', 'sakura' ),
|
||||
the_title( '<span class="screen-reader-text">"', '"</span>', false )
|
||||
),
|
||||
'<span class="edit-link">',
|
||||
|
@ -13,7 +13,7 @@
|
||||
<?php if(akina_option('patternimg') || !get_post_thumbnail_id(get_the_ID())) { ?>
|
||||
<header class="entry-header">
|
||||
<h1 class="entry-title"><?php the_title(); ?></h1>
|
||||
<p class="entry-census"><?php echo poi_time_since(strtotime($post->post_date_gmt)); ?> <?php echo get_post_views(get_the_ID()); ?> 次阅读</p>
|
||||
<p class="entry-census"><?php echo poi_time_since(strtotime($post->post_date_gmt)); ?> <?php echo get_post_views(get_the_ID()).' '. _n('View','Views',get_post_views(get_the_ID()),'sakura')/*次阅读*/?> </p>
|
||||
<hr>
|
||||
</header><!-- .entry-header -->
|
||||
<?php } ?>
|
||||
@ -31,7 +31,7 @@
|
||||
</div><!-- .entry-content -->
|
||||
<?php the_reward(); ?>
|
||||
<footer class="post-footer">
|
||||
<div class="post-lincenses"><a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh" target="_blank" rel="nofollow"><i class="fa fa-creative-commons" aria-hidden="true"></i> 知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议</a></div>
|
||||
<div class="post-lincenses"><a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh" target="_blank" rel="nofollow"><i class="fa fa-creative-commons" aria-hidden="true"></i> <?php _e('Attribution-NonCommercial-ShareAlike 4.0 International','sakura'); /*知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议*/?></a></div>
|
||||
<div class="post-tags">
|
||||
<?php if ( has_tag() ) { echo '<i class="iconfont icon-tags"></i> '; the_tags('', ' ', ' ');}?>
|
||||
</div>
|
||||
|
@ -28,10 +28,10 @@
|
||||
<footer class="entry-footer">
|
||||
<div class="info-meta">
|
||||
<div class="comnum">
|
||||
<span><i class="iconfont icon-mark"></i><?php comments_popup_link('NOTHING', '1 条评论', '% 条评论'); ?></span>
|
||||
<span><i class="iconfont icon-mark"></i><?php comments_popup_link('NOTHING', '1 '.__("Comment","sakura")/*条评论*/, '% '.__("Comments","sakura")/*条评论*/); ?></span>
|
||||
</div>
|
||||
<div class="views">
|
||||
<span><i class="iconfont icon-attention"></i><?php echo get_post_views(get_the_ID()); ?> 热度</span>
|
||||
<span><i class="iconfont icon-attention"></i><?php echo get_post_views(get_the_ID()).' '._n('Hit','Hits',get_post_views(get_the_ID()),'sakura')/*热度*/?></span>
|
||||
</div>
|
||||
</div>
|
||||
</footer><!-- .entry-footer -->
|
||||
|
@ -49,8 +49,8 @@ $the_cat = get_the_category();
|
||||
</div>
|
||||
<a href="<?php the_permalink(); ?>" class="post-title"><h3><?php the_title();?></h3></a>
|
||||
<div class="post-meta">
|
||||
<span><i class="iconfont icon-attention"></i><?php echo get_post_views(get_the_ID()); ?> 热度</span>
|
||||
<span class="comments-number"><i class="iconfont icon-mark"></i><?php comments_popup_link('NOTHING', '1 条评论', '% 条评论'); ?></span>
|
||||
<span><i class="iconfont icon-attention"></i><?php echo get_post_views(get_the_ID()).' '._n('Hit','Hits',get_post_views(get_the_ID()),'sakura')/*热度*/?></span>
|
||||
<span class="comments-number"><i class="iconfont icon-mark"></i><?php comments_popup_link('NOTHING', '1 '.__("Comment","sakura")/*条评论*/, '% '.__("Comments","sakura")/*条评论*/); ?></span>
|
||||
<span><i class="iconfont icon-file"></i><a href="<?php echo esc_url(get_category_link($the_cat[0]->cat_ID)); ?>"><?php echo $the_cat[0]->cat_name; ?></a>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -31,10 +31,10 @@
|
||||
</div>
|
||||
<div class="info-meta">
|
||||
<div class="comnum">
|
||||
<span><i class="iconfont icon-mark"></i><?php comments_popup_link('NOTHING', '1 条评论', '% 条评论'); ?></span>
|
||||
<span><i class="iconfont icon-mark"></i><?php comments_popup_link('NOTHING', '1 '.__("Comment","sakura")/*条评论*/, '% '.__("Comments","sakura")/*条评论*/); ?></span>
|
||||
</div>
|
||||
<div class="views">
|
||||
<span><i class="iconfont icon-attention"></i><?php echo get_post_views(get_the_ID()); ?> 热度</span>
|
||||
<span><i class="iconfont icon-attention"></i><?php echo get_post_views(get_the_ID()).' '._n('Hit','Hits',get_post_views(get_the_ID()),'sakura')/*热度*/?></span>
|
||||
</div>
|
||||
</div>
|
||||
</footer><!-- .entry-footer -->
|
||||
|
@ -15,7 +15,7 @@
|
||||
<?php the_post_thumbnail('full'); ?>
|
||||
<header class="entry-header">
|
||||
<h1 class="entry-title"><?php the_title(); ?></h1>
|
||||
<p class="entry-census"><?php echo poi_time_since(strtotime($post->post_date_gmt)); ?> <?php echo get_post_views(get_the_ID()); ?> 次阅读</p>
|
||||
<p class="entry-census"><?php echo poi_time_since(strtotime($post->post_date_gmt)); ?> <?php echo get_post_views(get_the_ID()).' '._n('View','Views',get_post_views(get_the_ID()),'sakura')/*次阅读*/?></p>
|
||||
<hr>
|
||||
</header>
|
||||
</div>
|
||||
|
@ -11,40 +11,40 @@ if( !empty($_POST['register_reg']) ) {
|
||||
|
||||
// Check the username
|
||||
if ( $sanitized_user_login == '' ) {
|
||||
$error .= '<strong>错误</strong>:请输入用户名。<br />';
|
||||
$error .= '<strong>'.__("Error","sakura")./*错误*/'</strong>:'.__("Please enter username.","sakura")./*请输入用户名。*/'<br />';
|
||||
} elseif ( ! validate_username( $sanitized_user_login ) ) {
|
||||
$error .= '<strong>错误</strong>:此用户名包含无效字符,请输入有效的用户名。<br />';
|
||||
$error .= '<strong>'.__("Error","sakura")./*错误*/'</strong>:'.__("Invalid characters, please enter a valid username.","sakura")./*此用户名包含无效字符,请输入有效的用户名。*/'<br />';
|
||||
$sanitized_user_login = '';
|
||||
} elseif ( username_exists( $sanitized_user_login ) ) {
|
||||
$error .= '<strong>错误</strong>:该用户名已被注册。<br />';
|
||||
$error .= '<strong>'.__("Error","sakura")./*错误*/'</strong>:'.__("This username has been registered.","sakura")./*该用户名已被注册。*/'<br />';
|
||||
}
|
||||
|
||||
// Check the e-mail address
|
||||
if ( $user_email == '' ) {
|
||||
$error .= '<strong>错误</strong>:请填写电子邮件地址。<br />';
|
||||
$error .= '<strong>'.__("Error","sakura")./*错误*/'</strong>:'.__("Please enter email address.","sakura")./*请填写电子邮件地址。*/'<br />';
|
||||
} elseif ( ! is_email( $user_email ) ) {
|
||||
$error .= '<strong>错误</strong>:电子邮件地址不正确。<br />';
|
||||
$error .= '<strong>'.__("Error","sakura")./*错误*/'</strong>:'.__("Invalid email address","sakura")./*电子邮件地址不正确。*/'<br />';
|
||||
$user_email = '';
|
||||
} elseif ( email_exists( $user_email ) ) {
|
||||
$error .= '<strong>错误</strong>:该电子邮件地址已经被注册。<br />';
|
||||
$error .= '<strong>'.__("Error","sakura")./*错误*/'</strong>:'.__("This email address has been registered.","sakura")./*该电子邮件地址已经被注册。*/'<br />';
|
||||
}
|
||||
|
||||
// Check the password
|
||||
if(strlen($_POST['user_pass']) < 6){
|
||||
$error .= '<strong>错误</strong>:密码长度至少6位。<br />';
|
||||
$error .= '<strong>'.__("Error","sakura")./*错误*/'</strong>:'.__("Password length is at least 6 digits","sakura")./*密码长度至少6位。*/'<br />';
|
||||
}elseif($_POST['user_pass'] != $_POST['user_pass2']){
|
||||
$error .= '<strong>错误</strong>:两次输入的密码不一致。<br />';
|
||||
$error .= '<strong>'.__("Error","sakura")./*错误*/'</strong>:'.__("Inconsistent password entered twice","sakura")./*两次输入的密码不一致。*/'<br />';
|
||||
}
|
||||
|
||||
// verification
|
||||
if(akina_option('login_validate') && strlen($_POST['verification']) > 0 ){
|
||||
$error .= '<strong>错误</strong>:请拖动滑块验证身份<br />';
|
||||
$error .= '<strong>'.__("Error","sakura")./*错误*/'</strong>:'.__("Please drag the slider to verify identity","sakura")./*请拖动滑块验证身份*/'<br />';
|
||||
}
|
||||
|
||||
if($error == '') {
|
||||
$user_id = wp_create_user( $sanitized_user_login, $_POST['user_pass'], $user_email );
|
||||
if ( !$user_id ) {
|
||||
$error .= sprintf( '<strong>错误</strong>:无法完成注册请求... 请联系<a href=\"mailto:%s\">管理员</a>!<br />', get_option( 'admin_email' ) );
|
||||
$error .= '<strong>'.__("Error","sakura")./*错误*/'</strong>:'.__("Unable to complete registration request...Please contact","sakura")./*无法完成注册请求... 请联系*/'<a href=\"mailto:'. get_option( 'admin_email' ) .'\">'.__("administrator","sakura")./*管理员*/'</a>!<br />';
|
||||
}else if (!is_user_logged_in()) {
|
||||
$user = get_userdatabylogin($sanitized_user_login);
|
||||
$user_id = $user->ID;
|
||||
@ -73,14 +73,14 @@ if( !empty($_POST['register_reg']) ) {
|
||||
<div id="verification-slider">
|
||||
<div id="slider">
|
||||
<div id="slider_bg"></div>
|
||||
<span id="label">»</span><span id="labelTip">拖动滑块验证</span>
|
||||
<span id="label">»</span><span id="labelTip"><?php _e("Drag the slider to verify","sakura")/*拖动滑块验证*/?></span>
|
||||
</div>
|
||||
<input type="hidden" name="verification" value="verification" />
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<input type="hidden" name="register_reg" value="ok" />
|
||||
<?php if(!empty($error)) { echo '<p class="user-error">'.$error.'</p>'; } ?>
|
||||
<input class="button register-button" name="submit" type="submit" value="注 册">
|
||||
<input class="button register-button" name="submit" type="submit" value="<?php _e("Sign up","sakura")/*注 册*/?>">
|
||||
</form>
|
||||
</div>
|
||||
<?php }else{
|
||||
@ -89,7 +89,7 @@ if( !empty($_POST['register_reg']) ) {
|
||||
<script>//window.location.href='<?php echo $loadurl; ?>';</script>
|
||||
<?php } ?>
|
||||
<?php else : ?>
|
||||
<div class="register-close"><p>暂未开放注册。</p></div>
|
||||
<div class="register-close"><p><?php _e("Registration is not open yet","sakura")/*暂未开放注册。*/?></p></div>
|
||||
<?php endif; ?>
|
||||
</main><!-- #main -->
|
||||
</div><!-- #primary -->
|
||||
|
Loading…
Reference in New Issue
Block a user