
=_t('Links'); ?>
+-
+ $limit] );
+ if ( ! empty( $bookmarks ) ) {
+ foreach ( $bookmarks as $bookmark ) {
+ ?>
+
- + link_name; ?> + +
=_t('Links'); ?>
-
- $limit,'category_name'=>'友情链接'] );
if ( ! empty( $bookmarks ) ) {
- foreach ( $bookmarks as $bookmark ) { ?>
+ foreach ( $bookmarks as $bookmark ) {
+ ?>
- link_name; ?> diff --git a/app/web/widget/RecentArticles.php b/app/web/widget/RecentArticles.php index 78919d4..9c0dd9e 100644 --- a/app/web/widget/RecentArticles.php +++ b/app/web/widget/RecentArticles.php @@ -37,7 +37,7 @@ public function widget( $args, $instance )
-
-
+
=$p->title()?> diff --git a/app/web/widget/SickyArticles.php b/app/web/widget/StickyArticles.php similarity index 87% rename from app/web/widget/SickyArticles.php rename to app/web/widget/StickyArticles.php index fe784c7..135ab5a 100644 --- a/app/web/widget/SickyArticles.php +++ b/app/web/widget/StickyArticles.php @@ -3,12 +3,12 @@ use xenice\theme\Theme; -class SickyArticles extends \WP_Widget +class StickyArticles extends \WP_Widget { public function __construct() { - $widget_ops = array( 'description' => _t('Xenice Sicky Articles') ); - parent::__construct( 'xenice_sicky_article', _t('Sicky Articles'), $widget_ops ); + $widget_ops = array( 'description' => _t('Xenice Sticky Articles') ); + parent::__construct( 'xenice_sticky_article', _t('Sticky Articles'), $widget_ops ); } public function widget( $args, $instance ) @@ -37,7 +37,7 @@ public function widget( $args, $instance )- -
+
=$p->title()?> @@ -53,7 +53,7 @@ public function widget( $args, $instance ) function form( $instance ) { - $instance = wp_parse_args( (array) $instance, ['name'=>_t( 'Sicky Articles'), 'limit' => 8] ); + $instance = wp_parse_args( (array) $instance, ['name'=>_t( 'Sticky Articles'), 'limit' => 8] ); $limit = strip_tags( $instance['limit'] ); ?>diff --git a/app/web/widget/UniversalArticles.php b/app/web/widget/UniversalArticles.php index 4edfa83..377960d 100644 --- a/app/web/widget/UniversalArticles.php +++ b/app/web/widget/UniversalArticles.php @@ -52,7 +52,7 @@ function widget( $args, $instance )
- -
+
=$p->title()?> diff --git a/app/web/widget/Widget.php b/app/web/widget/Widget.php index 229725f..0e1ec7d 100644 --- a/app/web/widget/Widget.php +++ b/app/web/widget/Widget.php @@ -16,7 +16,7 @@ public function register() register_widget( __namespace__ . '\UniversalArticles'); register_widget( __namespace__ . '\HotArticles'); register_widget( __namespace__ . '\RecentArticles'); - register_widget( __namespace__ . '\SickyArticles'); + register_widget( __namespace__ . '\StickyArticles'); register_widget( __namespace__ . '\RecentComments'); register_widget( __namespace__ . '\TagsCloud'); register_widget( __namespace__ . '\Links'); diff --git a/composer.json b/composer.json index d54b411..ddf8a62 100644 --- a/composer.json +++ b/composer.json @@ -7,15 +7,14 @@ "email": "xenice@qq.com" } ], - "minimum-stability": "dev", "require": { - "php": ">=7.0", - "xenice/wp-framework":"@dev", - "xenice/wp-login":"@dev" + "php": ">=7.0" }, "autoload": { "psr-4": { + "xenice\\" : "vendor/xenice/src", "app\\":"app/" - } + }, + "files": ["vendor/xenice/src/functions.php"] } } \ No newline at end of file diff --git a/composer.lock b/composer.lock index b1e9c91..30a7e58 100644 --- a/composer.lock +++ b/composer.lock @@ -4,106 +4,17 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "b4f2e46ece06c236c9bbf44dacbdcbc8", - "packages": [ - { - "name": "xenice/wp-framework", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/xenice/wp-framework.git", - "reference": "863423b6ad0d0fed1d6fe1be2aeea18a27a3454c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/xenice/wp-framework/zipball/863423b6ad0d0fed1d6fe1be2aeea18a27a3454c", - "reference": "863423b6ad0d0fed1d6fe1be2aeea18a27a3454c", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": ">=7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "xenice\\theme\\": "theme/", - "xenice\\model\\": "model/", - "xenice\\view\\": "view/", - "xenice\\option\\": "option/", - "xenice\\optimize\\": "optimize/", - "xenice\\mail\\": "mail/" - }, - "files": [ - "option/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "authors": [ - { - "name": "xenice", - "email": "xenice@qq.com" - } - ], - "description": "A core package for wordpress theme framework xenice", - "time": "2020-01-06T01:46:43+00:00" - }, - { - "name": "xenice/wp-login", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/xenice/wp-login.git", - "reference": "edacea110aa4b95fbd96fac8c79e28e468f21159" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/xenice/wp-login/zipball/edacea110aa4b95fbd96fac8c79e28e468f21159", - "reference": "edacea110aa4b95fbd96fac8c79e28e468f21159", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": ">=7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "xenice\\login\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "authors": [ - { - "name": "xenice", - "email": "xenice@qq.com" - } - ], - "description": "A social login package for the wordpress theme framework xenice", - "time": "2020-01-06T01:23:54+00:00" - } - ], + "content-hash": "ec813f218c60af994344673c870ee487", + "packages": [], "packages-dev": [], "aliases": [], - "minimum-stability": "dev", - "stability-flags": { - "xenice/wp-framework": 20, - "xenice/wp-login": 20 - }, + "minimum-stability": "stable", + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { "php": ">=7.0" }, - "platform-dev": [] + "platform-dev": [], + "plugin-api-version": "2.0.0" } diff --git a/config/app.php b/config/app.php index 2e7bf64..374dfce 100644 --- a/config/app.php +++ b/config/app.php @@ -1,6 +1,7 @@ get('Name')); +define('THEME_KEY', explode(' ', THEME_NAME)[1]??'web'); define('THEME_DIR', get_template_directory()); define('THEME_URL', get_template_directory_uri()); define('THEME_VER', wp_get_theme()->get('Version')); @@ -11,6 +12,12 @@ define('XENICE_DIR', THEME_DIR . '/vendor/xenice'); define('XENICE_URL', THEME_URL . '/vendor/xenice'); +// ex +define('VIEW_SLUG_EX', 'app/'.THEME_KEY.'/view'); +define('VIEW_DIR_EX', THEME_DIR . '/' . VIEW_SLUG_EX); +define('STATIC_DIR_EX', STATIC_DIR . '/' . THEME_KEY); +define('STATIC_URL_EX', STATIC_URL . '/' . THEME_KEY); + // options define('OPTIONS_FILE', __dir__ . '/options.php'); diff --git a/config/options.php b/config/options.php index d02b4bd..7e41b1e 100644 --- a/config/options.php +++ b/config/options.php @@ -12,8 +12,10 @@ 'value'=>'#0099FF #0099FF #0099FF #007bff #fff #99CCFF', 'opts' =>[ '#0099FF #0099FF #0099FF #007bff #fff #99CCFF' => _t('Blue'), - '#000 #666 #f9f9f9 #eee #666 #aaa' => _t('Grey'), '#FF5E52 #FF5E52 #FF5E52 #f13c2f #fff #fc938b' => _t('Red'), + '#1fae67 #1fae67 #1fae67 #229e60 #fff #35dc89' => _t('Green'), + '#ff4979 #ff4979 #ff4979 #f2295e #fff #fb94af' => _t('Pink'), + '#000 #666 #f9f9f9 #eee #666 #aaa' => _t('Grey'), ] ], @@ -24,6 +26,27 @@ 'style' => 'regular', 'value' => STATIC_URL . '/images/icon.ico', ], + [ + 'id' => 'site_logo', + 'name' => _t('Site Logo'), + 'type' => 'img', + 'style' => 'regular', + 'value' => STATIC_URL . '/images/logo.png', + ], + [ + 'id' => 'default_thumbnail', + 'name' => _t('Default Thumbnail'), + 'type' => 'img', + 'style' => 'regular', + 'value' => STATIC_URL . '/images/thumbnail.png', + ], + [ + 'id' => 'default_loading_image', + 'name' => _t('Default Loading Image'), + 'type' => 'img', + 'style' => 'regular', + 'value' => STATIC_URL . '/images/loading.png', + ], [ 'id' => 'display_style', 'name' => _t('Display Style'), @@ -62,7 +85,7 @@ 'desc' => _t('Customize the site footer'), 'type' => 'textarea', 'style' => 'regular', - 'value' => '© 2020 Xenicetheme by onenice', + 'value' => '', 'rows' => 6 ], @@ -83,6 +106,13 @@ ], ] ], + [ + 'id' => 'site_icp', + 'name' => _t('Site ICP'), + 'type' => 'text', + 'style' => 'regular', + 'value' => '', + ], [ 'name' => 'CDN', 'fields'=>[ @@ -96,7 +126,7 @@ 'id' => 'cdn_url', 'type' => 'select', 'label' => _t('CDN Repository'), - 'value' => 'https://www.staticfile.org', + 'value' => 'https://cdn.staticfile.org', 'opts' => [ 'https://cdn.staticfile.org'=>'staticfile', 'https://cdn.bootcdn.net/ajax/libs'=>'bootcdn', @@ -109,10 +139,10 @@ 'name' => _t('Auxiliary'), 'fields'=>[ [ - 'id' => 'enable_highlight', + 'id' => 'first_image_thumbnail', 'type' => 'checkbox', 'value' => true, - 'label' => _t('Enable code highlight') + 'label' => _t('The first picture of the article is used as a thumbnail when no thumbnail is set') ], [ 'id' => 'enable_category_badge', @@ -127,11 +157,11 @@ 'label' => _t('Enable article seo') ], [ - 'id' => 'enable_phrase', + 'id' => 'enable_highlight', 'type' => 'checkbox', - 'value' => false, - 'label' => _t('Enable the phrase') - ] + 'value' => true, + 'label' => _t('Enable code highlight') + ], ] ], ] @@ -169,7 +199,7 @@ 'label' => _t('Enable Slide') ], [ - 'id' => 'display_slide_title', + 'id' => 'display_slide_info', 'type' => 'checkbox', 'value' => true, 'label' => _t('Display the title and description of the slide') @@ -178,38 +208,30 @@ ], [ - 'id' => 'slide_image_1', - 'name' => _t('Slide Image 1'), - 'type' => 'image', + 'id' => 'slide_images', + 'name' => _t('Slide Images'), + 'type' => 'slide', 'value' => [ - 'url' =>'http://www.xenice.com/', - 'title'=>'xenice', - 'desc' => '', - 'path' =>STATIC_URL . '/images/onenice_slide_1.jpg' - ] - ], - [ - 'id' => 'slide_image_2', - 'name' => _t('Slide Image 2'), - 'type' => 'image', - 'value' => [ - 'url' =>'http://www.xenice.com/', - 'title'=>'xenice', - 'desc' => '', - 'path' =>STATIC_URL . '/images/onenice_slide_2.jpg' - ] + [ + 'url'=>'https://www.xenice.com/', + 'src'=>STATIC_URL . '/images/onenice_slide_1.jpg', + 'title'=>'xenice', + 'desc'=>'' + ], + [ + 'url'=>'https://www.xenice.com/', + 'src'=>STATIC_URL . '/images/onenice_slide_2.jpg', + 'title'=>'xenice', + 'desc'=>'' + ], + [ + 'url'=>'https://www.xenice.com/', + 'src'=>STATIC_URL . '/images/onenice_slide_3.jpg', + 'title'=>'xenice', + 'desc'=>'' + ], + ], ], - [ - 'id' => 'slide_image_3', - 'name' => _t('Slide Image 3'), - 'type' => 'image', - 'value' => [ - 'url' =>'http://www.xenice.com/', - 'title'=>'xenice', - 'desc' => '', - 'path' =>STATIC_URL . '/images/onenice_slide_3.jpg' - ] - ] ] ], [ diff --git a/functions.php b/functions.php index b0294c9..7162a32 100644 --- a/functions.php +++ b/functions.php @@ -2,66 +2,7 @@ require __dir__ . '/config/app.php'; require __dir__ . '/vendor/autoload.php'; -use xenice\theme\Theme; -use xenice\view\View; -use app\web\Loader; - -Theme::alias([ - // model - 'user' => 'app\web\model\User', - 'article' => 'app\web\model\Article', - 'page' => 'app\web\model\Page', - 'category' => 'app\web\model\Category', - 'tag' => 'app\web\model\Tag', - 'comment' => 'app\web\model\Comment', - - // pointer - 'article_pointer' => 'app\web\model\pointer\Article', - 'page_pointer' => 'app\web\model\pointer\Page', - 'category_pointer' => 'app\web\model\pointer\Category', - 'comment_pointer' => 'app\web\model\pointer\Comment', - 'user_pointer' => 'app\web\model\pointer\User', - -]); - -Theme::bind('xenice_route_run',function($type, $method, $args){ - $class = ucfirst($type) . 'Controller'; - $controller = Theme::instance('app\web\controller\\' . $class); - $controller->extends = View::instance(); - return call_user_func_array([$controller, $method], $args); -}); - - -function _t($str, $domain = THEME_NAME) -{ - $translations = get_translations_for_domain($domain); - return $translations->translate($str); -} -function is_url($v){ - $pattern="#(http|https)://(.*\.)?.*\..*#i"; - return preg_match($pattern,$v); -} - - -function import($slug, $dir = VIEW_DIR) -{ - extract(View::getVars()); - include($dir . '/' . $slug . '.php'); -} - -function ad($id, $class='', $style = ''){ - if(take('enable_' . $id. '_ad')){ - $ad_code = take($id. '_ad_code'); - $ad_code_m = take($id. '_ad_code_m'); - $class && $class .= ' '; - if($ad_code){ - echo '' . $ad_code . ''; - } - if($ad_code_m){ - echo '' . $ad_code_m . ''; - } - } -} +use xenice\theme\Theme; -Loader::instance(); \ No newline at end of file +Theme::instance('app\\'.THEME_KEY.'\Loader'); \ No newline at end of file diff --git a/lang/zh_CN.mo b/lang/zh_CN.mo index 302c3fc..1291a98 100644 Binary files a/lang/zh_CN.mo and b/lang/zh_CN.mo differ diff --git a/lang/zh_CN.po b/lang/zh_CN.po index 6715a1e..406ab79 100644 --- a/lang/zh_CN.po +++ b/lang/zh_CN.po @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: onenice\n" -"POT-Creation-Date: 2020-09-28 11:27+0800\n" -"PO-Revision-Date: 2020-09-28 11:29+0800\n" +"POT-Creation-Date: 2021-01-31 20:14+0800\n" +"PO-Revision-Date: 2021-01-31 20:15+0800\n" "Last-Translator: \n" "Language-Team: xenice\n" "Language: zh_CN\n" @@ -16,128 +16,499 @@ msgstr "" "X-Poedit-SourceCharset: UTF-8\n" "X-Poedit-SearchPath-0: .\n" -#: app/web/about/About.php:22 -msgid "About" -msgstr "关于" +#: app/pro/ajax/LikeAjax.php:18 +msgid "You already liked it" +msgstr "您已经点赞了" -#: app/web/about/About.php:23 -msgid "About the theme" -msgstr "关于主题" +#: app/pro/ajax/LikeAjax.php:32 app/pro/model/Article.php:20 +msgid "Liked" +msgstr "已赞" + +#: app/pro/controller/SingleController.php:22 +msgid "Free" +msgstr "免费" + +#: app/pro/model/Article.php:23 +msgid "Like" +msgstr "赞" + +#: app/pro/module/inner/Admin.php:17 +msgid "Add Resource" +msgstr "新增资源" + +#: app/pro/options.php:6 +msgid "advanced" +msgstr "高级" + +#: app/pro/options.php:7 +msgid "Advanced Settings" +msgstr "高级设置" + +#: app/pro/options.php:11 +msgid "Article Settings" +msgstr "文章设置" + +#: app/pro/options.php:14 +msgid "Advanced Options" +msgstr "高级选项" + +#: app/pro/options.php:20 +msgid "Show top articles on the home page" +msgstr "首页中显示置顶文章 " + +#: app/pro/options.php:26 +msgid "Give a like" +msgstr "点赞" + +#: app/pro/options.php:32 +msgid "Only search title" +msgstr "只搜索标题" + +#: app/pro/options.php:38 +msgid "Enable css animation" +msgstr "开启CSS动画" + +#: app/pro/options.php:44 +msgid "Enable PhotoSwipe" +msgstr "开启PhotoSwipe" + +#: app/pro/options.php:50 +msgid "Enable the phrase" +msgstr "开启说说" + +#: app/pro/options.php:55 +msgid "List page display fields" +msgstr "列表页显示字段" + +#: app/pro/options.php:61 app/pro/options.php:84 +msgid "display author name" +msgstr "显示作者名称" + +#: app/pro/options.php:67 +msgid "display article description" +msgstr "显示文章描述" + +#: app/pro/options.php:73 app/pro/options.php:90 +msgid "display article views" +msgstr "显示文章阅读量" + +#: app/pro/options.php:78 +msgid "Single page display fields" +msgstr "单页显示字段" + +#: app/pro/options.php:96 +msgid "display article comments" +msgstr "显示文章评论数" + +#: app/pro/options.php:103 +msgid "Recent Articles Alias" +msgstr "最新文章别名" + +#: app/pro/options.php:105 app/pro/view/home/index.php:7 +#: app/web/view/home/index.php:6 app/web/widget/RecentArticles.php:11 +#: app/web/widget/RecentArticles.php:56 app/web/widget/UniversalArticles.php:39 +msgid "Recent Articles" +msgstr "最新文章" + +#: app/pro/options.php:109 +msgid "Tags Alias" +msgstr "标签别名" + +#: app/pro/options.php:115 +msgid "Related Articles Alias" +msgstr "相关文章别名" + +#: app/pro/options.php:121 app/pro/options.php:145 +msgid "Resource Categories" +msgstr "资源分类" + +#: app/pro/options.php:124 app/pro/options.php:148 +msgid "Fill in the category ID, multiple categories separated by a comma." +msgstr "填写分类ID,多个分类用逗号分割" + +#: app/pro/options.php:130 +msgid "Resource Settings" +msgstr "资源设置" + +#: app/pro/options.php:133 +msgid "Resource Options" +msgstr "资源选项" + +#: app/pro/options.php:139 +msgid "Enable Hot Sale" +msgstr "开启热卖" + +#: app/pro/template/Template.php:17 vendor/xenice/wp-login/src/Login.php:41 +msgid "QQ Login" +msgstr "QQ登录" + +#: app/pro/template/Template.php:23 vendor/xenice/wp-login/src/Login.php:65 +msgid "WeChat Login" +msgstr "微信登录" + +#: app/pro/template/Template.php:27 +msgid "Weibo Login" +msgstr "微薄登录" + +#: app/pro/template/Template.php:31 +msgid "Log in other ways: " +msgstr "其它登录方式:" + +#: app/pro/view/archive/index.php:4 app/pro/view/search/index.php:4 +#: app/wc/module/woocommerce/templates/page/account.php:120 +#: app/web/model/Category.php:17 app/web/model/Tag.php:12 +#: app/web/model/part/Article.php:15 app/web/view/archive/index.php:4 +#: app/web/view/search/index.php:4 config/options.php:171 +#: vendor/xenice/wp-profession/src/doc/view/index.php:12 +#: vendor/xenice/wp-profession/src/doc_bak/view/index.php:12 +#: vendor/xenice/wp-profession/src/file/view/index.php:12 +#: vendor/xenice/wp-profession/src/music/view/search.php:4 +msgid "Home" +msgstr "首页" + +#: app/pro/view/cards-text.php:13 app/pro/view/cards-thumbnail.php:13 +#: app/pro/view/category/resource.php:108 app/pro/view/single/index.php:42 +#: app/pro/view/single/resource.php:166 +#: vendor/xenice/wp-profession/src/music/view/cards-text.php:13 +#: vendor/xenice/wp-profession/src/music/view/cards-thumbnail.php:16 +msgid "private" +msgstr "私有" + +#: app/pro/view/cards-text.php:28 app/pro/view/cards-thumbnail.php:29 +#: app/pro/view/category/resource.php:122 app/web/view/cards-text.php:26 +#: app/web/view/cards-thumbnail.php:26 +#: vendor/xenice/wp-profession/src/music/view/cards-text.php:28 +#: vendor/xenice/wp-profession/src/music/view/cards-thumbnail.php:32 +msgid "No articles." +msgstr "暂无文章 。。" + +#: app/pro/view/comments.php:4 app/web/view/comments.php:4 +msgid "Comments" +msgstr "评论" -#: app/web/about/About.php:24 +#: app/pro/view/comments.php:13 app/web/view/comments.php:13 +msgid "Leave a reply" +msgstr "发表评论" + +#: app/pro/view/comments.php:19 +msgid "" +"You need login to reply." +msgstr "" +"请登录后评论。" + +#: app/pro/view/comments.php:25 app/web/view/comments.php:26 #, php-format +msgid "Welcome %2$s back," +msgstr "欢迎%2$s归来," + +#: app/pro/view/comments.php:26 app/web/view/comments.php:27 +msgid "Log out of this account" +msgstr "退出帐号" + +#: app/pro/view/comments.php:27 app/web/view/comments.php:28 +msgid "Log out »" +msgstr "退出 »" + +#: app/pro/view/comments.php:37 msgid "" -"Thank you for using %s" -"a> theme." +"Not logged in. I want to login" msgstr "" -"感谢使用%s主题。" +"您还没有登录,请先登录" -#: app/web/about/About.php:29 -msgid "Version" -msgstr "版本" +#: app/pro/view/comments.php:44 app/web/view/comments.php:45 +msgid "Username (required)" +msgstr "用户名(必填)" -#: app/web/about/About.php:35 -msgid "Official website" -msgstr "官网" +#: app/pro/view/comments.php:45 app/web/view/comments.php:46 +msgid "Email (required)" +msgstr "邮箱(必填)" -#: app/web/action/AdminAction.php:12 app/web/action/GlobalAction.php:45 -msgid "Top menu" -msgstr "顶部菜单" +#: app/pro/view/comments.php:46 app/pro/view/page/user.php:172 +#: app/web/view/comments.php:47 app/web/view/page/user.php:157 +#: vendor/xenice/wp-profession/src/markdown/PostMeta.php:31 +#: vendor/xenice/wp-profession/src/markdown/PostMeta.php:39 +msgid "URL" +msgstr "网址" -#: app/web/action/AdminAction.php:31 app/web/action/AdminAction.php:32 -#: app/web/action/AdminAction.php:43 -msgid "Phrase" -msgstr "说说" +#: app/pro/view/comments.php:56 app/web/view/comments.php:57 +msgid "Validation" +msgstr "验证" -#: app/web/action/AdminAction.php:33 -msgid "All Phrases" -msgstr "所有说说" +#: app/pro/view/comments.php:57 app/pro/view/page/user.php:216 +#: app/web/view/comments.php:58 app/web/view/page/user.php:201 +msgid "Submit" +msgstr "提交" -#: app/web/action/AdminAction.php:34 -#: vendor/xenice/wp-profession/src/doc/Doc.php:163 -#: vendor/xenice/wp-profession/src/source/Source.php:40 -msgid "Add New" -msgstr "新增" +#: app/pro/view/header.php:41 app/pro/view/search/index.php:5 +#: app/web/view/header.php:35 app/web/view/search/index.php:5 +#: vendor/xenice/wp-profession/src/music/view/search.php:5 +msgid "Search keyword" +msgstr "搜索关键词" -#: app/web/action/AdminAction.php:35 -msgid "Add New Phrase" -msgstr "新增说说" +#: app/pro/view/home/hot.php:100 app/web/widget/StickyArticles.php:11 +#: app/web/widget/StickyArticles.php:56 +msgid "Sticky Articles" +msgstr "置顶文章" -#: app/web/action/AdminAction.php:36 -msgid "Edit Phrase" -msgstr "编辑说说" +#: app/pro/view/login.php:9 +msgid "Personal Center" +msgstr "个人中心" -#: app/web/action/AdminAction.php:37 -msgid "New Phrase" -msgstr "新说说" +#: app/pro/view/login.php:14 app/web/view/login.php:10 +msgid "Admin" +msgstr "管理" -#: app/web/action/AdminAction.php:38 -msgid "View Phrase" -msgstr "浏览说说" +#: app/pro/view/login.php:16 app/web/view/login.php:12 +msgid "Logout" +msgstr "退出" -#: app/web/action/AdminAction.php:39 -msgid "Search Phrases" -msgstr "搜索说说" +#: app/pro/view/login.php:34 app/pro/view/modal.php:9 app/pro/view/modal.php:24 +#: app/pro/view/modal.php:46 app/pro/view/page/login.php:77 +#: app/pro/view/page/login.php:110 app/pro/view/page/login.php:134 +#: app/pro/view/page/login.php:169 app/web/view/login.php:14 +#: app/web/view/login.php:22 app/web/view/login.php:37 +#: app/web/view/login.php:58 app/web/view/page/login.php:74 +#: app/web/view/page/login.php:107 app/web/view/page/login.php:131 +#: app/web/view/page/login.php:166 static/js/login.js:53 +#: static/pro/js/login.js:44 vendor/xenice/wp-login/src/Login.php:37 +msgid "Login" +msgstr "登录" -#: app/web/action/AdminAction.php:40 -msgid "No phrases found" -msgstr "没有说说" +#: app/pro/view/modal.php:12 app/pro/view/modal.php:49 +#: app/pro/view/modal.php:73 app/pro/view/page/login.php:82 +#: app/pro/view/page/login.php:106 app/pro/view/page/login.php:135 +#: app/pro/view/page/login.php:170 app/web/view/login.php:25 +#: app/web/view/login.php:61 app/web/view/login.php:85 +#: app/web/view/page/login.php:79 app/web/view/page/login.php:103 +#: app/web/view/page/login.php:132 app/web/view/page/login.php:167 +#: static/js/login.js:175 static/pro/js/login.js:166 +msgid "Register" +msgstr "注册" -#: app/web/action/AdminAction.php:41 -msgid "No phrases found in trash" -msgstr "垃圾站没有说说" +#: app/pro/view/modal.php:18 app/pro/view/page/login.php:71 +#: app/pro/view/page/login.php:120 app/web/view/login.php:31 +#: app/web/view/page/login.php:68 app/web/view/page/login.php:117 +msgid "Username or Email" +msgstr "用户名或邮箱" -#: app/web/action/GlobalAction.php:53 -msgid "Global Top" -msgstr "全局上" +#: app/pro/view/modal.php:21 app/pro/view/modal.php:61 +#: app/pro/view/page/login.php:74 app/pro/view/page/login.php:94 +#: app/web/view/login.php:34 app/web/view/login.php:73 +#: app/web/view/page/login.php:71 app/web/view/page/login.php:91 +msgid "Password" +msgstr "密码" -#: app/web/action/GlobalAction.php:60 -msgid "Global Bottom" -msgstr "全局下" +#: app/pro/view/modal.php:29 app/web/view/login.php:41 +msgid "Forget password?" +msgstr "忘记密码?" -#: app/web/action/GlobalAction.php:67 -msgid "Home Page" -msgstr "首页" +#: app/pro/view/modal.php:55 app/pro/view/page/login.php:88 +#: app/pro/view/page/user.php:154 app/web/view/login.php:67 +#: app/web/view/page/login.php:85 app/web/view/page/user.php:139 +msgid "Username" +msgstr "用户名" -#: app/web/action/GlobalAction.php:74 -msgid "Category Page" -msgstr "分类页" +#: app/pro/view/modal.php:58 app/pro/view/page/login.php:91 +#: app/pro/view/page/user.php:160 app/web/view/login.php:70 +#: app/web/view/page/login.php:88 app/web/view/page/user.php:145 +msgid "Email" +msgstr "邮箱" -#: app/web/action/GlobalAction.php:81 -msgid "Tag Page" -msgstr "标签页" +#: app/pro/view/modal.php:64 app/pro/view/page/login.php:97 +#: app/pro/view/page/login.php:155 app/pro/view/page/user.php:213 +#: app/web/view/login.php:76 app/web/view/page/login.php:94 +#: app/web/view/page/login.php:152 app/web/view/page/user.php:198 +msgid "Confirm password" +msgstr "确认密码" -#: app/web/action/GlobalAction.php:88 -msgid "Search Page" -msgstr "搜索页" +#: app/pro/view/modal.php:67 app/pro/view/page/login.php:100 +#: app/pro/view/page/login.php:123 app/pro/view/page/login.php:158 +#: app/web/ajax/LoginAjax.php:182 app/web/ajax/LoginAjax.php:183 +#: app/web/view/login.php:79 app/web/view/page/login.php:97 +#: app/web/view/page/login.php:120 app/web/view/page/login.php:155 +msgid "Captcha" +msgstr "验证码" -#: app/web/action/GlobalAction.php:95 -msgid "Single Page" -msgstr "单篇页" +#: app/pro/view/modal.php:69 app/web/view/login.php:81 +msgid "Get captcha" +msgstr "获取验证码" -#: app/web/action/GuestAction.php:122 config/options.php:82 -msgid "Service QQ" -msgstr "咨询QQ" +#: app/pro/view/notFound/index.php:10 app/web/view/notFound/index.php:10 +msgid "Not Found" +msgstr "未找到" -#: app/web/action/GuestAction.php:125 -msgid "Back to top" -msgstr "返回顶部" +#: app/pro/view/notFound/index.php:11 app/web/view/notFound/index.php:11 +msgid "Sorry, the page you visited has migrated or does not exist" +msgstr "对不起,您访问的页面已迁移或不存在" -#: app/web/action/SeoAction.php:18 -msgid "SEO" -msgstr "SEO" +#: app/pro/view/page/login.php:81 app/web/view/page/login.php:78 +msgid "Forget password ?" +msgstr "忘记密码?" -#: app/web/action/SeoAction.php:30 -msgid "Title" -msgstr "标题" +#: app/pro/view/page/login.php:102 app/web/view/page/login.php:99 +#: static/js/login.js:299 static/js/login.js:305 static/pro/js/login.js:291 +#: static/pro/js/login.js:297 +msgid "Send captcha" +msgstr "发送验证码" -#: app/web/action/SeoAction.php:32 -msgid "Describtion" -msgstr "描述" +#: app/pro/view/page/login.php:114 app/web/view/page/login.php:111 +msgid "" +"Please enter your username or email address. You will receive a link to " +"create a new password via email." +msgstr "请输入您的用户名或邮箱地址。您将通过邮箱收到创建新密码的链接。" -#: app/web/action/SeoAction.php:34 config/options.php:155 -msgid "Keywords" -msgstr "关键字" +#: app/pro/view/page/login.php:130 app/web/view/page/login.php:127 +#: static/js/login.js:208 static/pro/js/login.js:199 +msgid "Get New Password" +msgstr "获取新密码" + +#: app/pro/view/page/login.php:152 app/pro/view/page/user.php:210 +#: app/web/view/page/login.php:149 app/web/view/page/user.php:195 +msgid "New password" +msgstr "新密码" + +#: app/pro/view/page/login.php:165 app/pro/view/page/user.php:202 +#: app/web/view/page/login.php:162 app/web/view/page/user.php:187 +#: static/js/login.js:249 static/pro/js/login.js:240 +msgid "Change password" +msgstr "修改密码" + +#: app/pro/view/page/login.php:174 app/web/view/page/login.php:171 +msgid "Error request, please check email for reset password link" +msgstr "错误请求,请检查邮箱中的重置密码链接" + +#: app/pro/view/page/login.php:177 app/web/view/page/login.php:174 +msgid "Back to home" +msgstr "返回首页" + +#: app/pro/view/page/user.php:95 app/pro/view/page/user.php:147 +#: app/web/view/page/user.php:87 app/web/view/page/user.php:132 +msgid "Profile" +msgstr "简介" + +#: app/pro/view/page/user.php:96 app/web/view/page/user.php:90 +msgid "Security" +msgstr "安全" + +#: app/pro/view/page/user.php:125 app/web/view/page/user.php:110 +msgid "The url is invalid" +msgstr "网址无效" + +#: app/pro/view/page/user.php:134 app/web/view/page/user.php:119 +msgid "Save success" +msgstr "保存成功" + +#: app/pro/view/page/user.php:137 app/web/view/page/user.php:122 +msgid "Save failed" +msgstr "保存失败" + +#: app/pro/view/page/user.php:166 app/web/view/page/user.php:151 +#: vendor/xenice/wp-framework/optimize/UserTableOptimize.php:66 +msgid "Nicename" +msgstr "昵称" + +#: app/pro/view/page/user.php:177 app/web/view/page/user.php:162 +msgid "Save changes" +msgstr "保存更改" + +#: app/pro/view/page/user.php:185 app/web/view/page/user.php:170 +msgid "Original password error" +msgstr "原密码错误" + +#: app/pro/view/page/user.php:189 app/web/view/page/user.php:174 +#: static/js/login.js:36 static/pro/js/login.js:27 +msgid "Password cannot be empty" +msgstr "密码不能为空" + +#: app/pro/view/page/user.php:193 app/web/ajax/LoginAjax.php:72 +#: app/web/ajax/LoginAjax.php:277 app/web/view/page/user.php:178 +#: static/js/login.js:120 static/js/login.js:122 static/js/login.js:226 +#: static/pro/js/login.js:111 static/pro/js/login.js:113 +#: static/pro/js/login.js:217 +msgid "Entered passwords differ" +msgstr "两次输入的密码不一致" + +#: app/pro/view/page/user.php:197 app/web/ajax/LoginAjax.php:293 +#: app/web/view/page/user.php:182 +msgid "Password changed successfully" +msgstr "密码更改成功" + +#: app/pro/view/page/user.php:207 app/web/view/page/user.php:192 +msgid "Original password" +msgstr "原密码" + +#: app/pro/view/single/index.php:50 app/pro/view/single/resource.php:174 +#: app/web/view/single/index.php:48 +#: vendor/xenice/wp-profession/src/doc/view/single.php:169 +#: vendor/xenice/wp-profession/src/doc_bak/view/single.php:179 +#: vendor/xenice/wp-profession/src/file/view/per-page.php:55 +#: vendor/xenice/wp-profession/src/file/view/single.php:55 +msgid "Edit" +msgstr "编辑" + +#: app/pro/view/single/index.php:57 +msgid "Tags" +msgstr "标签" + +#: app/pro/view/single/index.php:57 app/web/ajax/LoginAjax.php:244 +#: app/web/ajax/LoginAjax.php:294 +#: vendor/xenice/wp-profession/src/source/PostMeta.php:41 +msgid ":" +msgstr ":" + +#: app/pro/view/single/index.php:68 app/pro/view/single/resource.php:240 +#: app/web/view/single/index.php:56 +#: vendor/xenice/wp-profession/src/doc/view/single.php:177 +#: vendor/xenice/wp-profession/src/doc_bak/view/single.php:187 +#: vendor/xenice/wp-profession/src/file/view/per-page.php:64 +#: vendor/xenice/wp-profession/src/file/view/single.php:64 +msgid "Previous Page
" +msgstr "上一篇
" + +#: app/pro/view/single/index.php:69 app/pro/view/single/resource.php:241 +#: app/web/view/single/index.php:57 +#: vendor/xenice/wp-profession/src/doc/view/single.php:178 +#: vendor/xenice/wp-profession/src/doc_bak/view/single.php:188 +#: vendor/xenice/wp-profession/src/file/view/per-page.php:65 +#: vendor/xenice/wp-profession/src/file/view/single.php:65 +msgid "Next Page
" +msgstr "下一篇
" + +#: app/pro/view/single/related.php:2 app/web/view/single/related.php:2 +msgid "Related Articles" +msgstr "相关文章" + +#: app/pro/view/single/resource.php:180 +msgid "Price" +msgstr "价格" + +#: app/pro/view/single/resource.php:198 +msgid "Buy" +msgstr "购买" + +#: app/pro/view/single/resource.php:199 +msgid "Download" +msgstr "下载" + +#: app/pro/view/single/resource.php:200 +msgid "Demo" +msgstr "演示" + +#: app/pro/view/single/resource.php:201 +msgid "Service" +msgstr "客服" + +#: app/pro/view/single/resource.php:211 +msgid "Hot Sale" +msgstr "热卖推荐" + +#: app/pro/view/single/resource.php:227 +msgid "Resource Details" +msgstr "资源详情" #: app/web/ajax/LoginAjax.php:48 app/web/ajax/LoginAjax.php:127 msgid "Please enter username" @@ -167,12 +538,6 @@ msgstr "邮箱已注册" msgid "Please enter password" msgstr "请输入密码" -#: app/web/ajax/LoginAjax.php:72 app/web/ajax/LoginAjax.php:277 -#: app/web/view/page/user.php:178 static/js/login.js:120 static/js/login.js:122 -#: static/js/login.js:226 -msgid "Entered passwords differ" -msgstr "两次输入的密码不一致" - #: app/web/ajax/LoginAjax.php:76 msgid "Password length should not be less than 6" msgstr "密码长度不得小于6位" @@ -201,12 +566,6 @@ msgstr "电子邮件格式不正确" msgid "This email address has been registered, please change it" msgstr "这个邮箱已经注册,请更改" -#: app/web/ajax/LoginAjax.php:182 app/web/ajax/LoginAjax.php:183 -#: app/web/view/login.php:79 app/web/view/page/login.php:97 -#: app/web/view/page/login.php:120 app/web/view/page/login.php:155 -msgid "Captcha" -msgstr "验证码" - #: app/web/ajax/LoginAjax.php:197 app/web/ajax/LoginAjax.php:272 msgid "The captcha is incorrect" msgstr "验证码不正确" @@ -231,11 +590,6 @@ msgstr "重置密码" msgid "Dear " msgstr "尊敬的" -#: app/web/ajax/LoginAjax.php:244 app/web/ajax/LoginAjax.php:294 -#: vendor/xenice/wp-profession/src/source/PostMeta.php:41 -msgid ":" -msgstr ":" - #: app/web/ajax/LoginAjax.php:244 msgid "" "You have just initiated a password reset request, please click the following " @@ -254,10 +608,6 @@ msgstr "此致" msgid "Send mail failed, please try again later" msgstr "发送邮件失败,请稍后重试" -#: app/web/ajax/LoginAjax.php:293 app/web/view/page/user.php:182 -msgid "Password changed successfully" -msgstr "密码更改成功" - #: app/web/ajax/LoginAjax.php:294 msgid "Your password has been changed successfully, user name: " msgstr "您的密码修改成功,用户名:" @@ -295,29 +645,22 @@ msgstr "抱歉,验证码错误" msgid "User articles" msgstr "用户文章" -#: app/web/model/Article.php:47 +#: app/web/model/Article.php:30 msgid "comments" msgstr "评论" -#: app/web/model/Article.php:50 +#: app/web/model/Article.php:33 msgid "comment" msgstr "评论" -#: app/web/model/Article.php:58 +#: app/web/model/Article.php:41 msgid "views" msgstr "阅读" -#: app/web/model/Article.php:61 +#: app/web/model/Article.php:44 msgid "view" msgstr "阅读" -#: app/web/model/Category.php:17 app/web/model/Tag.php:12 -#: app/web/model/part/Article.php:15 app/web/view/archive/index.php:4 -#: app/web/view/search/index.php:4 config/options.php:141 -#: vendor/xenice/wp-profession/src/doc/view/index.php:12 -msgid "Home" -msgstr "首页" - #: app/web/model/part/Comment.php:129 msgid "Sofa" msgstr "沙发" @@ -355,241 +698,154 @@ msgstr " 分钟前" msgid " seconds ago" msgstr " 秒前" -#: app/web/view/cards-text.php:26 app/web/view/cards-thumbnail.php:26 -msgid "No articles." -msgstr "暂无文章 。。" - -#: app/web/view/comments.php:4 -msgid "Comments" -msgstr "评论" - -#: app/web/view/comments.php:13 -msgid "Leave a reply" -msgstr "发表评论" - -#: app/web/view/comments.php:20 -#, php-format -msgid "You need login to reply." -msgstr "你需要登录来评论." - -#: app/web/view/comments.php:26 -#, php-format -msgid "Welcome %2$s back," -msgstr "欢迎%2$s归来," - -#: app/web/view/comments.php:27 -msgid "Log out of this account" -msgstr "退出帐号" +#: app/web/module/About.php:23 +msgid "About" +msgstr "关于" -#: app/web/view/comments.php:28 -msgid "Log out »" -msgstr "退出 »" +#: app/web/module/About.php:24 +msgid "About the theme" +msgstr "关于主题" -#: app/web/view/comments.php:38 +#: app/web/module/About.php:25 #, php-format -msgid "Not logged in. I want to login" -msgstr "你需要登录来评论" - -#: app/web/view/comments.php:45 -msgid "Username (required)" -msgstr "用户名(必填)" - -#: app/web/view/comments.php:46 -msgid "Email (required)" -msgstr "邮箱(必填)" - -#: app/web/view/comments.php:47 app/web/view/page/user.php:157 -#: vendor/xenice/wp-profession/src/markdown/PostMeta.php:31 -#: vendor/xenice/wp-profession/src/markdown/PostMeta.php:39 -msgid "URL" -msgstr "网址" - -#: app/web/view/comments.php:57 -msgid "Validation" -msgstr "验证" - -#: app/web/view/comments.php:58 app/web/view/page/user.php:201 -msgid "Submit" -msgstr "提交" - -#: app/web/view/header.php:35 app/web/view/search/index.php:5 -msgid "Search keyword" -msgstr "搜索关键词" - -#: app/web/view/home/index.php:6 app/web/widget/RecentArticles.php:11 -#: app/web/widget/RecentArticles.php:56 app/web/widget/UniversalArticles.php:39 -msgid "Recent Articles" -msgstr "最新文章" - -#: app/web/view/login.php:10 -msgid "Admin" -msgstr "管理" - -#: app/web/view/login.php:12 -msgid "Logout" -msgstr "退出" - -#: app/web/view/login.php:14 app/web/view/login.php:22 -#: app/web/view/login.php:37 app/web/view/login.php:58 -#: app/web/view/page/login.php:74 app/web/view/page/login.php:107 -#: app/web/view/page/login.php:131 app/web/view/page/login.php:166 -#: static/js/login.js:53 vendor/xenice/wp-login/src/Login.php:36 -msgid "Login" -msgstr "登录" - -#: app/web/view/login.php:25 app/web/view/login.php:61 -#: app/web/view/login.php:85 app/web/view/page/login.php:79 -#: app/web/view/page/login.php:103 app/web/view/page/login.php:132 -#: app/web/view/page/login.php:167 static/js/login.js:175 -msgid "Register" -msgstr "注册" +msgid "" +"Thank you for using " +"%s theme." +msgstr "" +"感谢使用%s主题。" -#: app/web/view/login.php:31 app/web/view/page/login.php:68 -#: app/web/view/page/login.php:117 -msgid "Username or Email" -msgstr "用户名或邮箱" +#: app/web/module/About.php:30 +msgid "Version" +msgstr "版本" -#: app/web/view/login.php:34 app/web/view/login.php:73 -#: app/web/view/page/login.php:71 app/web/view/page/login.php:91 -msgid "Password" -msgstr "密码" +#: app/web/module/About.php:36 +msgid "Official website" +msgstr "官网" -#: app/web/view/login.php:41 -msgid "Forget password?" -msgstr "忘记密码?" +#: app/web/module/Seo.php:16 +msgid "SEO" +msgstr "SEO" -#: app/web/view/login.php:67 app/web/view/page/login.php:85 -#: app/web/view/page/user.php:139 -msgid "Username" -msgstr "用户名" +#: app/web/module/Seo.php:28 +msgid "Title" +msgstr "标题" -#: app/web/view/login.php:70 app/web/view/page/login.php:88 -#: app/web/view/page/user.php:145 -msgid "Email" -msgstr "邮箱" +#: app/web/module/Seo.php:30 +msgid "Describtion" +msgstr "描述" -#: app/web/view/login.php:76 app/web/view/page/login.php:94 -#: app/web/view/page/login.php:152 app/web/view/page/user.php:198 -msgid "Confirm password" -msgstr "确认密码" +#: app/web/module/Seo.php:32 config/options.php:185 +msgid "Keywords" +msgstr "关键字" -#: app/web/view/login.php:81 -msgid "Get captcha" -msgstr "获取验证码" +#: app/web/module/inner/Admin.php:12 app/web/module/inner/Base.php:33 +msgid "Top menu" +msgstr "顶部菜单" -#: app/web/view/notFound/index.php:10 -msgid "Not Found" -msgstr "未找到" +#: app/web/module/inner/Admin.php:31 app/web/module/inner/Admin.php:32 +#: app/web/module/inner/Admin.php:43 +msgid "Phrase" +msgstr "说说" -#: app/web/view/notFound/index.php:11 -msgid "Sorry, the page you visited has migrated or does not exist" -msgstr "对不起,您访问的页面已迁移或不存在" +#: app/web/module/inner/Admin.php:33 +msgid "All Phrases" +msgstr "所有说说" -#: app/web/view/page/login.php:78 -msgid "Forget password ?" -msgstr "忘记密码?" +#: app/web/module/inner/Admin.php:34 +#: vendor/xenice/wp-profession/src/doc/Doc.php:163 +#: vendor/xenice/wp-profession/src/doc_bak/Doc.php:163 +#: vendor/xenice/wp-profession/src/file/File.php:213 +#: vendor/xenice/wp-profession/src/source/Source.php:40 +msgid "Add New" +msgstr "新增" -#: app/web/view/page/login.php:99 static/js/login.js:299 static/js/login.js:305 -msgid "Send captcha" -msgstr "发送验证码" +#: app/web/module/inner/Admin.php:35 +msgid "Add New Phrase" +msgstr "新增说说" -#: app/web/view/page/login.php:111 -msgid "" -"Please enter your username or email address. You will receive a link to " -"create a new password via email." -msgstr "请输入您的用户名或邮箱地址。您将通过邮箱收到创建新密码的链接。" +#: app/web/module/inner/Admin.php:36 +msgid "Edit Phrase" +msgstr "编辑说说" -#: app/web/view/page/login.php:127 static/js/login.js:208 -msgid "Get New Password" -msgstr "获取新密码" +#: app/web/module/inner/Admin.php:37 +msgid "New Phrase" +msgstr "新说说" -#: app/web/view/page/login.php:149 app/web/view/page/user.php:195 -msgid "New password" -msgstr "新密码" +#: app/web/module/inner/Admin.php:38 +msgid "View Phrase" +msgstr "浏览说说" -#: app/web/view/page/login.php:162 app/web/view/page/user.php:187 -#: static/js/login.js:249 -msgid "Change password" -msgstr "修改密码" +#: app/web/module/inner/Admin.php:39 +msgid "Search Phrases" +msgstr "搜索说说" -#: app/web/view/page/login.php:171 -msgid "Error request, please check email for reset password link" -msgstr "错误请求,请检查邮箱中的重置密码链接" +#: app/web/module/inner/Admin.php:40 +msgid "No phrases found" +msgstr "没有说说" -#: app/web/view/page/login.php:174 -msgid "Back to home" -msgstr "返回首页" +#: app/web/module/inner/Admin.php:41 +msgid "No phrases found in trash" +msgstr "垃圾站没有说说" -#: app/web/view/page/user.php:87 app/web/view/page/user.php:132 -msgid "Profile" -msgstr "简介" +#: app/web/module/inner/Base.php:41 +msgid "Global Top" +msgstr "全局上" -#: app/web/view/page/user.php:90 -msgid "Security" -msgstr "安全" +#: app/web/module/inner/Base.php:48 +msgid "Global Bottom" +msgstr "全局下" -#: app/web/view/page/user.php:110 -msgid "The url is invalid" -msgstr "网址无效" +#: app/web/module/inner/Base.php:55 +msgid "Home Page" +msgstr "首页" -#: app/web/view/page/user.php:119 -msgid "Save success" -msgstr "保存成功" +#: app/web/module/inner/Base.php:62 +msgid "Category Page" +msgstr "分类页" -#: app/web/view/page/user.php:122 -msgid "Save failed" -msgstr "保存失败" +#: app/web/module/inner/Base.php:69 +msgid "Tag Page" +msgstr "标签页" -#: app/web/view/page/user.php:151 -#: vendor/xenice/wp-framework/optimize/UserTableOptimize.php:66 -msgid "Nicename" -msgstr "昵称" +#: app/web/module/inner/Base.php:76 +msgid "Search Page" +msgstr "搜索页" -#: app/web/view/page/user.php:162 -msgid "Save changes" -msgstr "保存更改" +#: app/web/module/inner/Base.php:83 +msgid "Single Page" +msgstr "单篇页" -#: app/web/view/page/user.php:170 -msgid "Original password error" -msgstr "原密码错误" +#: app/web/module/inner/Guest.php:167 config/options.php:105 +msgid "Service QQ" +msgstr "咨询QQ" -#: app/web/view/page/user.php:174 static/js/login.js:36 -msgid "Password cannot be empty" -msgstr "密码不能为空" +#: app/web/module/inner/Guest.php:170 +msgid "Back to top" +msgstr "返回顶部" -#: app/web/view/page/user.php:192 -msgid "Original password" -msgstr "原密码" +#: app/web/view/comments.php:20 +#, php-format +msgid "You need login to reply." +msgstr "你需要登录来评论." -#: app/web/view/single/index.php:48 -#: vendor/xenice/wp-profession/src/doc/view/single.php:169 -msgid "Edit" -msgstr "编辑" +#: app/web/view/comments.php:38 +#, php-format +msgid "Not logged in. I want to login" +msgstr "你需要登录来评论" #: app/web/view/single/index.php:53 #: vendor/xenice/wp-profession/src/doc/view/single.php:174 +#: vendor/xenice/wp-profession/src/doc_bak/view/single.php:184 +#: vendor/xenice/wp-profession/src/file/view/per-page.php:61 +#: vendor/xenice/wp-profession/src/file/view/single.php:61 msgid "Tags:" msgstr "标签:" -#: app/web/view/single/index.php:56 -#: vendor/xenice/wp-profession/src/doc/view/single.php:177 -msgid "Previous Page
" -msgstr "上一篇
" - -#: app/web/view/single/index.php:57 -#: vendor/xenice/wp-profession/src/doc/view/single.php:178 -msgid "Next Page
" -msgstr "下一篇
" - -#: app/web/view/single/related.php:2 -msgid "Related Articles" -msgstr "相关文章" - #: app/web/widget/Advertise.php:10 msgid "Xenice Advertise" msgstr "Xenice 广告" -#: app/web/widget/Advertise.php:11 config/options.php:217 +#: app/web/widget/Advertise.php:11 config/options.php:239 msgid "Advertise" msgstr "广告" @@ -606,14 +862,14 @@ msgid "Hot Articles" msgstr "热门文章" #: app/web/widget/HotArticles.php:59 app/web/widget/RecentArticles.php:60 -#: app/web/widget/SickyArticles.php:60 app/web/widget/TagsCloud.php:58 +#: app/web/widget/StickyArticles.php:60 app/web/widget/TagsCloud.php:58 #: app/web/widget/UniversalArticles.php:79 #: vendor/xenice/wp-profession/src/source/DocsWidget.php:47 msgid "Name:" msgstr "名称:" #: app/web/widget/HotArticles.php:67 app/web/widget/RecentArticles.php:68 -#: app/web/widget/SickyArticles.php:68 app/web/widget/UniversalArticles.php:87 +#: app/web/widget/StickyArticles.php:68 app/web/widget/UniversalArticles.php:87 msgid "Article Count:" msgstr "文章数量:" @@ -625,7 +881,7 @@ msgstr "Xenice 友情链接" msgid "Links" msgstr "友情链接" -#: app/web/widget/Links.php:50 +#: app/web/widget/Links.php:51 msgid "Links Count" msgstr "友情链接数量" @@ -645,14 +901,10 @@ msgstr "最新评论" msgid "Comment Count:" msgstr "评论数量:" -#: app/web/widget/SickyArticles.php:10 -msgid "Xenice Sicky Articles" +#: app/web/widget/StickyArticles.php:10 +msgid "Xenice Sticky Articles" msgstr "Xenice 置顶文章" -#: app/web/widget/SickyArticles.php:11 app/web/widget/SickyArticles.php:56 -msgid "Sicky Articles" -msgstr "置顶文章" - #: app/web/widget/TagsCloud.php:10 msgid "Xenice Tags Cloud" msgstr "Xenice 标签云" @@ -704,236 +956,260 @@ msgid "Blue" msgstr "蓝色" #: config/options.php:15 -msgid "Grey" -msgstr "灰色" - -#: config/options.php:16 msgid "Red" msgstr "红色" -#: config/options.php:22 +#: config/options.php:16 +msgid "Green" +msgstr "绿色" + +#: config/options.php:17 +msgid "Pink" +msgstr "粉色" + +#: config/options.php:18 +msgid "Grey" +msgstr "灰色" + +#: config/options.php:24 msgid "Site Icon" msgstr "网站图标" -#: config/options.php:29 +#: config/options.php:31 +msgid "Site Logo" +msgstr "网站logo" + +#: config/options.php:38 +msgid "Default Thumbnail" +msgstr "默认缩略图" + +#: config/options.php:45 +msgid "Default Loading Image" +msgstr "默认加载图片" + +#: config/options.php:52 msgid "Display Style" msgstr "显示风格" -#: config/options.php:33 +#: config/options.php:56 msgid "Pure Text" msgstr "纯文本" -#: config/options.php:34 +#: config/options.php:57 msgid "Show Thumbnail" msgstr "显示缩略图" -#: config/options.php:41 +#: config/options.php:64 msgid "Baidu Statistics" msgstr "百度统计" -#: config/options.php:42 +#: config/options.php:65 msgid "Fill in baidu statistics script" msgstr "填写百度统计脚本" -#: config/options.php:51 +#: config/options.php:74 msgid "Baidu Auto Push" msgstr "百度自动推送" -#: config/options.php:52 +#: config/options.php:75 msgid "Fill in baidu auto push script" msgstr "填写百度自动推送脚本" -#: config/options.php:61 +#: config/options.php:84 msgid "Site Footer" msgstr "网站页脚" -#: config/options.php:62 +#: config/options.php:85 msgid "Customize the site footer" msgstr "自定义网站页脚" -#: config/options.php:70 +#: config/options.php:93 msgid "Bottom right button" msgstr "右下角按钮" -#: config/options.php:76 +#: config/options.php:99 msgid "Enable back-to-top button" msgstr "开启回到顶部按钮" -#: config/options.php:93 +#: config/options.php:111 +msgid "Site ICP" +msgstr "网站备案号" + +#: config/options.php:123 msgid "Enable static file CDN acceleration" msgstr "开启静态文件CDN加速" -#: config/options.php:98 +#: config/options.php:128 msgid "CDN Repository" msgstr "CDN仓库" -#: config/options.php:109 +#: config/options.php:139 msgid "Auxiliary" msgstr "辅助" -#: config/options.php:115 -msgid "Enable code highlight" -msgstr "开启代码高亮显示" +#: config/options.php:145 +msgid "" +"The first picture of the article is used as a thumbnail when no thumbnail is " +"set" +msgstr "当没有设置缩略图时,将文章的第一张图片用作缩略图" -#: config/options.php:121 +#: config/options.php:151 msgid "Enbale category badge on the list page" msgstr "在列表页上启用类别标记" -#: config/options.php:127 +#: config/options.php:157 msgid "Enable article seo" msgstr "开启文章SEO" -#: config/options.php:133 -msgid "Enable the phrase" -msgstr "开启说说" +#: config/options.php:163 +msgid "Enable code highlight" +msgstr "开启代码高亮显示" -#: config/options.php:142 +#: config/options.php:172 msgid "Home Settings" msgstr "首页设置" -#: config/options.php:146 +#: config/options.php:176 msgid "Description" msgstr "描述" -#: config/options.php:162 +#: config/options.php:192 msgid "Slide" msgstr "放灯片" -#: config/options.php:163 +#: config/options.php:193 msgid "" "Please set slide images below if Enable slide, Images recommended size is " "715px*350px." msgstr "如果开启幻灯片,请设置下面的幻灯片图片,图片推荐大小为715px*350px。" -#: config/options.php:169 +#: config/options.php:199 msgid "Enable Slide" msgstr "开启放灯片" -#: config/options.php:175 +#: config/options.php:205 msgid "Display the title and description of the slide" msgstr "显示放灯片图片标题和描述" -#: config/options.php:182 -msgid "Slide Image 1" -msgstr "放灯片图片1" - -#: config/options.php:193 -msgid "Slide Image 2" -msgstr "放灯片图片2" - -#: config/options.php:204 -msgid "Slide Image 3" -msgstr "放灯片图片3" +#: config/options.php:212 +msgid "Slide Images" +msgstr "放灯图片" -#: config/options.php:218 +#: config/options.php:240 msgid "Advertise Settings" msgstr "广告设置" -#: config/options.php:221 +#: config/options.php:243 msgid "Single page top AD" msgstr "单篇页上部广告" -#: config/options.php:226 config/options.php:254 config/options.php:282 -#: config/options.php:310 vendor/xenice/wp-login/src/Login.php:47 -#: vendor/xenice/wp-login/src/Login.php:71 -#: vendor/xenice/wp-login/src/Login.php:95 +#: config/options.php:248 config/options.php:276 config/options.php:304 +#: config/options.php:332 vendor/xenice/wp-login/src/Login.php:48 +#: vendor/xenice/wp-login/src/Login.php:72 +#: vendor/xenice/wp-login/src/Login.php:96 msgid "Enable" msgstr "开启" -#: config/options.php:232 config/options.php:260 config/options.php:288 -#: config/options.php:316 +#: config/options.php:254 config/options.php:282 config/options.php:310 +#: config/options.php:338 msgid "PC AD code" msgstr "电脑端广告代码" -#: config/options.php:240 config/options.php:268 config/options.php:296 -#: config/options.php:324 +#: config/options.php:262 config/options.php:290 config/options.php:318 +#: config/options.php:346 msgid "Mobile AD code" msgstr "手机端广告代码" -#: config/options.php:249 +#: config/options.php:271 msgid "Single page bottom AD" msgstr "单篇页底部广告" -#: config/options.php:277 +#: config/options.php:299 msgid "List page top AD" msgstr "列表页上部广告" -#: config/options.php:305 +#: config/options.php:327 msgid "List page bottom AD" msgstr "列表页底部广告" -#: static/js/login.js:31 static/js/login.js:183 +#: static/js/login.js:31 static/js/login.js:183 static/pro/js/login.js:22 +#: static/pro/js/login.js:174 msgid "Username or email cannot be empty" msgstr "用户名或邮箱不能为空" -#: static/js/login.js:41 +#: static/js/login.js:41 static/pro/js/login.js:32 msgid "Login..." msgstr "登录中..." -#: static/js/login.js:52 +#: static/js/login.js:52 static/pro/js/login.js:43 msgid "Username or password wrong" msgstr "用户名或密码错误" -#: static/js/login.js:129 +#: static/js/login.js:129 static/pro/js/login.js:120 msgid "" "Username can only be 6-16 characters composed of alphanumeric or underlined " "characters" msgstr "用户名只能是6-16个字符,由字母、数字或下划线字符组成" -#: static/js/login.js:134 +#: static/js/login.js:134 static/pro/js/login.js:125 msgid "Email format error" msgstr "邮箱格式错误" -#: static/js/login.js:139 static/js/login.js:221 +#: static/js/login.js:139 static/js/login.js:221 static/pro/js/login.js:130 +#: static/pro/js/login.js:212 msgid "Password length at least 6" msgstr "密码长度至少6位" #: static/js/login.js:145 static/js/login.js:187 static/js/login.js:216 +#: static/pro/js/login.js:136 static/pro/js/login.js:178 +#: static/pro/js/login.js:207 msgid "The captcha cannot be empty" msgstr "验证码不能为空" -#: static/js/login.js:150 +#: static/js/login.js:150 static/pro/js/login.js:141 msgid "Register..." msgstr "注册中..." -#: static/js/login.js:163 +#: static/js/login.js:163 static/pro/js/login.js:154 msgid "Registered successfully" msgstr "注册成功" -#: static/js/login.js:191 static/js/login.js:230 +#: static/js/login.js:191 static/js/login.js:230 static/pro/js/login.js:182 +#: static/pro/js/login.js:221 msgid "execute..." msgstr "执行中..." -#: static/js/login.js:203 +#: static/js/login.js:203 static/pro/js/login.js:194 msgid "" "The link has been successfully sent to your email, please check and confirm." msgstr "链接已经成功发送到您的邮箱,请查收并确认。" -#: static/js/login.js:244 +#: static/js/login.js:244 static/pro/js/login.js:235 msgid "Password changed successfully, please remember the password." msgstr "密码更改成功,请记住密码。" -#: static/js/login.js:261 +#: static/js/login.js:261 static/pro/js/login.js:252 msgid "Your operation too fast, please wait a moment." msgstr "您操作太快了,请稍等。" -#: static/js/login.js:267 +#: static/js/login.js:267 static/pro/js/login.js:258 msgid "Send in..." msgstr "发送中..." -#: static/js/login.js:279 +#: static/js/login.js:279 static/pro/js/login.js:271 msgid "Captcha has been sent to the email, may appear in the dustbin oh ~" msgstr "验证码已发送到邮箱,可能出现在垃圾箱哦~" -#: static/js/login.js:285 static/js/login.js:290 +#: static/js/login.js:285 static/js/login.js:290 static/pro/js/login.js:277 +#: static/pro/js/login.js:282 msgid "Resend captcha" msgstr "重新发送验证码" -#: static/js/login.js:298 +#: static/js/login.js:298 static/pro/js/login.js:290 msgid "Email already exists" msgstr "邮箱已存在" -#: static/js/login.js:304 +#: static/js/login.js:304 static/pro/js/login.js:296 msgid "The captcha failed to send. Please try again later." msgstr "验证码发送失败,请稍后再试。" @@ -942,75 +1218,75 @@ msgid "Mail" msgstr "邮箱" #: vendor/xenice/wp-framework/mail/Mail.php:32 +#: vendor/xenice/wp-framework/mail/Mail.php:36 msgid "Mail Settings" msgstr "邮箱设置" -#: vendor/xenice/wp-framework/mail/Mail.php:36 +#: vendor/xenice/wp-framework/mail/Mail.php:40 msgid "Mail Service" msgstr "邮箱服务器" -#: vendor/xenice/wp-framework/mail/Mail.php:37 +#: vendor/xenice/wp-framework/mail/Mail.php:41 msgid "Enable mail service" msgstr "启用邮箱服务器" -#: vendor/xenice/wp-framework/mail/Mail.php:43 +#: vendor/xenice/wp-framework/mail/Mail.php:47 msgid "From Name" msgstr "发件人名称" -#: vendor/xenice/wp-framework/mail/Mail.php:49 +#: vendor/xenice/wp-framework/mail/Mail.php:53 msgid "SMTP Host" msgstr "SMTP服务器" -#: vendor/xenice/wp-framework/mail/Mail.php:55 +#: vendor/xenice/wp-framework/mail/Mail.php:59 msgid "SMTP Post" msgstr "SMTP端口" -#: vendor/xenice/wp-framework/mail/Mail.php:61 +#: vendor/xenice/wp-framework/mail/Mail.php:65 msgid "Mail Account" msgstr "邮箱账号" -#: vendor/xenice/wp-framework/mail/Mail.php:67 +#: vendor/xenice/wp-framework/mail/Mail.php:71 msgid "Mail Password" msgstr "邮箱密码" -#: vendor/xenice/wp-framework/mail/Mail.php:73 +#: vendor/xenice/wp-framework/mail/Mail.php:77 msgid "SMTP Auth" msgstr "SMTP验证" -#: vendor/xenice/wp-framework/mail/Mail.php:74 +#: vendor/xenice/wp-framework/mail/Mail.php:78 msgid "Enable SMTP Auth service" msgstr "启用SMTP验证服务" -#: vendor/xenice/wp-framework/mail/Mail.php:80 +#: vendor/xenice/wp-framework/mail/Mail.php:84 msgid "SMTP Secure" msgstr "SMTP 安全" -#: vendor/xenice/wp-framework/mail/Mail.php:81 +#: vendor/xenice/wp-framework/mail/Mail.php:85 msgid "Fill in ssl if SMTP Auth service is enabled, leave blank if not" msgstr "如果启用SMTP验证服务,请填写ssl;如果没有启用SMTP验证服务,请留空" -#: vendor/xenice/wp-framework/mail/Send.php:31 -#: vendor/xenice/wp-framework/mail/Send.php:33 -msgid "Send" -msgstr "发送" - -#: vendor/xenice/wp-framework/mail/Send.php:32 +#: vendor/xenice/wp-framework/mail/Mail.php:93 msgid "Send Mail" msgstr "发送邮件" -#: vendor/xenice/wp-framework/mail/Send.php:37 +#: vendor/xenice/wp-framework/mail/Mail.php:94 +msgid "Send" +msgstr "发送" + +#: vendor/xenice/wp-framework/mail/Mail.php:98 msgid "Mail Title" msgstr "邮件标题" -#: vendor/xenice/wp-framework/mail/Send.php:43 +#: vendor/xenice/wp-framework/mail/Mail.php:104 msgid "Mail Content" msgstr "邮件内容" -#: vendor/xenice/wp-framework/mail/Send.php:60 +#: vendor/xenice/wp-framework/mail/Mail.php:145 msgid "Send successfully" msgstr "发送成功" -#: vendor/xenice/wp-framework/mail/Send.php:62 +#: vendor/xenice/wp-framework/mail/Mail.php:147 msgid "Send failure" msgstr "发送失败" @@ -1031,100 +1307,104 @@ msgid "Global optimization" msgstr "全局优化" #: vendor/xenice/wp-framework/optimize/Optimize.php:44 +msgid "Enable classic editor" +msgstr "开启经典编辑器" + +#: vendor/xenice/wp-framework/optimize/Optimize.php:50 msgid "Disable all built-in widgets" msgstr "禁用所有内置小工具" -#: vendor/xenice/wp-framework/optimize/Optimize.php:50 +#: vendor/xenice/wp-framework/optimize/Optimize.php:56 msgid "Disable the pingback" msgstr "禁用pingback" -#: vendor/xenice/wp-framework/optimize/Optimize.php:56 +#: vendor/xenice/wp-framework/optimize/Optimize.php:62 msgid "Disable the emoji" msgstr "禁用emoji" -#: vendor/xenice/wp-framework/optimize/Optimize.php:62 +#: vendor/xenice/wp-framework/optimize/Optimize.php:68 msgid "Disable the restapi" msgstr "禁用restapi" -#: vendor/xenice/wp-framework/optimize/Optimize.php:68 +#: vendor/xenice/wp-framework/optimize/Optimize.php:74 msgid "Disable the embeds" msgstr "禁用embeds" -#: vendor/xenice/wp-framework/optimize/Optimize.php:74 +#: vendor/xenice/wp-framework/optimize/Optimize.php:80 msgid "Disable the opensans" msgstr "禁用opensans" -#: vendor/xenice/wp-framework/optimize/Optimize.php:80 +#: vendor/xenice/wp-framework/optimize/Optimize.php:86 msgid "Remove the category link prefix" msgstr "删除分类链接前缀" -#: vendor/xenice/wp-framework/optimize/Optimize.php:86 +#: vendor/xenice/wp-framework/optimize/Optimize.php:92 msgid "Remove the article link subcategory, leaving only the parent category" msgstr "删除文章链接子分类,只留下父分类" -#: vendor/xenice/wp-framework/optimize/Optimize.php:92 +#: vendor/xenice/wp-framework/optimize/Optimize.php:98 msgid "Enable official Gravatar SSL avatar links" msgstr "启用官方的Gravatar SSL头像链接" -#: vendor/xenice/wp-framework/optimize/Optimize.php:98 +#: vendor/xenice/wp-framework/optimize/Optimize.php:104 msgid "The user list display registration and last login information" msgstr "用户列表显示注册和最后登录信息" -#: vendor/xenice/wp-framework/optimize/Optimize.php:104 +#: vendor/xenice/wp-framework/optimize/Optimize.php:110 msgid "Enable custom avatar" msgstr "开启自定义头像" -#: vendor/xenice/wp-framework/optimize/Optimize.php:109 +#: vendor/xenice/wp-framework/optimize/Optimize.php:115 msgid "Back-end optimization" msgstr "后端优化" -#: vendor/xenice/wp-framework/optimize/Optimize.php:115 +#: vendor/xenice/wp-framework/optimize/Optimize.php:121 msgid "Disable auto save" msgstr "禁用自动保存" -#: vendor/xenice/wp-framework/optimize/Optimize.php:121 +#: vendor/xenice/wp-framework/optimize/Optimize.php:127 msgid "Disable revision" msgstr "禁用修订版本" -#: vendor/xenice/wp-framework/optimize/Optimize.php:127 +#: vendor/xenice/wp-framework/optimize/Optimize.php:133 msgid "Profile can also be saved when user email is empty" msgstr "用户电子邮件为空时,也可以保存个人资料" -#: vendor/xenice/wp-framework/optimize/Optimize.php:133 +#: vendor/xenice/wp-framework/optimize/Optimize.php:139 msgid "" "Only current user articles and comments are displayed, except for " "administrators" msgstr "除了管理员之外,只显示当前用户的文章和评论" -#: vendor/xenice/wp-framework/optimize/Optimize.php:139 +#: vendor/xenice/wp-framework/optimize/Optimize.php:145 msgid "Remove backstage at the top of the W icon in the upper left corner" msgstr "移除后台左上角的W图标" -#: vendor/xenice/wp-framework/optimize/Optimize.php:145 +#: vendor/xenice/wp-framework/optimize/Optimize.php:151 msgid "Disable update reminders" msgstr "禁用更新提醒" -#: vendor/xenice/wp-framework/optimize/Optimize.php:151 +#: vendor/xenice/wp-framework/optimize/Optimize.php:157 msgid "Enable the link" msgstr "启用友情链接" -#: vendor/xenice/wp-framework/optimize/Optimize.php:157 +#: vendor/xenice/wp-framework/optimize/Optimize.php:163 msgid "Convert the html within the code tag to entity before saving article" msgstr "在保存文章之前,将代码标记中的html转换为实体" -#: vendor/xenice/wp-framework/optimize/Optimize.php:163 +#: vendor/xenice/wp-framework/optimize/Optimize.php:169 msgid "Remove image attributes while editing articles" msgstr "编辑文章时移除图片属性" -#: vendor/xenice/wp-framework/optimize/Optimize.php:168 +#: vendor/xenice/wp-framework/optimize/Optimize.php:174 msgid "Front-end optimization" msgstr "前端优化" -#: vendor/xenice/wp-framework/optimize/Optimize.php:174 +#: vendor/xenice/wp-framework/optimize/Optimize.php:180 msgid "Disable the front admin bar" msgstr "禁用前台管理栏" -#: vendor/xenice/wp-framework/optimize/Optimize.php:180 +#: vendor/xenice/wp-framework/optimize/Optimize.php:186 msgid "Disable useless links to the front wp_head" msgstr "禁用前端wp_head的无用链接" @@ -1183,39 +1463,51 @@ msgstr "" msgid "No local avatar is set. Use the upload field to add a local avatar." msgstr "没有设置本地头像。使用上传字段添加本地头像。" -#: vendor/xenice/wp-framework/option/Admin.php:72 -msgid "Save Changes" -msgstr "保存更改" - -#: vendor/xenice/wp-framework/option/Admin.php:108 +#: vendor/xenice/wp-framework/option/Admin.php:112 msgid "save success" msgstr "保存成功" -#: vendor/xenice/wp-framework/option/Admin.php:115 +#: vendor/xenice/wp-framework/option/Admin.php:119 msgid "save failed" msgstr "保存失败" +#: vendor/xenice/wp-framework/option/Admin.php:192 +msgid "Save Changes" +msgstr "保存更改" + #: vendor/xenice/wp-framework/option/Box.php:56 msgid "Markdown" msgstr "" -#: vendor/xenice/wp-framework/option/Elements.php:117 +#: vendor/xenice/wp-framework/option/Elements.php:128 +#: vendor/xenice/wp-framework/option/Elements.php:146 msgid "URL:" msgstr "链接:" -#: vendor/xenice/wp-framework/option/Elements.php:119 +#: vendor/xenice/wp-framework/option/Elements.php:130 +#: vendor/xenice/wp-framework/option/Elements.php:148 msgid "Title:" msgstr "标题:" -#: vendor/xenice/wp-framework/option/Elements.php:121 +#: vendor/xenice/wp-framework/option/Elements.php:132 +#: vendor/xenice/wp-framework/option/Elements.php:150 msgid "Description:" msgstr "描述:" -#: vendor/xenice/wp-framework/option/Elements.php:123 +#: vendor/xenice/wp-framework/option/Elements.php:134 +#: vendor/xenice/wp-framework/option/Elements.php:152 msgid "Image Path:" msgstr "图片路径:" -#: vendor/xenice/wp-framework/option/Option.php:27 +#: vendor/xenice/wp-framework/option/Elements.php:145 +msgid "Image" +msgstr "图片" + +#: vendor/xenice/wp-framework/option/Elements.php:166 +msgid "Add" +msgstr "增加" + +#: vendor/xenice/wp-framework/option/Option.php:42 msgid "Theme" msgstr "主题" @@ -1223,15 +1515,11 @@ msgstr "主题" msgid "Please set up widgets at dashboard!" msgstr "请在后台设置小工具!" -#: vendor/xenice/wp-login/src/Login.php:37 +#: vendor/xenice/wp-login/src/Login.php:38 msgid "Social Login Settings" msgstr "社会登录设置" -#: vendor/xenice/wp-login/src/Login.php:40 -msgid "QQ Login" -msgstr "QQ登录" - -#: vendor/xenice/wp-login/src/Login.php:41 +#: vendor/xenice/wp-login/src/Login.php:42 #, php-format msgid "" "Register a QQ social login account. 复制回调链" "接。" -#: vendor/xenice/wp-login/src/Login.php:53 -#: vendor/xenice/wp-login/src/Login.php:77 +#: vendor/xenice/wp-login/src/Login.php:54 +#: vendor/xenice/wp-login/src/Login.php:78 msgid "APP ID" msgstr "" -#: vendor/xenice/wp-login/src/Login.php:59 -#: vendor/xenice/wp-login/src/Login.php:101 +#: vendor/xenice/wp-login/src/Login.php:60 +#: vendor/xenice/wp-login/src/Login.php:102 msgid "APP Key" msgstr "" -#: vendor/xenice/wp-login/src/Login.php:64 -msgid "WeChat Login" -msgstr "微信登录" - -#: vendor/xenice/wp-login/src/Login.php:65 +#: vendor/xenice/wp-login/src/Login.php:66 #, php-format msgid "" "Register a WeChat social login account. " @@ -1267,16 +1551,16 @@ msgstr "" "\"copyLink(this);return false;\" href=\"%s?action=wechatCallback\">复制回" "调链接。" -#: vendor/xenice/wp-login/src/Login.php:83 -#: vendor/xenice/wp-login/src/Login.php:107 +#: vendor/xenice/wp-login/src/Login.php:84 +#: vendor/xenice/wp-login/src/Login.php:108 msgid "APP Secret" msgstr "" -#: vendor/xenice/wp-login/src/Login.php:88 +#: vendor/xenice/wp-login/src/Login.php:89 msgid "WeiBo Login" msgstr "微博登录" -#: vendor/xenice/wp-login/src/Login.php:89 +#: vendor/xenice/wp-login/src/Login.php:90 #, php-format msgid "" "Register a WeiBo social login account. " @@ -1287,11 +1571,11 @@ msgstr "" "\"copyLink(this);return false;\" href=\"%s?action=weiboCallback\">复制回" "调链接。" -#: vendor/xenice/wp-login/src/Login.php:146 +#: vendor/xenice/wp-login/src/Login.php:147 msgid "Successfully copied to clipboard" msgstr "成功复制到剪切板" -#: vendor/xenice/wp-login/src/Login.php:147 +#: vendor/xenice/wp-login/src/Login.php:148 msgid "The browser does not support link clicks to copy to the clipboard" msgstr "浏览器不支持将链接单击复制到剪贴板" @@ -1321,123 +1605,183 @@ msgstr "绑定失败,它可能被绑定到其他账户,请登录到其他帐 msgid "Binding failed, please login first" msgstr "绑定失败,请先登录" -#: vendor/xenice/wp-profession/src/Profession.php:48 +#: vendor/xenice/wp-profession/src/Profession.php:58 msgid "Profession" msgstr "专业" -#: vendor/xenice/wp-profession/src/Profession.php:49 +#: vendor/xenice/wp-profession/src/Profession.php:59 msgid "Profession Settings" msgstr "专业设置" -#: vendor/xenice/wp-profession/src/Profession.php:52 +#: vendor/xenice/wp-profession/src/Profession.php:62 msgid "General" msgstr "常规" -#: vendor/xenice/wp-profession/src/Profession.php:58 +#: vendor/xenice/wp-profession/src/Profession.php:68 msgid "Enable Doc Manage" msgstr "开启文档管理" -#: vendor/xenice/wp-profession/src/Profession.php:64 +#: vendor/xenice/wp-profession/src/Profession.php:74 +msgid "Enable File Manage" +msgstr "开启文件管理" + +#: vendor/xenice/wp-profession/src/Profession.php:80 msgid "Enable Source Manage" msgstr "开启资源管理" -#: vendor/xenice/wp-profession/src/Profession.php:70 +#: vendor/xenice/wp-profession/src/Profession.php:86 msgid "Enable Markdown" msgstr "开启Markdown" -#: vendor/xenice/wp-profession/src/Profession.php:76 +#: vendor/xenice/wp-profession/src/Profession.php:92 msgid "Enable Sitemap" msgstr "开启网站地图" -#: vendor/xenice/wp-profession/src/Profession.php:82 +#: vendor/xenice/wp-profession/src/Profession.php:98 msgid "Enable Cos" msgstr "开启Cos" -#: vendor/xenice/wp-profession/src/Profession.php:88 +#: vendor/xenice/wp-profession/src/Profession.php:104 +msgid "Enable Music" +msgstr "开启音乐" + +#: vendor/xenice/wp-profession/src/Profession.php:110 msgid "Create a unique slug the first time you save the article" msgstr "第一次保存文章时创建唯一的slug" -#: vendor/xenice/wp-profession/src/Profession.php:94 +#: vendor/xenice/wp-profession/src/Profession.php:116 msgid "Set the article link such as \"article/post_name\"" msgstr "将文章链接设置成\"article/post_name\"形式。" -#: vendor/xenice/wp-profession/src/cos/Cos.php:203 +#: vendor/xenice/wp-profession/src/Profession.php:122 +msgid "Enable media extension" +msgstr "开启多媒体扩展" + +#: vendor/xenice/wp-profession/src/auth/AuthAction.php:23 +msgid "Authorization" +msgstr "授权" + +#: vendor/xenice/wp-profession/src/auth/AuthAction.php:24 +msgid "Theme Authorization" +msgstr "主题授权" + +#: vendor/xenice/wp-profession/src/auth/AuthAction.php:25 +msgid "Authorize" +msgstr "授权" + +#: vendor/xenice/wp-profession/src/auth/AuthAction.php:26 +msgid "" +"Thank you for using the FAIRY theme. Please fill in the authorization code " +"and click the authorization button to complete the verification." +msgstr "感谢您使用FAIRY主题。请填写授权码,点击授权按钮完成验证。" + +#: vendor/xenice/wp-profession/src/auth/AuthAction.php:30 +msgid "Auth Code" +msgstr "授权码" + +#: vendor/xenice/wp-profession/src/auth/AuthAction.php:31 +msgid "" +"Get theme authorization code, please go to official website personal " +"center." +msgstr "" +"获取授权码请前往官网个人中心。" + +#: vendor/xenice/wp-profession/src/auth/AuthAction.php:32 +msgid "" +"Congratulations, the theme has been authorized!\n" +"\n" +msgstr "恭喜你,主题已被授权!\n" + +#: vendor/xenice/wp-profession/src/auth/AuthAction.php:34 +msgid "" +"Sorry, the theme is not authorized!\n" +"\n" +msgstr "对不起,主题没有被授权!\n" + +#: vendor/xenice/wp-profession/src/auth/AuthAction.php:55 +msgid "Authorization success" +msgstr "授权成功" + +#: vendor/xenice/wp-profession/src/auth/AuthAction.php:61 +msgid "Authorization failure" +msgstr "授权失败" + +#: vendor/xenice/wp-profession/src/cos/Cos.php:221 msgid "Cos" msgstr "" -#: vendor/xenice/wp-profession/src/cos/Cos.php:204 +#: vendor/xenice/wp-profession/src/cos/Cos.php:222 msgid "Cos Settings" msgstr "COS设置" -#: vendor/xenice/wp-profession/src/cos/Cos.php:213 +#: vendor/xenice/wp-profession/src/cos/Cos.php:231 msgid "Bucket Name" msgstr "Bucket名称" -#: vendor/xenice/wp-profession/src/cos/Cos.php:219 +#: vendor/xenice/wp-profession/src/cos/Cos.php:237 msgid "Bucket Region" msgstr "Bucket区域" -#: vendor/xenice/wp-profession/src/cos/Cos.php:247 +#: vendor/xenice/wp-profession/src/cos/Cos.php:265 msgid "Secret ID" msgstr "" -#: vendor/xenice/wp-profession/src/cos/Cos.php:253 +#: vendor/xenice/wp-profession/src/cos/Cos.php:271 msgid "Secret Key" msgstr "" -#: vendor/xenice/wp-profession/src/cos/Cos.php:259 +#: vendor/xenice/wp-profession/src/cos/Cos.php:277 msgid "Bucket URL" msgstr "" -#: vendor/xenice/wp-profession/src/cos/Cos.php:266 +#: vendor/xenice/wp-profession/src/cos/Cos.php:284 msgid "Upload Dir" msgstr "止传目录" -#: vendor/xenice/wp-profession/src/cos/Cos.php:267 +#: vendor/xenice/wp-profession/src/cos/Cos.php:285 msgid "Unfilled is the root directory" msgstr "不填为根目录" -#: vendor/xenice/wp-profession/src/cos/Cos.php:273 +#: vendor/xenice/wp-profession/src/cos/Cos.php:291 msgid "Attach file types" msgstr "附加类型" -#: vendor/xenice/wp-profession/src/cos/Cos.php:274 +#: vendor/xenice/wp-profession/src/cos/Cos.php:292 msgid "Multiple file types separated by a comma" msgstr "多种类形用逗号分割" -#: vendor/xenice/wp-profession/src/cos/Cos.php:280 +#: vendor/xenice/wp-profession/src/cos/Cos.php:298 msgid "File Rename" msgstr "文件重命名" -#: vendor/xenice/wp-profession/src/cos/Cos.php:284 +#: vendor/xenice/wp-profession/src/cos/Cos.php:302 msgid "Close" msgstr "关闭" -#: vendor/xenice/wp-profession/src/cos/Cos.php:285 +#: vendor/xenice/wp-profession/src/cos/Cos.php:303 msgid "Md5 Way" msgstr "MD5方式" -#: vendor/xenice/wp-profession/src/cos/Cos.php:286 +#: vendor/xenice/wp-profession/src/cos/Cos.php:304 msgid "Time and random way" msgstr "时间和随机数方式" -#: vendor/xenice/wp-profession/src/cos/Cos.php:292 +#: vendor/xenice/wp-profession/src/cos/Cos.php:310 msgid "Options" msgstr "选项" -#: vendor/xenice/wp-profession/src/cos/Cos.php:297 +#: vendor/xenice/wp-profession/src/cos/Cos.php:315 msgid "Delete local files" msgstr "删除本地文件" -#: vendor/xenice/wp-profession/src/cos/Cos.php:303 +#: vendor/xenice/wp-profession/src/cos/Cos.php:321 msgid "Upload thumbnails" msgstr "上传缩略图" -#: vendor/xenice/wp-profession/src/cos/Cos.php:309 -msgid "Upload the outer images when saving the article" -msgstr "保存文章时上传外链图片" - #: vendor/xenice/wp-profession/src/doc/Doc.php:151 +#: vendor/xenice/wp-profession/src/doc_bak/Doc.php:151 msgid "Doc Page" msgstr "文档页" @@ -1445,97 +1789,210 @@ msgstr "文档页" #: vendor/xenice/wp-profession/src/doc/Doc.php:172 #: vendor/xenice/wp-profession/src/doc/DocController.php:16 #: vendor/xenice/wp-profession/src/doc/view/index.php:13 +#: vendor/xenice/wp-profession/src/doc_bak/Doc.php:160 +#: vendor/xenice/wp-profession/src/doc_bak/Doc.php:172 +#: vendor/xenice/wp-profession/src/doc_bak/DocController.php:16 +#: vendor/xenice/wp-profession/src/doc_bak/view/index.php:13 +#: vendor/xenice/wp-profession/src/file/FileController.php:16 +#: vendor/xenice/wp-profession/src/file/view/index.php:13 #: vendor/xenice/wp-profession/src/source/DocsWidget.php:12 msgid "Docs" msgstr "文档" #: vendor/xenice/wp-profession/src/doc/Doc.php:161 +#: vendor/xenice/wp-profession/src/doc_bak/Doc.php:161 #: vendor/xenice/wp-profession/src/source/PostMeta.php:27 msgid "Doc" msgstr "文档" #: vendor/xenice/wp-profession/src/doc/Doc.php:162 +#: vendor/xenice/wp-profession/src/doc_bak/Doc.php:162 msgid "All Docs" msgstr "所有文档" #: vendor/xenice/wp-profession/src/doc/Doc.php:164 +#: vendor/xenice/wp-profession/src/doc_bak/Doc.php:164 msgid "Add New Doc" msgstr "新增文档" #: vendor/xenice/wp-profession/src/doc/Doc.php:165 +#: vendor/xenice/wp-profession/src/doc_bak/Doc.php:165 msgid "Edit Doc" msgstr "编辑文档" #: vendor/xenice/wp-profession/src/doc/Doc.php:166 +#: vendor/xenice/wp-profession/src/doc_bak/Doc.php:166 msgid "New Doc" msgstr "新建文档" #: vendor/xenice/wp-profession/src/doc/Doc.php:167 +#: vendor/xenice/wp-profession/src/doc_bak/Doc.php:167 msgid "View Doc" msgstr "查看文档" #: vendor/xenice/wp-profession/src/doc/Doc.php:168 #: vendor/xenice/wp-profession/src/doc/view/sidebar.php:5 #: vendor/xenice/wp-profession/src/doc/view/tax.php:67 +#: vendor/xenice/wp-profession/src/doc_bak/Doc.php:168 +#: vendor/xenice/wp-profession/src/doc_bak/view/sidebar.php:5 +#: vendor/xenice/wp-profession/src/doc_bak/view/tax.php:67 +#: vendor/xenice/wp-profession/src/file/view/tax.php:67 msgid "Search Docs" msgstr "搜索文档" #: vendor/xenice/wp-profession/src/doc/Doc.php:169 +#: vendor/xenice/wp-profession/src/doc_bak/Doc.php:169 msgid "No docs found" msgstr "没有文档" #: vendor/xenice/wp-profession/src/doc/Doc.php:170 +#: vendor/xenice/wp-profession/src/doc_bak/Doc.php:170 msgid "No docs found in trash" msgstr "垃圾站没有文档" #: vendor/xenice/wp-profession/src/doc/Doc.php:186 #: vendor/xenice/wp-profession/src/doc/Doc.php:197 +#: vendor/xenice/wp-profession/src/doc_bak/Doc.php:186 +#: vendor/xenice/wp-profession/src/doc_bak/Doc.php:197 +#: vendor/xenice/wp-profession/src/file/File.php:236 +#: vendor/xenice/wp-profession/src/file/File.php:247 #: vendor/xenice/wp-profession/src/source/Source.php:63 #: vendor/xenice/wp-profession/src/source/Source.php:73 msgid "Categories" msgstr "分类" #: vendor/xenice/wp-profession/src/doc/Doc.php:187 +#: vendor/xenice/wp-profession/src/doc_bak/Doc.php:187 msgid "Doc Category" msgstr "文档分类" #: vendor/xenice/wp-profession/src/doc/Doc.php:188 +#: vendor/xenice/wp-profession/src/doc_bak/Doc.php:188 msgid "Search Doc Categories" msgstr "搜索文档分类" #: vendor/xenice/wp-profession/src/doc/Doc.php:189 +#: vendor/xenice/wp-profession/src/doc_bak/Doc.php:189 msgid "All Doc Categories" msgstr "所有文档分类" #: vendor/xenice/wp-profession/src/doc/Doc.php:190 +#: vendor/xenice/wp-profession/src/doc_bak/Doc.php:190 msgid "Parent Doc Category" msgstr "父文档分类" #: vendor/xenice/wp-profession/src/doc/Doc.php:191 +#: vendor/xenice/wp-profession/src/doc_bak/Doc.php:191 msgid "Parent Doc Category:" msgstr "父文档分类:" #: vendor/xenice/wp-profession/src/doc/Doc.php:192 +#: vendor/xenice/wp-profession/src/doc_bak/Doc.php:192 msgid "Edit Doc Category" msgstr "编辑文档分类" #: vendor/xenice/wp-profession/src/doc/Doc.php:193 +#: vendor/xenice/wp-profession/src/doc_bak/Doc.php:193 msgid "Update Doc Category" msgstr "更新文档分类" #: vendor/xenice/wp-profession/src/doc/Doc.php:194 #: vendor/xenice/wp-profession/src/doc/Doc.php:195 +#: vendor/xenice/wp-profession/src/doc_bak/Doc.php:194 +#: vendor/xenice/wp-profession/src/doc_bak/Doc.php:195 msgid "New Doc Category" msgstr "新增文档分类" #: vendor/xenice/wp-profession/src/doc/PostMeta.php:31 +#: vendor/xenice/wp-profession/src/doc_bak/PostMeta.php:31 +#: vendor/xenice/wp-profession/src/file/PostMeta.php:31 msgid "Directory" msgstr "目录" #: vendor/xenice/wp-profession/src/doc/view/cards-text.php:30 +#: vendor/xenice/wp-profession/src/doc_bak/view/cards-text.php:30 +#: vendor/xenice/wp-profession/src/file/view/cards-text.php:30 msgid "No search results." msgstr "没有搜索结果。" +#: vendor/xenice/wp-profession/src/file/File.php:201 +msgid "File Page" +msgstr "文件页" + +#: vendor/xenice/wp-profession/src/file/File.php:210 +#: vendor/xenice/wp-profession/src/file/File.php:222 +msgid "Files" +msgstr "文件" + +#: vendor/xenice/wp-profession/src/file/File.php:211 +msgid "File" +msgstr "文件" + +#: vendor/xenice/wp-profession/src/file/File.php:212 +msgid "All Files" +msgstr "所有文件" + +#: vendor/xenice/wp-profession/src/file/File.php:214 +msgid "Add New File" +msgstr "新增文件" + +#: vendor/xenice/wp-profession/src/file/File.php:215 +msgid "Edit File" +msgstr "编辑文件" + +#: vendor/xenice/wp-profession/src/file/File.php:216 +msgid "New File" +msgstr "新建文件" + +#: vendor/xenice/wp-profession/src/file/File.php:217 +msgid "View File" +msgstr "浏览文件" + +#: vendor/xenice/wp-profession/src/file/File.php:218 +msgid "Search Files" +msgstr "搜索文件" + +#: vendor/xenice/wp-profession/src/file/File.php:219 +msgid "No files found" +msgstr "没有文件" + +#: vendor/xenice/wp-profession/src/file/File.php:220 +msgid "No files found in trash" +msgstr "垃圾站没有文件" + +#: vendor/xenice/wp-profession/src/file/File.php:237 +msgid "File Category" +msgstr "文件分类" + +#: vendor/xenice/wp-profession/src/file/File.php:238 +msgid "Search File Categories" +msgstr "搜索文件分类" + +#: vendor/xenice/wp-profession/src/file/File.php:239 +msgid "All File Categories" +msgstr "所有文件分类" + +#: vendor/xenice/wp-profession/src/file/File.php:240 +msgid "Parent File Category" +msgstr "父文件分类" + +#: vendor/xenice/wp-profession/src/file/File.php:241 +msgid "Parent File Category:" +msgstr "父文件分类:" + +#: vendor/xenice/wp-profession/src/file/File.php:242 +msgid "Edit File Category" +msgstr "编辑文件分类" + +#: vendor/xenice/wp-profession/src/file/File.php:243 +msgid "Update File Category" +msgstr "更新文件分类" + +#: vendor/xenice/wp-profession/src/file/File.php:244 +#: vendor/xenice/wp-profession/src/file/File.php:245 +msgid "New File Category" +msgstr "新增文件分类" + #: vendor/xenice/wp-profession/src/markdown/PostMeta.php:27 msgid "Mode" msgstr "模式" @@ -1553,6 +2010,47 @@ msgstr "过虑" msgid "Update" msgstr "更新" +#: vendor/xenice/wp-profession/src/media/Media.php:37 +#: vendor/xenice/wp-profession/src/media/Media.php:38 +msgid "Media Extension" +msgstr "媒体扩展" + +#: vendor/xenice/wp-profession/src/media/Media.php:42 +msgid "Category" +msgstr "分类" + +#: vendor/xenice/wp-profession/src/media/Media.php:45 +msgid "Enable media category" +msgstr "编辑媒体分类" + +#: vendor/xenice/wp-profession/src/media/Media.php:49 +msgid "Unique" +msgstr "唯一" + +#: vendor/xenice/wp-profession/src/media/Media.php:52 +msgid "Do not upload duplicate files" +msgstr "禁止上传重复文件" + +#: vendor/xenice/wp-profession/src/media/Media.php:56 +msgid "Attachment Page" +msgstr "附件页" + +#: vendor/xenice/wp-profession/src/media/Media.php:59 +msgid "Disable attachment page" +msgstr "禁用附件页" + +#: vendor/xenice/wp-profession/src/music/Music.php:88 +msgid "Music" +msgstr "音乐" + +#: vendor/xenice/wp-profession/src/music/Music.php:89 +msgid "Music Settings" +msgstr "音乐设置" + +#: vendor/xenice/wp-profession/src/music/Music.php:93 +msgid "Music API URL" +msgstr "音乐API链接" + #: vendor/xenice/wp-profession/src/source/DocsWidget.php:11 msgid "Xenice Docs" msgstr "Xenice 文档" @@ -1647,42 +2145,28 @@ msgstr "更新资源分类" msgid "New Source Category" msgstr "新增资源分类" -#~ msgid "" -#~ "Thank you for creating with WordPress" -#~ "a>, Use Fairy " -#~ "theme." -#~ msgstr "" -#~ "感谢使用WordPress进行创作,使用" -#~ "Fairy主题。" +#~ msgid "Type" +#~ msgstr "类型" -#~ msgid "Weibo Login" -#~ msgstr "微薄登录" +#~ msgid "format" +#~ msgstr "格式" -#~ msgid "Log in other ways: " -#~ msgstr "其它登录方式:" +#~ msgid "Slide Image 2" +#~ msgstr "放灯片图片2" -#~ msgid "private" -#~ msgstr "私有" +#~ msgid "Slide Image 3" +#~ msgstr "放灯片图片3" -#~ msgid "" -#~ "You need login to reply." -#~ msgstr "" -#~ "请登录后评论。" +#~ msgid "Upload the outer images when saving the article" +#~ msgstr "保存文章时上传外链图片" #~ msgid "" -#~ "Not logged in. I want to login" +#~ "Thank you for creating with WordPress" +#~ "a>, Use Fairy " +#~ "theme." #~ msgstr "" -#~ "您还没有登录,请先登录" - -#~ msgid "Personal Center" -#~ msgstr "个人中心" - -#~ msgid "Tags" -#~ msgstr "标签" +#~ "感谢使用WordPress进行创作,使用" +#~ "Fairy主题。" #~ msgid "Article Sort:" #~ msgstr "文章排序:" @@ -1696,9 +2180,6 @@ msgstr "新增资源分类" #~ msgid "Auto gets category name as the widget name suffix." #~ msgstr "自动获取类别名称作为小部件名称后缀。" -#~ msgid "Green" -#~ msgstr "绿色" - #~ msgid "Search Type" #~ msgstr "搜索类型" @@ -1714,18 +2195,9 @@ msgstr "新增资源分类" #~ msgid "The search box uses a custom template" #~ msgstr "搜索框采用自定义模板" -#~ msgid "Site ICP" -#~ msgstr "网站备案号" - -#~ msgid "Only search title" -#~ msgstr "只搜索标题" - #~ msgid "Enable site source compression" #~ msgstr "启用网站代码压缩" -#~ msgid "Enable css animation" -#~ msgstr "开启CSS动画" - #~ msgid "List title" #~ msgstr "列表标题" @@ -1735,22 +2207,10 @@ msgstr "新增资源分类" #~ msgid "List Page Settings" #~ msgstr "列表页设置" +#, fuzzy +#~| msgid "Display Style" #~ msgid "Display field" -#~ msgstr "显示字段" - -#~ msgid "display author name" -#~ msgstr "显示作者名称" - -#~ msgid "display article description" -#~ msgstr "显示文章描述" - -#~ msgid "display article views" -#~ msgstr "显示文章阅读量" - -#~ msgid "" -#~ "The first picture of the article is used as a thumbnail when no thumbnail " -#~ "is set" -#~ msgstr "当没有设置缩略图时,将文章的第一张图片用作缩略图" +#~ msgstr "显示风格" #~ msgid "Single" #~ msgstr "单篇" @@ -1758,77 +2218,15 @@ msgstr "新增资源分类" #~ msgid "Single Page Settings" #~ msgstr "单篇页设置" -#~ msgid "Default Format" -#~ msgstr "默认格式" - #~ msgid "Article" #~ msgstr "文章" -#~ msgid "Image" -#~ msgstr "图片" - -#~ msgid "Article Category" -#~ msgstr "文章分类" - #~ msgid "[none]" #~ msgstr "[无]" #~ msgid "Image Category" #~ msgstr "图片分类" -#~ msgid "display article comments" -#~ msgstr "显示文章评论数" - -#~ msgid "Tags Alias" -#~ msgstr "标签别名" - -#~ msgid "Related Articles Alias" -#~ msgstr "相关文章别名" - -#~ msgid "Enable Music" -#~ msgstr "开启音乐" - -#~ msgid "Authorization" -#~ msgstr "授权" - -#~ msgid "Theme Authorization" -#~ msgstr "主题授权" - -#~ msgid "Authorize" -#~ msgstr "授权" - -#~ msgid "" -#~ "Thank you for using the FAIRY theme. Please fill in the authorization " -#~ "code and click the authorization button to complete the verification." -#~ msgstr "感谢您使用FAIRY主题。请填写授权码,点击授权按钮完成验证。" - -#~ msgid "Auth Code" -#~ msgstr "授权码" - -#~ msgid "" -#~ "Get theme authorization code, please go to official website personal " -#~ "center." -#~ msgstr "" -#~ "获取授权码请前往官网个人中心。" - -#~ msgid "" -#~ "Congratulations, the theme has been authorized!\n" -#~ "\n" -#~ msgstr "恭喜你,主题已被授权!\n" - -#~ msgid "" -#~ "Sorry, the theme is not authorized!\n" -#~ "\n" -#~ msgstr "对不起,主题没有被授权!\n" - -#~ msgid "Authorization success" -#~ msgstr "授权成功" - -#~ msgid "Authorization failure" -#~ msgstr "授权失败" - #~ msgid "Custom" #~ msgstr "自定义" @@ -1928,15 +2326,6 @@ msgstr "新增资源分类" #~ msgid "Current Version" #~ msgstr "版本" -#~ msgid "Free" -#~ msgstr "免费" - -#~ msgid "Download" -#~ msgstr "下载" - -#~ msgid "Order details" -#~ msgstr "订单详情" - #~ msgid "Purchased" #~ msgstr "已购买" @@ -1973,36 +2362,21 @@ msgstr "新增资源分类" #~ msgid "Has Buy" #~ msgstr "已购买" -#~ msgid "Buy" -#~ msgstr "购买" - #~ msgid "Login to buy" #~ msgstr "登录购买" -#~ msgid "Demo" -#~ msgstr "演示" - #~ msgid "Download Count" #~ msgstr "下载数量" #~ msgid "Size" #~ msgstr "大小" -#~ msgid "Format" -#~ msgstr "格式" - -#~ msgid "Price" -#~ msgstr "价格" - #~ msgid "Name" #~ msgstr "名称" #~ msgid "Xenice Related Articles, Use only on single pages" #~ msgstr "Xenice相关文章,只在单篇页中使用" -#~ msgid "Pink" -#~ msgstr "粉色" - #~ msgid "Focus Type" #~ msgstr "焦点类型" @@ -2075,9 +2449,6 @@ msgstr "新增资源分类" #~ msgid "Orders" #~ msgstr "订单" -#~ msgid "All Orders" -#~ msgstr "全部订单" - #~ msgid "Domain Bind" #~ msgstr "域名绑定" diff --git a/static/css/style.css b/static/css/style.css index f801529..37e7481 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -52,6 +52,10 @@ input[type="text"],input[type="password"],textarea,select{ /* header */ +header .container .logo{ + max-height:28px; +} + .navbar{ border-bottom: 1px solid #eeeeee; padding: 0.8rem 1rem; @@ -545,6 +549,10 @@ footer{ font-size:13px; } +footer .d-flex{ + flex-wrap: wrap; +} + footer .d-flex span,footer .d-flex>a{ margin:5px; } @@ -584,6 +592,10 @@ footer .d-flex span,footer .d-flex>a{ font-size:14px; } + header .container .logo{ + max-height:26px; + } + .navbar .sub-menu { position: absolute; background-color: #fff; diff --git a/static/images/loading.png b/static/images/loading.png new file mode 100644 index 0000000..6b87998 Binary files /dev/null and b/static/images/loading.png differ diff --git a/static/images/logo.png b/static/images/logo.png index c1b9a40..2a77759 100644 Binary files a/static/images/logo.png and b/static/images/logo.png differ diff --git a/style.css b/style.css index 1ff196f..3096cd9 100644 --- a/style.css +++ b/style.css @@ -1,7 +1,7 @@ /* Theme Name: onenice Theme URI: http://www.xenice.com -Version: 2.0.7 +Version: 2.1.8 Author: Xenice Author URI: http://www.xenice.com Description: A simple wordpress theme diff --git a/vendor/autoload.php b/vendor/autoload.php index 74ed73f..920c2cb 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit5fa26e59f63b759541052fd44cd6eb79::getLoader(); +return ComposerAutoloaderInitbf4323f6f7f4e9a01ac7aba46eb8531a::getLoader(); diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php index fce8549..4d989a2 100644 --- a/vendor/composer/ClassLoader.php +++ b/vendor/composer/ClassLoader.php @@ -37,11 +37,13 @@ * * @author Fabien Potencier* @author Jordi Boggiano - * @see http://www.php-fig.org/psr/psr-0/ - * @see http://www.php-fig.org/psr/psr-4/ + * @see https://www.php-fig.org/psr/psr-0/ + * @see https://www.php-fig.org/psr/psr-4/ */ class ClassLoader { + private $vendorDir; + // PSR-4 private $prefixLengthsPsr4 = array(); private $prefixDirsPsr4 = array(); @@ -57,10 +59,17 @@ class ClassLoader private $missingClasses = array(); private $apcuPrefix; + private static $registeredLoaders = array(); + + public function __construct($vendorDir = null) + { + $this->vendorDir = $vendorDir; + } + public function getPrefixes() { if (!empty($this->prefixesPsr0)) { - return call_user_func_array('array_merge', $this->prefixesPsr0); + return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); } return array(); @@ -300,6 +309,15 @@ public function getApcuPrefix() public function register($prepend = false) { spl_autoload_register(array($this, 'loadClass'), true, $prepend); + + if (null === $this->vendorDir) { + //no-op + } elseif ($prepend) { + self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders; + } else { + unset(self::$registeredLoaders[$this->vendorDir]); + self::$registeredLoaders[$this->vendorDir] = $this; + } } /** @@ -308,6 +326,10 @@ public function register($prepend = false) public function unregister() { spl_autoload_unregister(array($this, 'loadClass')); + + if (null !== $this->vendorDir) { + unset(self::$registeredLoaders[$this->vendorDir]); + } } /** @@ -367,6 +389,16 @@ public function findFile($class) return $file; } + /** + * Returns the currently registered loaders indexed by their corresponding vendor directories. + * + * @return self[] + */ + public static function getRegisteredLoaders() + { + return self::$registeredLoaders; + } + private function findFileWithExtension($class, $ext) { // PSR-4 lookup diff --git a/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php new file mode 100644 index 0000000..631882d --- /dev/null +++ b/vendor/composer/InstalledVersions.php @@ -0,0 +1,284 @@ + + array ( + 'pretty_version' => '1.0.0+no-version-set', + 'version' => '1.0.0.0', + 'aliases' => + array ( + ), + 'reference' => NULL, + 'name' => 'xenice/wp-xenice', + ), + 'versions' => + array ( + 'xenice/wp-xenice' => + array ( + 'pretty_version' => '1.0.0+no-version-set', + 'version' => '1.0.0.0', + 'aliases' => + array ( + ), + 'reference' => NULL, + ), + ), +); +private static $canGetVendors; +private static $installedByVendor = array(); + + + + + + + +public static function getInstalledPackages() +{ +$packages = array(); +foreach (self::getInstalled() as $installed) { +$packages[] = array_keys($installed['versions']); +} + + +if (1 === \count($packages)) { +return $packages[0]; +} + +return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); +} + + + + + + + + + +public static function isInstalled($packageName) +{ +foreach (self::getInstalled() as $installed) { +if (isset($installed['versions'][$packageName])) { +return true; +} +} + +return false; +} + + + + + + + + + + + + + + +public static function satisfies(VersionParser $parser, $packageName, $constraint) +{ +$constraint = $parser->parseConstraints($constraint); +$provided = $parser->parseConstraints(self::getVersionRanges($packageName)); + +return $provided->matches($constraint); +} + + + + + + + + + + +public static function getVersionRanges($packageName) +{ +foreach (self::getInstalled() as $installed) { +if (!isset($installed['versions'][$packageName])) { +continue; +} + +$ranges = array(); +if (isset($installed['versions'][$packageName]['pretty_version'])) { +$ranges[] = $installed['versions'][$packageName]['pretty_version']; +} +if (array_key_exists('aliases', $installed['versions'][$packageName])) { +$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); +} +if (array_key_exists('replaced', $installed['versions'][$packageName])) { +$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); +} +if (array_key_exists('provided', $installed['versions'][$packageName])) { +$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); +} + +return implode(' || ', $ranges); +} + +throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); +} + + + + + +public static function getVersion($packageName) +{ +foreach (self::getInstalled() as $installed) { +if (!isset($installed['versions'][$packageName])) { +continue; +} + +if (!isset($installed['versions'][$packageName]['version'])) { +return null; +} + +return $installed['versions'][$packageName]['version']; +} + +throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); +} + + + + + +public static function getPrettyVersion($packageName) +{ +foreach (self::getInstalled() as $installed) { +if (!isset($installed['versions'][$packageName])) { +continue; +} + +if (!isset($installed['versions'][$packageName]['pretty_version'])) { +return null; +} + +return $installed['versions'][$packageName]['pretty_version']; +} + +throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); +} + + + + + +public static function getReference($packageName) +{ +foreach (self::getInstalled() as $installed) { +if (!isset($installed['versions'][$packageName])) { +continue; +} + +if (!isset($installed['versions'][$packageName]['reference'])) { +return null; +} + +return $installed['versions'][$packageName]['reference']; +} + +throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); +} + + + + + +public static function getRootPackage() +{ +$installed = self::getInstalled(); + +return $installed[0]['root']; +} + + + + + + + +public static function getRawData() +{ +return self::$installed; +} + + + + + + + + + + + + + + + + + + + +public static function reload($data) +{ +self::$installed = $data; +self::$installedByVendor = array(); +} + + + + +private static function getInstalled() +{ +if (null === self::$canGetVendors) { +self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); +} + +$installed = array(); + +if (self::$canGetVendors) { + +foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { +if (isset(self::$installedByVendor[$vendorDir])) { +$installed[] = self::$installedByVendor[$vendorDir]; +} elseif (is_file($vendorDir.'/composer/installed.php')) { +$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; +} +} +} + +$installed[] = self::$installed; + +return $installed; +} +} diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 7a91153..b26f1b1 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -6,4 +6,5 @@ $baseDir = dirname($vendorDir); return array( + 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', ); diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php index 20ebabd..a8c878f 100644 --- a/vendor/composer/autoload_files.php +++ b/vendor/composer/autoload_files.php @@ -6,5 +6,5 @@ $baseDir = dirname($vendorDir); return array( - '4fb921a42d925f1af95487ee0c721d1c' => $vendorDir . '/xenice/wp-framework/option/functions.php', + '5e48a5f37ef5c3bdce10af665cfc20b0' => $vendorDir . '/xenice/src/functions.php', ); diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index 84c5f14..e4338de 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -6,14 +6,6 @@ $baseDir = dirname($vendorDir); return array( - 'xenice\\view\\' => array($vendorDir . '/xenice/wp-framework/view'), - 'xenice\\theme\\' => array($vendorDir . '/xenice/wp-framework/theme'), - 'xenice\\option\\' => array($vendorDir . '/xenice/wp-framework/option'), - 'xenice\\optimize\\' => array($vendorDir . '/xenice/wp-framework/optimize'), - 'xenice\\model\\' => array($vendorDir . '/xenice/wp-framework/model'), - 'xenice\\mail\\' => array($vendorDir . '/xenice/wp-framework/mail'), - 'xenice\\cache\\' => array($vendorDir . '/xenice/wp-framework/cache'), - 'xenice\\login\\' => array($vendorDir . '/xenice/wp-login/src'), - 'xenice\\profession\\' => array($vendorDir . '/xenice/wp-profession/src'), + 'xenice\\' => array($vendorDir . '/xenice/src'), 'app\\' => array($baseDir . '/app'), ); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 15bcd12..b234b0b 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit5fa26e59f63b759541052fd44cd6eb79 +class ComposerAutoloaderInitbf4323f6f7f4e9a01ac7aba46eb8531a { private static $loader; @@ -13,21 +13,26 @@ public static function loadClassLoader($class) } } + /** + * @return \Composer\Autoload\ClassLoader + */ public static function getLoader() { if (null !== self::$loader) { return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit5fa26e59f63b759541052fd44cd6eb79', 'loadClassLoader'), true, true); - self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInit5fa26e59f63b759541052fd44cd6eb79', 'loadClassLoader')); + require __DIR__ . '/platform_check.php'; + + spl_autoload_register(array('ComposerAutoloaderInitbf4323f6f7f4e9a01ac7aba46eb8531a', 'loadClassLoader'), true, true); + self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); + spl_autoload_unregister(array('ComposerAutoloaderInitbf4323f6f7f4e9a01ac7aba46eb8531a', 'loadClassLoader')); $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); if ($useStaticLoader) { - require_once __DIR__ . '/autoload_static.php'; + require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit5fa26e59f63b759541052fd44cd6eb79::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInitbf4323f6f7f4e9a01ac7aba46eb8531a::getInitializer($loader)); } else { $map = require __DIR__ . '/autoload_namespaces.php'; foreach ($map as $namespace => $path) { @@ -48,19 +53,19 @@ public static function getLoader() $loader->register(true); if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInit5fa26e59f63b759541052fd44cd6eb79::$files; + $includeFiles = Composer\Autoload\ComposerStaticInitbf4323f6f7f4e9a01ac7aba46eb8531a::$files; } else { $includeFiles = require __DIR__ . '/autoload_files.php'; } foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire5fa26e59f63b759541052fd44cd6eb79($fileIdentifier, $file); + composerRequirebf4323f6f7f4e9a01ac7aba46eb8531a($fileIdentifier, $file); } return $loader; } } -function composerRequire5fa26e59f63b759541052fd44cd6eb79($fileIdentifier, $file) +function composerRequirebf4323f6f7f4e9a01ac7aba46eb8531a($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { require $file; diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index f2ee581..5eff76b 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,24 +4,16 @@ namespace Composer\Autoload; -class ComposerStaticInit5fa26e59f63b759541052fd44cd6eb79 +class ComposerStaticInitbf4323f6f7f4e9a01ac7aba46eb8531a { public static $files = array ( - '4fb921a42d925f1af95487ee0c721d1c' => __DIR__ . '/..' . '/xenice/wp-framework/option/functions.php', + '5e48a5f37ef5c3bdce10af665cfc20b0' => __DIR__ . '/..' . '/xenice/src/functions.php', ); public static $prefixLengthsPsr4 = array ( 'x' => array ( - 'xenice\\view\\' => 12, - 'xenice\\theme\\' => 13, - 'xenice\\option\\' => 14, - 'xenice\\optimize\\' => 16, - 'xenice\\model\\' => 13, - 'xenice\\mail\\' => 12, - 'xenice\\cache\\' => 13, - 'xenice\\login\\' => 13, - 'xenice\\profession\\' => 18, + 'xenice\\' => 7, ), 'a' => array ( @@ -30,41 +22,9 @@ class ComposerStaticInit5fa26e59f63b759541052fd44cd6eb79 ); public static $prefixDirsPsr4 = array ( - 'xenice\\view\\' => + 'xenice\\' => array ( - 0 => __DIR__ . '/..' . '/xenice/wp-framework/view', - ), - 'xenice\\theme\\' => - array ( - 0 => __DIR__ . '/..' . '/xenice/wp-framework/theme', - ), - 'xenice\\option\\' => - array ( - 0 => __DIR__ . '/..' . '/xenice/wp-framework/option', - ), - 'xenice\\optimize\\' => - array ( - 0 => __DIR__ . '/..' . '/xenice/wp-framework/optimize', - ), - 'xenice\\model\\' => - array ( - 0 => __DIR__ . '/..' . '/xenice/wp-framework/model', - ), - 'xenice\\mail\\' => - array ( - 0 => __DIR__ . '/..' . '/xenice/wp-framework/mail', - ), - 'xenice\\cache\\' => - array ( - 0 => __DIR__ . '/..' . '/xenice/wp-framework/cache', - ), - 'xenice\\login\\' => - array ( - 0 => __DIR__ . '/..' . '/xenice/wp-login/src', - ), - 'xenice\\profession\\' => - array ( - 0 => __DIR__ . '/..' . '/xenice/wp-profession/src', + 0 => __DIR__ . '/..' . '/xenice/src', ), 'app\\' => array ( @@ -72,11 +32,16 @@ class ComposerStaticInit5fa26e59f63b759541052fd44cd6eb79 ), ); + public static $classMap = array ( + 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', + ); + public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit5fa26e59f63b759541052fd44cd6eb79::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit5fa26e59f63b759541052fd44cd6eb79::$prefixDirsPsr4; + $loader->prefixLengthsPsr4 = ComposerStaticInitbf4323f6f7f4e9a01ac7aba46eb8531a::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInitbf4323f6f7f4e9a01ac7aba46eb8531a::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInitbf4323f6f7f4e9a01ac7aba46eb8531a::$classMap; }, null, ClassLoader::class); } diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index ded064e..87fda74 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1,92 +1,5 @@ -[ - { - "name": "xenice/wp-framework", - "version": "dev-master", - "version_normalized": "9999999-dev", - "source": { - "type": "git", - "url": "https://github.com/xenice/wp-framework.git", - "reference": "863423b6ad0d0fed1d6fe1be2aeea18a27a3454c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/xenice/wp-framework/zipball/863423b6ad0d0fed1d6fe1be2aeea18a27a3454c", - "reference": "863423b6ad0d0fed1d6fe1be2aeea18a27a3454c", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": ">=7.0" - }, - "time": "2020-01-06T01:46:43+00:00", - "type": "library", - "installation-source": "source", - "autoload": { - "psr-4": { - "xenice\\theme\\": "theme/", - "xenice\\model\\": "model/", - "xenice\\view\\": "view/", - "xenice\\option\\": "option/", - "xenice\\optimize\\": "optimize/", - "xenice\\mail\\": "mail/" - }, - "files": [ - "option/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "authors": [ - { - "name": "xenice", - "email": "xenice@qq.com" - } - ], - "description": "A core package for wordpress theme framework xenice" - }, - { - "name": "xenice/wp-login", - "version": "dev-master", - "version_normalized": "9999999-dev", - "source": { - "type": "git", - "url": "https://github.com/xenice/wp-login.git", - "reference": "edacea110aa4b95fbd96fac8c79e28e468f21159" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/xenice/wp-login/zipball/edacea110aa4b95fbd96fac8c79e28e468f21159", - "reference": "edacea110aa4b95fbd96fac8c79e28e468f21159", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": ">=7.0" - }, - "time": "2020-01-06T01:23:54+00:00", - "type": "library", - "installation-source": "source", - "autoload": { - "psr-4": { - "xenice\\login\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "authors": [ - { - "name": "xenice", - "email": "xenice@qq.com" - } - ], - "description": "A social login package for the wordpress theme framework xenice" - } -] +{ + "packages": [], + "dev": true, + "dev-package-names": [] +} diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php new file mode 100644 index 0000000..5551c41 --- /dev/null +++ b/vendor/composer/installed.php @@ -0,0 +1,24 @@ + + array ( + 'pretty_version' => '1.0.0+no-version-set', + 'version' => '1.0.0.0', + 'aliases' => + array ( + ), + 'reference' => NULL, + 'name' => 'xenice/wp-xenice', + ), + 'versions' => + array ( + 'xenice/wp-xenice' => + array ( + 'pretty_version' => '1.0.0+no-version-set', + 'version' => '1.0.0.0', + 'aliases' => + array ( + ), + 'reference' => NULL, + ), + ), +); diff --git a/vendor/composer/platform_check.php b/vendor/composer/platform_check.php new file mode 100644 index 0000000..f79e574 --- /dev/null +++ b/vendor/composer/platform_check.php @@ -0,0 +1,26 @@ += 70000)) { + $issues[] = 'Your Composer dependencies require a PHP version ">= 7.0.0". You are running ' . PHP_VERSION . '.'; +} + +if ($issues) { + if (!headers_sent()) { + header('HTTP/1.1 500 Internal Server Error'); + } + if (!ini_get('display_errors')) { + if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { + fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); + } elseif (!headers_sent()) { + echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; + } + } + trigger_error( + 'Composer detected issues in your platform: ' . implode(' ', $issues), + E_USER_ERROR + ); +} diff --git a/vendor/xenice/wp-framework/README.md b/vendor/xenice/src/README.md similarity index 100% rename from vendor/xenice/wp-framework/README.md rename to vendor/xenice/src/README.md diff --git a/vendor/xenice/wp-framework/cache/Cache.php b/vendor/xenice/src/cache/Cache.php similarity index 100% rename from vendor/xenice/wp-framework/cache/Cache.php rename to vendor/xenice/src/cache/Cache.php diff --git a/vendor/xenice/wp-framework/cache/File.php b/vendor/xenice/src/cache/File.php similarity index 100% rename from vendor/xenice/wp-framework/cache/File.php rename to vendor/xenice/src/cache/File.php diff --git a/vendor/xenice/wp-framework/cache/Memcached.php b/vendor/xenice/src/cache/Memcached.php similarity index 100% rename from vendor/xenice/wp-framework/cache/Memcached.php rename to vendor/xenice/src/cache/Memcached.php diff --git a/vendor/xenice/wp-framework/composer.json b/vendor/xenice/src/composer.json similarity index 100% rename from vendor/xenice/wp-framework/composer.json rename to vendor/xenice/src/composer.json diff --git a/vendor/xenice/src/functions.php b/vendor/xenice/src/functions.php new file mode 100644 index 0000000..c606ca8 --- /dev/null +++ b/vendor/xenice/src/functions.php @@ -0,0 +1,92 @@ + + * @version 1.0.0 2019-09-26 + * @link http://www.xenice.com/ + * @package xenice + */ + +use xenice\theme\Theme; +use xenice\view\View; + + /** + * get option + */ +function take($name) +{ + static $option = []; + if(!$option){ + $options = get_option('xenice_options')?:[]; + foreach($options as $o){ + $option = array_merge($option, $o); + } + } + return $option[$name]??''; +} + + /** + * set option + */ +function put($name, $value) +{ + $options = get_option('xenice_options')?:[]; + foreach($options as $id=>&$o){ + if(isset($o[$name])){ + $o[$name] = $value; + update_option('xenice_options', $options); + return; + } + } +} + + +function _t($str, $domain = THEME_NAME) +{ + $translations = get_translations_for_domain($domain); + return $translations->translate($str); +} + +function is_url($v){ + $pattern="#(http|https)://(.*\.)?.*\..*#i"; + return preg_match($pattern,$v); +} + + +function import($slug, $dir = '') +{ + if($dir == ''){ + $file = '/' . $slug . '.php'; + $file = Theme::call('render_view', VIEW_DIR_EX . $file, VIEW_DIR . $file); + } + else{ + $file = $dir . '/' . $slug . '.php'; + } + extract(View::getVars()); + include($file); +} + +/* +function import_relate() +{ + // Get the file that called this function + $arr = debug_backtrace(); + $file = str_replace(VIEW_SLUG, 'app/web/view', $arr[0]['file']); + + extract(View::getVars()); + include($file); +}*/ + +function ad($id, $class='', $style = ''){ + if(take('enable_' . $id. '_ad')){ + $ad_code = take($id. '_ad_code'); + $ad_code_m = take($id. '_ad_code_m'); + $class && $class .= ' '; + if($ad_code){ + echo ' ' . $ad_code . ''; + } + if($ad_code_m){ + echo '' . $ad_code_m . ''; + } + } +} \ No newline at end of file diff --git a/vendor/xenice/src/login/Login.php b/vendor/xenice/src/login/Login.php new file mode 100644 index 0000000..c3e2264 --- /dev/null +++ b/vendor/xenice/src/login/Login.php @@ -0,0 +1,206 @@ + + * @version 1.0.0 2019-12-14 + * @link http://www.xenice.com/ + * @package xenice + */ + +namespace xenice\login; + +use xenice\theme\Base; +use xenice\theme\Theme; + +class Login extends Base +{ + public function __construct() + { + add_action('admin_footer',[$this, 'footer']); + add_filter('get_avatar_url', [$this, 'avatar'] ,10, 2); + + if(is_admin()){ + Theme::bind('xenice_options_init', [$this,'set']); + Theme::bind('xenice_options_save', [$this,'save']); + } + take('enable_qq_login') && QQLogin::instance(); + take('enable_wechat_login') && WechatLogin::instance(); + take('enable_weibo_login') && WeiboLogin::instance(); + } + + public function set($options) + { + $defaults = []; + $defaults[] = [ + 'id'=>'login', + 'pos'=>100, + 'name'=> _t('Login'), + 'title'=> _t('Social Login Settings'), + 'fields'=>[ + [ + 'name' => _t('QQ Login'), + 'desc' => sprintf(_t('Register a QQ social login account. Copy the callback url.'),'https://connect.qq.com/',admin_url('admin-ajax.php')), + 'fields'=>[ + [ + 'id' => 'enable_qq_login', + 'type' => 'checkbox', + 'value' => false, + 'label' => _t('Enable') + ], + [ + 'id' => 'qq_app_id', + 'type' => 'text', + 'value' => '', + 'label' => _t('APP ID') + ], + [ + 'id' => 'qq_app_key', + 'type' => 'text', + 'value' => '', + 'label' => _t('APP Key') + ], + ] + ], + [ + 'name' => _t('WeChat Login'), + 'desc' => sprintf(_t('Register a WeChat social login account. Copy the callback url.'),'https://open.weixin.qq.com/',admin_url('admin-ajax.php')), + 'fields'=>[ + [ + 'id' => 'enable_wechat_login', + 'type' => 'checkbox', + 'value' => false, + 'label' => _t('Enable') + ], + [ + 'id' => 'wechat_app_id', + 'type' => 'text', + 'value' => '', + 'label' => _t('APP ID') + ], + [ + 'id' => 'wechat_app_secret', + 'type' => 'text', + 'value' => '', + 'label' => _t('APP Secret') + ], + ] + ], + [ + 'name' => _t('WeiBo Login'), + 'desc' => sprintf(_t('Register a WeiBo social login account. Copy the callback url.'),'http://open.weibo.com',admin_url('admin-ajax.php')), + 'fields'=>[ + [ + 'id' => 'enable_weibo_login', + 'type' => 'checkbox', + 'value' => false, + 'label' => _t('Enable') + ], + [ + 'id' => 'weibo_app_id', + 'type' => 'text', + 'value' => '', + 'label' => _t('APP Key') + ], + [ + 'id' => 'weibo_app_key', + 'type' => 'text', + 'value' => '', + 'label' => _t('APP Secret') + ], + ] + ], + ] + ]; + return array_merge($options, $defaults); + } + + public function save($key, $tab, $data) + { + global $wpdb; + if($key == 'login'){ + if(isset($data['enable_qq_login'])){ + $var = $wpdb->query("SELECT user_qq FROM $wpdb->users"); + if(!$var){ + $wpdb->query("ALTER TABLE $wpdb->users ADD user_qq varchar(100)"); + } + } + if(isset($data['enable_wechat_login'])){ + $var = $wpdb->query("SELECT user_wechat FROM $wpdb->users"); + if(!$var){ + $wpdb->query("ALTER TABLE $wpdb->users ADD user_wechat varchar(100)"); + } + } + + if(isset($data['enable_weibo_login'])){ + $var = $wpdb->query("SELECT user_weibo FROM $wpdb->users"); + if(!$var){ + $wpdb->query("ALTER TABLE $wpdb->users ADD user_weibo varchar(100)"); + } + } + } + return $key; + } + + public function footer() + { + $msg = [ + 'success' => _t('Successfully copied to clipboard'), + 'failed' => _t('The browser does not support link clicks to copy to the clipboard') + ]; + echo <<+ +function copyLink (obj) { + var text = obj.href; + var textArea = document.createElement("textarea"); + textArea.style.position = 'fixed'; + textArea.style.top = '0'; + textArea.style.left = '0'; + textArea.style.width = '2em'; + textArea.style.height = '2em'; + textArea.style.padding = '0'; + textArea.style.border = 'none'; + textArea.style.outline = 'none'; + textArea.style.boxShadow = 'none'; + textArea.style.background = 'transparent'; + textArea.value = text; + document.body.appendChild(textArea); + textArea.select(); + + try { + var successful = document.execCommand('copy'); + var msg = successful ? '{$msg['success']}' : '{$msg['failed']}'; + alert(msg); + } catch (err) { + alert('{$msg['failed']}'); + } + + document.body.removeChild(textArea); +} +'; +EOT; + + } + + public function avatar($url, $id_or_email) + { + // param is id + if(is_numeric($id_or_email)){ + $user_id = $id_or_email; + if(!empty($user_id)){ + $data = Theme::new('user_pointer', $user_id)->getValue(); + //$data = get_user_meta($user_id, 'xenice_value',true); + if(!empty($data['last_login_way'])){ + $way = $data['last_login_way']; + $avatar = $data[$way . '_avatar']; + if(!empty($avatar)){ + $_SERVER['HTTPS'] && $avatar = str_replace('http://','https://',$avatar); + return $avatar; + } + } + } + } + + return $url; + } +} \ No newline at end of file diff --git a/vendor/xenice/src/login/Part.php b/vendor/xenice/src/login/Part.php new file mode 100644 index 0000000..419005f --- /dev/null +++ b/vendor/xenice/src/login/Part.php @@ -0,0 +1,38 @@ + + * @version 1.0.0 2019-12-14 + * @link http://www.xenice.com/ + * @package xenice + */ + +namespace xenice\login; + +trait Part +{ + protected function get($url) + { + $ch = curl_init (); + curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, TRUE ); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); + curl_setopt ( $ch, CURLOPT_URL, $url ); + $result = curl_exec ( $ch ); + curl_close ( $ch ); + return $result; + } + + public function post($url, $data) + { + $ch = curl_init (); + curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, TRUE ); + curl_setopt ( $ch, CURLOPT_POST, TRUE ); + curl_setopt ( $ch, CURLOPT_POSTFIELDS, $data ); + curl_setopt ( $ch, CURLOPT_URL, $url ); + curl_setopt ( $ch, CURLOPT_SSL_VERIFYPEER, FALSE); + $ret = curl_exec ( $ch ); + curl_close ( $ch ); + return $ret; + } +} \ No newline at end of file diff --git a/vendor/xenice/src/login/QQLogin.php b/vendor/xenice/src/login/QQLogin.php new file mode 100644 index 0000000..abac057 --- /dev/null +++ b/vendor/xenice/src/login/QQLogin.php @@ -0,0 +1,195 @@ + + * @version 1.0.0 2019-12-14 + * @link http://www.xenice.com/ + * @package xenice + */ + +namespace xenice\login; + +use xenice\theme\Theme; +use xenice\theme\Ajax; + +class QQLogin extends Ajax +{ + use Part; + + private $callbackUrl; + + public function __construct() + { + $this->callbackUrl = admin_url('admin-ajax.php') . '?action=qqCallback'; + $this->action('qq'); + $this->action('qqCallback'); + + } + + public function qq() + { + $scope = 'get_user_info,add_share,list_album,add_album,upload_pic,add_topic,add_one_blog,add_weibo'; + $appid = take('qq_app_id'); + $this->login($appid,$scope,$this->callbackUrl); + exit; + } + + public function qqCallback() + { + $appid = take('qq_app_id'); + $appkey = take('qq_app_key'); + $this->callback($appid,$appkey,$this->callbackUrl); + $this->get_openid(); + if(is_user_logged_in()){ + $this->bind(); + }else{ + $this->enter(); + } + exit; + } + + private function login($appid, $scope, $callback) + { + $_SESSION['rurl'] = $_REQUEST ["rurl"]; + $_SESSION ['state'] = md5 ( uniqid ( rand (), true ) ); //CSRF protection + $login_url = "https://graph.qq.com/oauth2.0/authorize?response_type=code&client_id=" . $appid . "&redirect_uri=" . urlencode ( $callback ) . "&state=" . $_SESSION ['state'] . "&scope=" . $scope; + header ( "Location:$login_url" ); + } + + private function callback($appid,$appkey,$path) + { + if(empty($_REQUEST ['state']) || empty($_SESSION ['state'])){ + exit; + } + if ($_REQUEST ['state'] == $_SESSION ['state']) { + $token_url = "https://graph.qq.com/oauth2.0/token?grant_type=authorization_code&" . "client_id=" . $appid . "&redirect_uri=" . urlencode ( $path ) . "&client_secret=" . $appkey . "&code=" . $_REQUEST ["code"]; + + $response = $this->get( $token_url ); + if (strpos ( $response, "callback" ) !== false) { + $lpos = strpos ( $response, "(" ); + $rpos = strrpos ( $response, ")" ); + $response = substr ( $response, $lpos + 1, $rpos - $lpos - 1 ); + $msg = json_decode ( $response ); + if (isset ( $msg->error )) { + echo " error:
" . $msg->error; + echo "msg :
" . $msg->error_description; + exit (); + } + } + + $params = array (); + parse_str ( $response, $params ); + $_SESSION ['access_token'] = $params ["access_token"]; + } else { + echo _t("The state does not match. You may be a victim of CSRF."); + exit; + } + } + + private function get_openid() + { + $graph_url = "https://graph.qq.com/oauth2.0/me?access_token=" . $_SESSION ['access_token']; + + $str = $this->get( $graph_url ); + if (strpos ( $str, "callback" ) !== false) { + $lpos = strpos ( $str, "(" ); + $rpos = strrpos ( $str, ")" ); + $str = substr ( $str, $lpos + 1, $rpos - $lpos - 1 ); + } + + $user = json_decode ( $str ); + if (isset ( $user->error )) { + echo "error:
" . $user->error; + echo "msg2 :
" . $user->error_description; + exit (); + } + $_SESSION ['openid'] = $user->openid; + } + + private function get_user_info() { + $appid = take('qq_app_id'); + $get_user_info = "https://graph.qq.com/user/get_user_info?" . "access_token=" . $_SESSION ['access_token'] . "&oauth_consumer_key=".$appid."&openid=" . $_SESSION ['openid']."&format=json" ; + return $this->get( $get_user_info ); + } + + private function enter(){ + if(is_user_logged_in()){ + echo _t('You are logged in, please bind in the user page.'); + exit; + }else{ + if(isset($_SESSION['openid'])){ + global $wpdb; + + $user_ID = $wpdb->get_var("SELECT ID FROM $wpdb->users WHERE user_qq='".$wpdb->escape($_SESSION['openid'])."'"); + //$user_ID = $wpdb->get_var("SELECT user_id FROM $wpdb->usermeta WHERE meta_key='qq' meta_value='".$wpdb->escape($_SESSION['openid'])."'"); + if($user_ID > 0){ + Theme::call('social_login', $user_ID); + Theme::new('user_pointer', $user_ID)->setValue('last_login_way', 'qq'); + wp_set_auth_cookie($user_ID,true,false); + wp_redirect($_SESSION['rurl']); + exit; + }else{ + $pass = wp_create_nonce(rand(10,1000)); + $uinfo = json_decode($this->get_user_info()); + $login_name = "u".mt_rand(1000,9999).mt_rand(1000,9999).mt_rand(1000,9999).mt_rand(1000,9999); + $username = $uinfo->nickname; + $userdata=array( + 'user_login' => $login_name, + 'display_name' => $username, + 'nickname' => $username, + 'user_pass' => $pass, + 'role' => get_option('default_role'), + 'first_name' => $username + ); + $user_id = wp_insert_user( $userdata ); + if ( is_wp_error( $user_id ) ) { + echo $user_id->get_error_message(); + }else{ + $ff = $wpdb->query("UPDATE $wpdb->users SET user_qq = '".$wpdb->escape($_SESSION['openid'])."' WHERE ID = '$user_id'"); + if ($ff) { + Theme::call('social_register', $user_id); + $data = [ + 'qq_avatar'=>$uinfo->figureurl_qq_1, + 'qq_name'=>$username, + 'last_login_way'=>'qq', + 'register_way'=>'qq', + ]; + Theme::new('user_pointer', $user_id)->setValue($data); + wp_set_auth_cookie($user_id,true,false); + wp_redirect($_SESSION['rurl']); + + } + } + exit; + } + } + } + } + + private function bind(){ + if(is_user_logged_in()){ + if(isset($_SESSION['openid'])){ + + global $wpdb; + $hasuser_ID = $wpdb->get_var("SELECT ID FROM $wpdb->users WHERE user_qq='".$wpdb->escape($_SESSION['openid'])."'"); + //$hasuser_ID = $wpdb->get_var("SELECT user_id FROM $wpdb->usermeta WHERE meta_key='qq' meta_value='".$wpdb->escape($_SESSION['openid'])."'"); + if($hasuser_ID){ + echo _t('The binding failed. It may have been bound to other accounts. Please log in to other accounts to unbind.'); + exit; + }else{ + global $current_user; + $userid = $current_user->ID; + $wpdb->query("UPDATE $wpdb->users SET user_qq = '".$wpdb->escape($_SESSION['openid'])."' WHERE ID = $userid"); + $uinfo = json_decode($this->get_user_info()); + Theme::new('user_pointer', $user_ID)->setValue('qq_name', $uinfo->nickname); + wp_redirect($_SESSION['rurl']); + exit(); + } + + } + }else{ + echo _t('Binding failed, please login first'); + exit; + } + } +} \ No newline at end of file diff --git a/vendor/xenice/src/login/WechatLogin.php b/vendor/xenice/src/login/WechatLogin.php new file mode 100644 index 0000000..cc6f2d5 --- /dev/null +++ b/vendor/xenice/src/login/WechatLogin.php @@ -0,0 +1,161 @@ + + * @version 1.0.0 2019-12-14 + * @link http://www.xenice.com/ + * @package xenice + */ + +namespace xenice\login; + +use xenice\theme\Ajax; + +class WechatLogin extends Ajax +{ + use Part; + + public function __construct() + { + $this->action('wechat'); + $this->action('wechatBind'); + } + + public function wechat() + { + $scope = 'snsapi_login'; + $appid = take('wechat_app_id'); + $appsecret = take('wechat_app_secret'); + if(isset($_REQUEST['code']) && isset($_REQUEST['state'])){ + $this->login($appid,$appsecret,$_REQUEST['code']); + $this->enter(); + } + exit; + } + + public function wechatBind() + { + $scope = 'snsapi_login'; + $appid = take('wechat_app_id'); + $appsecret = take('wechat_app_secret'); + if(isset($_REQUEST['code']) && isset($_REQUEST['state'])){ + $this->login($appid,$appsecret,$_REQUEST['code']); + $this->weixin_bd(); + } + exit; + } + + private function login($appid,$appkey,$code) + { + if($_REQUEST ['state'] == 'MBT_weixin_login'){ + + $token_url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=".$appid."&secret=".$appkey."&code=".$code."&grant_type=authorization_code"; + $response = $this->get( $token_url ); + $msg = json_decode ( $response ); + if (isset ( $msg->errcode )) { + echo "error:
" . $msg->errcode; + echo "msg :
" . $msg->errmsg; + exit (); + }else{ + + $_SESSION ['weixin_access_token'] = $msg->access_token; + $_SESSION ['weixin_open_id'] = $msg->openid; + } + }else{ + echo _t("The state does not match. You may be a victim of CSRF."); + exit; + } + } + + private function enter() + { + if(is_user_logged_in()){ + echo _t('You are logged in, please bind in the user page.'); + exit; + }else{ + global $wpdb; + if(isset($_SESSION ['weixin_open_id'])){ + + $user_ID = $wpdb->get_var("SELECT ID FROM $wpdb->users WHERE wechat='".$wpdb->escape($_SESSION['weixin_open_id'])."'"); + if($user_ID){ + Theme::call('social_login', $user_ID); + Theme::new('user_pointer', $user_ID)->setValue('last_login_way', 'wechat'); + wp_set_auth_cookie($user_ID,true,false); + wp_redirect(get_bloginfo('url')); + exit(); + }else{ + + $uinfo = $this->wx_oauth2_get_user_info($_SESSION ['weixin_access_token'],$_SESSION ['weixin_open_id']); + $pass = wp_create_nonce(rand(10,1000)); + $login_name = "u".mt_rand(1000,9999).mt_rand(1000,9999).mt_rand(1000,9999).mt_rand(1000,9999); + $username = $uinfo->nickname; + $userdata=array( + 'user_login' => $login_name, + 'display_name' => $username, + 'nickname' => $username, + 'user_pass' => $pass, + 'role' => get_option('default_role'), + 'first_name' => $username + ); + $user_id = wp_insert_user( $userdata ); + if ( is_wp_error( $user_id ) ) { + echo $user_id->get_error_message(); + }else{ + + $ff = $wpdb->query("UPDATE $wpdb->users SET wechat = '".$wpdb->escape($_SESSION['weixin_open_id'])."' WHERE ID = '$user_id'"); + if($ff){ + Theme::call('social_register', $user_id); + $data = [ + 'wechat_avatar'=>$uinfo->headimgurl, + 'wechat_name'=>$username, + 'last_login_way'=>'wechat', + 'register_way'=>'wechat' + ]; + Theme::new('user_pointer', $user_id)->setValue($data); + wp_set_auth_cookie($user_id,true,false); + wp_redirect(get_bloginfo('url')); + } + + } + exit(); + } + + } + } + } + + private function bind() + { + if(is_user_logged_in()){ + global $wpdb; + if(isset($_SESSION ['weixin_open_id'])){ + + $hsauser_ID = $wpdb->get_var("SELECT ID FROM $wpdb->users WHERE wechat='".$wpdb->escape($_SESSION['weixin_open_id'])."'"); + if($hsauser_ID){ + echo _t('The binding failed. It may have been bound to other accounts. Please log in to other accounts to unbind.'); + exit; + }else{ + global $current_user; + $userid = $current_user->ID; + $uinfo = $this->wx_oauth2_get_user_info($_SESSION ['weixin_access_token'],$_SESSION ['weixin_open_id']); + + $wpdb->query("UPDATE $wpdb->users SET wechat = '".$wpdb->escape($_SESSION['weixin_open_id'])."' WHERE ID = $userid"); + Theme::new('user_pointer', $user_ID)->setValue('wechat_name', $uinfo->nickname); + wp_redirect(get_bloginfo('url')); + } + + } + }else{ + echo _t('Binding failed, please login first'); + exit; + } + } + + + private function wx_oauth2_get_user_info($access_token, $openid) + { + $url = "https://api.weixin.qq.com/sns/userinfo?access_token=".$access_token."&openid=".$openid."&lang=zh_CN"; + $res = $this->get($url); + return json_decode($res); + } +} \ No newline at end of file diff --git a/vendor/xenice/src/login/WeiboLogin.php b/vendor/xenice/src/login/WeiboLogin.php new file mode 100644 index 0000000..f7d9287 --- /dev/null +++ b/vendor/xenice/src/login/WeiboLogin.php @@ -0,0 +1,170 @@ + + * @version 1.0.0 2019-12-14 + * @link http://www.xenice.com/ + * @package xenice + */ + +namespace xenice\login; + +use xenice\theme\Ajax; + +class WeiboLogin extends Ajax +{ + use Part; + + private $callbackUrl; + + public function __construct() + { + $this->callbackUrl = admin_url('admin-ajax.php') . '?action=weiboCallback'; + $this->action('weibo'); + $this->action('weiboCallback'); + + } + + public function weibo() + { + $appid = take('weibo_app_id'); + $this->login($appid,$this->callbackUrl); + exit; + } + + public function weiboCallback() + { + $appid = take('weibo_app_id'); + $appkey = take('weibo_app_key'); + $this->callback($appid,$appkey,$this->callbackUrl); + if(is_user_logged_in()){ + $this->bind(); + }else{ + $this->enter(); + } + exit; + } + + private function login($appid, $callback) + { + $_SESSION['rurl'] = $_REQUEST ["rurl"]; + $_SESSION ['state'] = md5 ( uniqid ( rand (), true ) ); //CSRF protection + $login_url = "https://api.weibo.com/oauth2/authorize?client_id=".$appid."&response_type=code&redirect_uri=".$callback."&state=".$_SESSION['state']; + header ( "Location:$login_url" ); + } + + private function callback($appid,$appkey,$path) + { + if ($_REQUEST ['state'] == $_SESSION ['state']) { + $url = "https://api.weibo.com/oauth2/access_token"; + $data = "client_id=".$appid."&client_secret=".$appkey."&grant_type=authorization_code&redirect_uri=".$path."&code=".$_REQUEST ["code"]; + $output = json_decode($this->post($url,$data)); + $_SESSION['access_token'] = $output->access_token; + $_SESSION['uid'] = $output->uid; + }else{ + echo _t("The state does not match. You may be a victim of CSRF."); + exit; + } + } + + private function get_user_info() + { + $get_user_info = "https://api.weibo.com/2/users/show.json?uid=".$_SESSION['uid']."&access_token=".$_SESSION['access_token']; + return $this->get( $get_user_info ); + } + + private function get_user_id() + { + $get_user_id = "https://api.weibo.com/2/account/get_uid.json?access_token=".$_SESSION['access_token']; + return $this->get( $get_user_id ); + } + + private function enter() + { + if(is_user_logged_in()){ + echo _t('You are logged in, please bind in the user page.'); + exit; + }else{ + global $wpdb; + $uidArray = json_decode($this->get_user_id()); + if( isset($_SESSION['uid']) && $uidArray->uid == $wpdb->escape($_SESSION['uid']) && isset($_SESSION['access_token']) ){ + + $user_ID = $wpdb->get_var("SELECT ID FROM $wpdb->users WHERE user_weibo='".$uidArray->uid."'"); + if ( $user_ID > 0 ) { + Theme::call('social_login', $user_ID); + Theme::new('user_pointer', $user_ID)->setValue('last_login_way', 'weibo'); + wp_set_auth_cookie($user_ID,true,false); + wp_redirect($_SESSION['rurl']); + exit(); + }else{ + + $pass = wp_create_nonce(rand(10,1000)); + $str = json_decode($this->get_user_info()); + $login_name = "u".mt_rand(1000,9999).mt_rand(1000,9999).mt_rand(1000,9999).mt_rand(1000,9999); + $username = $str->screen_name; + $userimg = $str->avatar_large; + $description = $str->description; + + $userdata=array( + 'user_login' => $login_name, + 'display_name' => $username, + 'user_pass' => $pass, + 'role' => get_option('default_role'), + 'nickname' => $username, + 'first_name' => $username, + 'description'=> $description + ); + $user_id = wp_insert_user( $userdata ); + if ( is_wp_error( $user_id ) ) { + echo $user_id->get_error_message(); + }else{ + $ff = $wpdb->query("UPDATE $wpdb->users SET user_weibo = '".$uidArray->uid."' WHERE ID = '$user_id'"); + if ($ff) { + Theme::call('social_register', $user_id); + $data = [ + 'weibo_avatar'=>$userimg, + 'weibo_name'=>$username, + 'last_login_way'=>'weibo', + 'register_way'=>'weibo' + ]; + Theme::new('user_pointer', $user_id)->setValue($data); + wp_set_auth_cookie($user_id,true,false); + wp_redirect($_SESSION['rurl']); + } + } + exit(); + } + } + } + } + + private function bind() + { + if(is_user_logged_in()){ + global $wpdb; + $uidArray = json_decode($this->get_user_id()); + if( isset($_SESSION['uid']) && $uidArray->uid == $wpdb->escape($_SESSION['uid']) && isset($_SESSION['access_token']) ){ + + $hsauser_ID = $wpdb->get_var("SELECT ID FROM $wpdb->users WHERE user_weibo='".$uidArray->uid."'"); + if($hsauser_ID){ + echo _t('The binding failed. It may have been bound to other accounts. Please log in to other accounts to unbind.'); + exit; + }else{ + global $current_user; + $userid = $current_user->ID; + $wpdb->query("UPDATE $wpdb->users SET user_weibo = '".$uidArray->uid."' WHERE ID = $userid"); + $str = json_decode($this->get_user_info()); + Theme::new('user_pointer', $userid)->setValue('weibo_name', $str->screen_name); + wp_redirect($_SESSION['rurl']); + exit; + + } + + } + }else{ + echo _t('Binding failed, please login first'); + exit; + } + } + +} \ No newline at end of file diff --git a/vendor/xenice/src/mail/Mail.php b/vendor/xenice/src/mail/Mail.php new file mode 100644 index 0000000..2a872d9 --- /dev/null +++ b/vendor/xenice/src/mail/Mail.php @@ -0,0 +1,155 @@ + + * @version 1.0.0 2019-10-14 + * @link http://www.xenice.com/ + * @package xenice + */ + +namespace xenice\mail; + +use xenice\theme\Base; +use xenice\theme\Theme; + +class Mail extends Base +{ + public function __construct() + { + take('enable_mail_service') && add_action('phpmailer_init', [$this, 'smtp']); + if(is_admin()){ + Theme::bind('xenice_options_init', [$this,'set']); + Theme::bind('xenice_options_save', [$this,'save']); + } + } + + public function set($options) + { + $defaults = []; + $defaults[] = [ + 'id'=>'mail', + 'name'=> _t('Mail'), + 'title'=> _t('Mail Settings'), + 'tabs' => [ + [ + 'id' => 'setting', + 'title' => _t('Mail Settings'), + 'fields'=>[ + [ + 'id' => 'enable_mail_service', + 'name' => _t('Mail Service'), + 'label' => _t('Enable mail service'), + 'type' => 'checkbox', + 'value' => true + ], + [ + 'id' => 'mail_from_name', + 'name' => _t('From Name'), + 'type' => 'text', + 'value' => '' + ], + [ + 'id' => 'mail_host', + 'name' => _t('SMTP Host'), + 'type' => 'text', + 'value' => '' + ], + [ + 'id' => 'mail_post', + 'name' => _t('SMTP Post'), + 'type' => 'number', + 'value' => 465 + ], + [ + 'id' => 'mail_username', + 'name' => _t('Mail Account'), + 'type' => 'text', + 'value' => '' + ], + [ + 'id' => 'mail_password', + 'name' => _t('Mail Password'), + 'type' => 'text', + 'value' => '' + ], + [ + 'id' => 'mail_smtp_auth', + 'name' => _t('SMTP Auth'), + 'label' => _t('Enable SMTP Auth service'), + 'type' => 'checkbox', + 'value' => true + ], + [ + 'id' => 'mail_smtp_secure', + 'name' => _t('SMTP Secure'), + 'desc' => _t('Fill in ssl if SMTP Auth service is enabled, leave blank if not'), + 'type' => 'text', + 'value' => 'ssl' + ], + ] + ], + [ + 'id' => 'send', + 'title' => _t('Send Mail'), + 'submit'=> _t('Send'), + 'fields'=>[ + [ + 'id' => 'mail_title', + 'name' => _t('Mail Title'), + 'type' => 'text', + 'value' => '' + ], + [ + 'id' => 'mail_content', + 'name' => _t('Mail Content'), + 'type' => 'textarea', + 'value' => '', + 'style' => 'regular', + 'rows' => 12 + ] + ] + ] + ] + ]; + return array_merge($options, $defaults); + } + + /** + * Mail Smtp Settings + */ + public function smtp($phpmailer) + { + $phpmailer->IsSMTP(); + $mail_name = take('mail_from_name'); + $mail_host = take('mail_host'); + $mail_port = take('mail_port'); + $mail_smtpsecure = take('mail_smtp_secure'); + + $phpmailer->FromName = $mail_name ?: 'xenice'; + $phpmailer->Host = $mail_host ?:'smtp.qq.com'; + $phpmailer->Port = $mail_port ?: '465'; + $phpmailer->Username = take('mail_username'); + $phpmailer->Password = take('mail_password'); + $phpmailer->From = take('mail_username'); + $phpmailer->SMTPAuth = take('mail_smtp_auth'); + $phpmailer->SMTPSecure = $mail_smtpsecure ?: 'ssl'; + add_filter('wp_mail_from_name', function ($old) {return $mail_name;}); + } + + public function save($key, $tab, $data) + { + if($key == 'mail' && $tab == 1){ + global $current_user; + $bool = wp_mail($current_user->user_email, $data['mail_title']??'', $data['mail_content']??''); + if($bool) + $result = ['key'=>$key, 'return' => 'success', 'message'=>_t('Send successfully')]; + else + $result = ['key'=>$key, 'return' => 'error', 'message'=>_t('Send failure')]; + Theme::call('xenice_options_result', $result); + } + else{ + return $key; + } + + } +} \ No newline at end of file diff --git a/vendor/xenice/wp-framework/model/ArticleModel.php b/vendor/xenice/src/model/ArticleModel.php similarity index 84% rename from vendor/xenice/wp-framework/model/ArticleModel.php rename to vendor/xenice/src/model/ArticleModel.php index 755d097..88b577c 100644 --- a/vendor/xenice/wp-framework/model/ArticleModel.php +++ b/vendor/xenice/src/model/ArticleModel.php @@ -47,6 +47,7 @@ public function __construct() global $s; $this->s = $s; $this->defaults['s'] = $s; + $this->defaults['post_type'] = ['post']; break; case 'author': case 'archive': @@ -73,6 +74,24 @@ public function has() return $this->hasPosts; } + // use QueryModel + public function fetch($sql) + { + if(!$this->query){ + //$this->defaults['paged'] = get_query_var('paged')?:1; + $this->query = new Query($sql); + $this->hasPosts = $this->query->has(); + $this->pages = $this->query->pages; + } + + if($post = $this->query->next()){ + return Theme::new('article_pointer', $post); + + } + else{ + $this->query = null; + } + } public function pointer($args = '') { diff --git a/vendor/xenice/wp-framework/model/CategoryModel.php b/vendor/xenice/src/model/CategoryModel.php similarity index 100% rename from vendor/xenice/wp-framework/model/CategoryModel.php rename to vendor/xenice/src/model/CategoryModel.php diff --git a/vendor/xenice/wp-framework/model/CommentModel.php b/vendor/xenice/src/model/CommentModel.php similarity index 100% rename from vendor/xenice/wp-framework/model/CommentModel.php rename to vendor/xenice/src/model/CommentModel.php diff --git a/vendor/xenice/wp-framework/model/Model.php b/vendor/xenice/src/model/Model.php similarity index 100% rename from vendor/xenice/wp-framework/model/Model.php rename to vendor/xenice/src/model/Model.php diff --git a/vendor/xenice/wp-framework/model/OptionModel.php b/vendor/xenice/src/model/OptionModel.php similarity index 100% rename from vendor/xenice/wp-framework/model/OptionModel.php rename to vendor/xenice/src/model/OptionModel.php diff --git a/vendor/xenice/wp-framework/model/PageModel.php b/vendor/xenice/src/model/PageModel.php similarity index 100% rename from vendor/xenice/wp-framework/model/PageModel.php rename to vendor/xenice/src/model/PageModel.php diff --git a/vendor/xenice/src/model/Query.php b/vendor/xenice/src/model/Query.php new file mode 100644 index 0000000..3fb3ca4 --- /dev/null +++ b/vendor/xenice/src/model/Query.php @@ -0,0 +1,55 @@ + + * @version 1.0.0 2020-07-12 + * @link http://www.xenice.com/ + * @package xenice + */ + +namespace xenice\model; + +use xenice\theme\Theme; +use xenice\cache\Cache; + +class Query +{ + public $results; + public $total; // all records + public $count; // per page num + public $page; // current page + public $pages; // all pages + public $index; // current pointer index + public $maxIndex; // max pointer index + + public function __construct($sql) + { + $key = 'query_' . md5($sql); + $this->results = Cache::get($key); + if(!$this->results){ + global $wpdb; + $this->results = $wpdb->get_results($sql); + Cache::set($key, $this->results, 24*3600); + } + $this->total = is_array($this->results)?count($this->results):0; + $this->count = get_option('posts_per_page'); + $this->pages = ceil($this->total/$this->count); + $this->page = get_query_var('paged')?:1; + $this->index = ($this->page - 1) * $this->count; + $this->maxIndex = $this->index + $this->count - 1; + } + + public function has() + { + return $this->index<=$this->maxIndex && isset($this->results[$this->index]); + } + + public function next() + { + if($this->index<=$this->maxIndex && isset($this->results[$this->index])){ + $id = $this->results[$this->index]->ID; + $this->index ++; + return $id; + } + } +} \ No newline at end of file diff --git a/vendor/xenice/wp-framework/model/TagModel.php b/vendor/xenice/src/model/TagModel.php similarity index 100% rename from vendor/xenice/wp-framework/model/TagModel.php rename to vendor/xenice/src/model/TagModel.php diff --git a/vendor/xenice/wp-framework/model/UserModel.php b/vendor/xenice/src/model/UserModel.php similarity index 100% rename from vendor/xenice/wp-framework/model/UserModel.php rename to vendor/xenice/src/model/UserModel.php diff --git a/vendor/xenice/wp-framework/model/pointer/ArticlePointer.php b/vendor/xenice/src/model/pointer/ArticlePointer.php similarity index 56% rename from vendor/xenice/wp-framework/model/pointer/ArticlePointer.php rename to vendor/xenice/src/model/pointer/ArticlePointer.php index 819ca91..4c84843 100644 --- a/vendor/xenice/wp-framework/model/pointer/ArticlePointer.php +++ b/vendor/xenice/src/model/pointer/ArticlePointer.php @@ -20,15 +20,26 @@ public function __construct($mix) public function cid() { + if(property_exists($this->row, 'cid')){ + return $this->row->cid; + } + global $wpdb; - $cid = $wpdb->get_var("SELECT term_taxonomy_id FROM $wpdb->term_relationships WHERE object_id=".$this->id()); - return intval($cid); + $taxonomy = $this->taxonomy(); + $cid = $wpdb->get_var("SELECT r.term_taxonomy_id FROM $wpdb->term_relationships as r, $wpdb->term_taxonomy as t WHERE r.term_taxonomy_id = t.term_taxonomy_id AND r.object_id=".$this->id()." AND t.taxonomy='$taxonomy'"); + $this->row->cid = intval($cid); + return $this->row->cid; } public function taxonomy() { + if(property_exists($this->row, 'taxonomy')){ + return $this->row->taxonomy; + } + $type = $this->type(); - return ($type == 'post')?'category':$type . "_category"; + $this->row->taxonomy = ($type == 'post')?'category':$type . "_category"; + return $this->row->taxonomy; } public function content() diff --git a/vendor/xenice/wp-framework/model/pointer/CategoryPointer.php b/vendor/xenice/src/model/pointer/CategoryPointer.php similarity index 100% rename from vendor/xenice/wp-framework/model/pointer/CategoryPointer.php rename to vendor/xenice/src/model/pointer/CategoryPointer.php diff --git a/vendor/xenice/wp-framework/model/pointer/CommentPointer.php b/vendor/xenice/src/model/pointer/CommentPointer.php similarity index 100% rename from vendor/xenice/wp-framework/model/pointer/CommentPointer.php rename to vendor/xenice/src/model/pointer/CommentPointer.php diff --git a/vendor/xenice/wp-framework/model/pointer/PagePointer.php b/vendor/xenice/src/model/pointer/PagePointer.php similarity index 100% rename from vendor/xenice/wp-framework/model/pointer/PagePointer.php rename to vendor/xenice/src/model/pointer/PagePointer.php diff --git a/vendor/xenice/wp-framework/model/pointer/Pointer.php b/vendor/xenice/src/model/pointer/Pointer.php similarity index 100% rename from vendor/xenice/wp-framework/model/pointer/Pointer.php rename to vendor/xenice/src/model/pointer/Pointer.php diff --git a/vendor/xenice/wp-framework/model/pointer/PostPointer.php b/vendor/xenice/src/model/pointer/PostPointer.php similarity index 93% rename from vendor/xenice/wp-framework/model/pointer/PostPointer.php rename to vendor/xenice/src/model/pointer/PostPointer.php index c73eb9d..315b627 100644 --- a/vendor/xenice/wp-framework/model/pointer/PostPointer.php +++ b/vendor/xenice/src/model/pointer/PostPointer.php @@ -102,4 +102,10 @@ public function set($key, $value) { return update_post_meta($this->id(), $key, $value); } + + public function update($data) + { + $data['ID'] = $this->id(); + return wp_update_post( $data ); + } } \ No newline at end of file diff --git a/vendor/xenice/wp-framework/model/pointer/TagPointer.php b/vendor/xenice/src/model/pointer/TagPointer.php similarity index 100% rename from vendor/xenice/wp-framework/model/pointer/TagPointer.php rename to vendor/xenice/src/model/pointer/TagPointer.php diff --git a/vendor/xenice/wp-framework/model/pointer/UserPointer.php b/vendor/xenice/src/model/pointer/UserPointer.php similarity index 100% rename from vendor/xenice/wp-framework/model/pointer/UserPointer.php rename to vendor/xenice/src/model/pointer/UserPointer.php diff --git a/vendor/xenice/wp-framework/model/pointer/part/XeniceMeta.php b/vendor/xenice/src/model/pointer/part/XeniceMeta.php similarity index 100% rename from vendor/xenice/wp-framework/model/pointer/part/XeniceMeta.php rename to vendor/xenice/src/model/pointer/part/XeniceMeta.php diff --git a/vendor/xenice/wp-framework/optimize/AdminOptimize.php b/vendor/xenice/src/optimize/AdminOptimize.php similarity index 97% rename from vendor/xenice/wp-framework/optimize/AdminOptimize.php rename to vendor/xenice/src/optimize/AdminOptimize.php index d60f277..9b33527 100644 --- a/vendor/xenice/wp-framework/optimize/AdminOptimize.php +++ b/vendor/xenice/src/optimize/AdminOptimize.php @@ -25,6 +25,7 @@ public function __construct() take('remove_w_icon') && add_action('wp_before_admin_bar_render',[$this,'removeWIcon']); take('enable_link') && add_filter( 'pre_option_link_manager_enabled', '__return_true' ); take('enable_code_escape') && add_filter( 'content_save_pre', [$this, 'replaceCodeTags'], 9 ); + take('external_link_to_local') && new LinksToLocal; if(take('remove_image_attribute')){ add_filter( 'post_thumbnail_html', [$this, 'removeImageAttribute'], 10 ); add_filter( 'image_send_to_editor', [$this, 'removeImageAttribute'], 10 ); diff --git a/vendor/xenice/wp-framework/optimize/AvatarOptimize.php b/vendor/xenice/src/optimize/AvatarOptimize.php similarity index 100% rename from vendor/xenice/wp-framework/optimize/AvatarOptimize.php rename to vendor/xenice/src/optimize/AvatarOptimize.php diff --git a/vendor/xenice/wp-framework/optimize/GlobalOptimize.php b/vendor/xenice/src/optimize/GlobalOptimize.php similarity index 98% rename from vendor/xenice/wp-framework/optimize/GlobalOptimize.php rename to vendor/xenice/src/optimize/GlobalOptimize.php index 19a1758..7939318 100644 --- a/vendor/xenice/wp-framework/optimize/GlobalOptimize.php +++ b/vendor/xenice/src/optimize/GlobalOptimize.php @@ -16,6 +16,7 @@ class GlobalOptimize public function __construct() { // wordpress + take('enable_classic_editor') && add_filter('use_block_editor_for_post', '__return_false'); take('disable_pingback') && $this->disablePingback(); take('disable_emoji') && $this->disableEmoji(); take('disable_rest_api') && $this->disableRestApi(); diff --git a/vendor/xenice/wp-framework/optimize/GuestOptimize.php b/vendor/xenice/src/optimize/GuestOptimize.php similarity index 100% rename from vendor/xenice/wp-framework/optimize/GuestOptimize.php rename to vendor/xenice/src/optimize/GuestOptimize.php diff --git a/vendor/xenice/src/optimize/LinksToLocal.php b/vendor/xenice/src/optimize/LinksToLocal.php new file mode 100644 index 0000000..4b6432f --- /dev/null +++ b/vendor/xenice/src/optimize/LinksToLocal.php @@ -0,0 +1,128 @@ + + * @version 1.0.0 2021-01-31 + * @link http://www.xenice.com/ + * @package xenice + */ + +namespace xenice\optimize; + +class LinksToLocal +{ + public function __construct() + { + add_action('save_post', [$this, 'savePost'], 120, 2); + } + + public function savePost($post_id, $post) + { + global $wpdb; + if($post->post_status == 'publish') { + $p = '//iU'; + $num = preg_match_all($p, $post->post_content, $matches); + if ($num) { + $wp_upload_dir = wp_upload_dir(); + set_time_limit(0); + $ch = curl_init(); + curl_setopt($ch, CURLOPT_HEADER, false); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); + curl_setopt($ch, CURLOPT_MAXREDIRS,20); + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30); + + $ecp_options = $_SERVER['HTTP_HOST']; + foreach ($matches[1] as $src) { + if (isset($src) && strpos($src, $ecp_options) === false) { + $file_info = wp_check_filetype(basename($src), null); + if ($file_info['ext'] == false) { + date_default_timezone_set('PRC'); + $file_name = date('YmdHis-').dechex(mt_rand(100000, 999999)).'.tmp'; + } else { + $file_name = dechex(mt_rand(100000, 999999)) . '-' . basename($src); + } + curl_setopt($ch, CURLOPT_URL, $src); + $file_path = $wp_upload_dir['path'] . '/' . $file_name; + $img = fopen($file_path, 'wb'); + curl_setopt($ch, CURLOPT_FILE, $img); + $img_data = curl_exec($ch); + fclose($img); + + if (file_exists($file_path) && filesize($file_path) > 0) { + $t = curl_getinfo($ch, CURLINFO_CONTENT_TYPE); + $arr = explode('/', $t); + if (pathinfo($file_path, PATHINFO_EXTENSION) == 'tmp') { + $file_path = $this->handleExt($file_path, $arr[1], $wp_upload_dir['path'], $file_name, 'tmp'); + } elseif (pathinfo($file_path, PATHINFO_EXTENSION) == 'webp') { + $file_path = $this->handleExt($file_path, $arr[1], $wp_upload_dir['path'], $file_name, 'webp'); + } + $post->post_content = str_replace($src, $wp_upload_dir['url'] . '/' . basename($file_path), $post->post_content); + $attachment = $this->getAttachmentPost(basename($file_path), $wp_upload_dir['url'] . '/' . basename($file_path)); + $attach_id = wp_insert_attachment($attachment, ltrim($wp_upload_dir['subdir'] . '/' . basename($file_path), '/'), 0); + $attach_data = wp_generate_attachment_metadata($attach_id, $file_path); + $ss = wp_update_attachment_metadata($attach_id, $attach_data); + } + } + } + curl_close($ch); + $wpdb->update( $wpdb->posts, array('post_content' => $post->post_content), array('ID' => $post->ID)); + } + } + } + + public function handleExt($file, $type, $file_dir, $file_name, $ext) + { + switch ($ext) { + case 'tmp': + if (rename($file, str_replace('tmp', $type, $file))) { + if ('webp' == $type) { + return $this->imageConvert('webp', 'jpeg', $file_dir . '/' . str_replace('tmp', $type, $file_name)); + } + return $file_dir . '/' . str_replace('tmp', $type, $file_name); + } + case 'webp': + if ('webp' == $type) { + return $this->imageConvert('webp', 'jpeg', $file); + } else { + if (rename($file, str_replace('webp', $type, $file))) { + return $file_dir . '/' . str_replace('webp', $type, $file_name); + } + } + default: + return $file; + } + } + + public function imageConvert($from='webp', $to='jpeg', $image) + { + $im = imagecreatefromwebp($image); + if (imagejpeg($im, str_replace('webp', 'jpeg', $image), 100)) { + try { + unlink($image); + } catch (Exception $e) { + $error_msg = sprintf('Error removing local file %s: %s', $image, + $e->getMessage()); + error_log($error_msg); + } + } + imagedestroy($im); + + return str_replace('webp', 'jpeg', $image); + } + + public function getAttachmentPost($filename, $url) + { + $file_info = wp_check_filetype($filename, null); + return array( + 'guid' => $url, + 'post_type' => 'attachement', + 'post_mime_type' => $file_info['type'], + 'post_title' => preg_replace('/\.[^.]+$/', '', $filename), + 'post_content' => '', + 'post_status' => 'inherit' + ); + } + +} \ No newline at end of file diff --git a/vendor/xenice/wp-framework/optimize/NoCategory.php b/vendor/xenice/src/optimize/NoCategory.php similarity index 100% rename from vendor/xenice/wp-framework/optimize/NoCategory.php rename to vendor/xenice/src/optimize/NoCategory.php diff --git a/vendor/xenice/wp-framework/optimize/Optimize.php b/vendor/xenice/src/optimize/Optimize.php similarity index 93% rename from vendor/xenice/wp-framework/optimize/Optimize.php rename to vendor/xenice/src/optimize/Optimize.php index 9cc3eaf..32c7258 100644 --- a/vendor/xenice/wp-framework/optimize/Optimize.php +++ b/vendor/xenice/src/optimize/Optimize.php @@ -37,6 +37,12 @@ public function set($options) [ 'name' => _t('Global optimization'), 'fields'=>[ + [ + 'id' => 'enable_classic_editor', + 'type' => 'checkbox', + 'value' => true, + 'label' => _t('Enable classic editor') + ], [ 'id' => 'disable_widgets', 'type' => 'checkbox', @@ -156,6 +162,12 @@ public function set($options) 'value' => false, 'label' => _t('Convert the html within the code tag to entity before saving article') ], + [ + 'id' => 'external_link_to_local', + 'type' => 'checkbox', + 'value' => false, + 'label' => _t('Save the external link image to the local') + ], [ 'id' => 'remove_image_attribute', 'type' => 'checkbox', diff --git a/vendor/xenice/wp-framework/optimize/UserOptimize.php b/vendor/xenice/src/optimize/UserOptimize.php similarity index 100% rename from vendor/xenice/wp-framework/optimize/UserOptimize.php rename to vendor/xenice/src/optimize/UserOptimize.php diff --git a/vendor/xenice/wp-framework/optimize/UserTableOptimize.php b/vendor/xenice/src/optimize/UserTableOptimize.php similarity index 100% rename from vendor/xenice/wp-framework/optimize/UserTableOptimize.php rename to vendor/xenice/src/optimize/UserTableOptimize.php diff --git a/vendor/xenice/wp-framework/optimize/lib/Avatar.php b/vendor/xenice/src/optimize/lib/Avatar.php similarity index 100% rename from vendor/xenice/wp-framework/optimize/lib/Avatar.php rename to vendor/xenice/src/optimize/lib/Avatar.php diff --git a/vendor/xenice/wp-framework/optimize/lib/Client.php b/vendor/xenice/src/optimize/lib/Client.php similarity index 100% rename from vendor/xenice/wp-framework/optimize/lib/Client.php rename to vendor/xenice/src/optimize/lib/Client.php diff --git a/vendor/xenice/wp-framework/option/Admin.php b/vendor/xenice/src/option/Admin.php similarity index 73% rename from vendor/xenice/wp-framework/option/Admin.php rename to vendor/xenice/src/option/Admin.php index c671b3d..a312579 100644 --- a/vendor/xenice/wp-framework/option/Admin.php +++ b/vendor/xenice/src/option/Admin.php @@ -68,19 +68,23 @@ public function __call($method, $args) return; } - if(!isset($option['submit'])){ - $option['submit'] = _t('Save Changes'); - } if(isset($_POST['xenice_option_key']) && check_admin_referer('xenice-options-update')){ // Delete useless elements $data = $_POST; unset($data['_wpnonce']); unset($data['_wp_http_referer']); unset($data['xenice_option_key']); + if(isset($data['xenice_tab_key'])){ + $tab = $data['xenice_tab_key']; + unset($data['xenice_tab_key']); + } + else{ + $tab = -1; + } Theme::bind('xenice_options_result',[$this,'post']); - if(Theme::call('xenice_options_save', $_POST['xenice_option_key'], $data)){ + if(Theme::call('xenice_options_save', $_POST['xenice_option_key'], $tab, $data)){ $result = []; - if($this->set($_POST['xenice_option_key'],$data)){ + if($this->set($_POST['xenice_option_key'], $tab,$data)){ $this->get(); $option = $this->options[$key]; $result['return'] = 'success'; @@ -159,12 +163,49 @@ public function __call($method, $args) =$option['title']?>
=isset($option['desc'])?''.$option['desc'].'':''?> + + '; + foreach($option['tabs'] as $key => $tab){ + if($current_tab == $tab['id']){ + $str .= ''.$tab['title'].''; + $option['fields'] = $tab['fields']; + $option['tab_key'] = $key; + if(isset($tab['submit'])){ + $option['submit'] = $tab['submit']; + } + } + else{ + $str .= ''.$tab['title'].''; + } + + } + $str .= ''; + echo $str; + } + + if(!isset($option['submit'])){ + $option['submit'] = _t('Save Changes'); + } + + ?> + - -