update manifest
This commit is contained in:
parent
443894d488
commit
6b8e7b0ede
|
@ -351,9 +351,9 @@ function feature_gallery() {
|
|||
$img = array_rand($img_array);
|
||||
$img_domain = akina_option('cover_cdn') ? akina_option('cover_cdn') : get_template_directory_uri();
|
||||
if(strpos($_SERVER['HTTP_ACCEPT'], 'image/webp')) {
|
||||
$imgurl = $img_domain . "/manifest/" . $img_array[$img]["webp"][1];
|
||||
$imgurl = $img_domain . "/manifest/" . $img_array[$img]["webp"][0];
|
||||
} else {
|
||||
$imgurl = $img_domain . "/manifest/" . $img_array[$img]["jpeg"][1];
|
||||
$imgurl = $img_domain . "/manifest/" . $img_array[$img]["jpeg"][0];
|
||||
}
|
||||
$data = array('cover image');
|
||||
$response = new WP_REST_Response($data);
|
||||
|
|
Binary file not shown.
|
@ -1,8 +1,8 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Sakura\n"
|
||||
"POT-Creation-Date: 2019-12-15 14:40+0800\n"
|
||||
"PO-Revision-Date: 2019-12-15 14:40+0800\n"
|
||||
"POT-Creation-Date: 2019-12-21 20:24+0800\n"
|
||||
"PO-Revision-Date: 2019-12-21 20:24+0800\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"Language: en_US\n"
|
||||
|
@ -1303,14 +1303,14 @@ msgid ""
|
|||
msgstr ""
|
||||
|
||||
#: options.php:879
|
||||
msgid "Cover CDN"
|
||||
msgid "Cover manifest"
|
||||
msgstr ""
|
||||
|
||||
#: options.php:880
|
||||
#, php-format
|
||||
msgid ""
|
||||
"Fill in the cdn path for random picture display, without adding a slash at "
|
||||
"the end, for example: https://cdn.jsdelivr.net/gh/mashirozx/sakura@3.3.3, "
|
||||
"Fill in the manifest path for random picture display, without adding a slash "
|
||||
"at the end, for example: https://cdn.jsdelivr.net/gh/mashirozx/sakura@3.3.3, "
|
||||
"please refer to <a href = \"https: //github.com/mashirozx/Sakura/wiki/options"
|
||||
"\">Wiki </a>. Click <a href = \"%s\">here</a> to update manifest"
|
||||
msgstr ""
|
||||
|
|
|
@ -3,7 +3,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
||||
"Project-Id-Version: Sakura\n"
|
||||
"POT-Creation-Date: 2019-12-15 14:40+0800\n"
|
||||
"POT-Creation-Date: 2019-12-21 20:23+0800\n"
|
||||
"PO-Revision-Date: 2019-11-01 14:27+0800\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
|
@ -1287,13 +1287,13 @@ msgid ""
|
|||
msgstr ""
|
||||
|
||||
#: options.php:879
|
||||
msgid "Cover CDN"
|
||||
msgid "Cover manifest"
|
||||
msgstr ""
|
||||
|
||||
#: options.php:880
|
||||
#, php-format
|
||||
msgid ""
|
||||
"Fill in the cdn path for random picture display, without adding a slash at the end, for "
|
||||
"Fill in the manifest path for random picture display, without adding a slash at the end, for "
|
||||
"example: https://cdn.jsdelivr.net/gh/mashirozx/sakura@3.3.3, please refer to <a href = "
|
||||
"\"https: //github.com/mashirozx/Sakura/wiki/options\">Wiki </a>. Click <a href = \"%s\">here</"
|
||||
"a> to update manifest"
|
||||
|
|
Binary file not shown.
|
@ -1,8 +1,8 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Sakura\n"
|
||||
"POT-Creation-Date: 2019-12-15 14:41+0800\n"
|
||||
"PO-Revision-Date: 2019-12-15 14:41+0800\n"
|
||||
"POT-Creation-Date: 2019-12-21 20:23+0800\n"
|
||||
"PO-Revision-Date: 2019-12-21 20:24+0800\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"Language: zh_CN\n"
|
||||
|
@ -1324,27 +1324,21 @@ msgstr ""
|
|||
"名/2018/05/xx.png 加载"
|
||||
|
||||
#: options.php:879
|
||||
msgid "Cover CDN"
|
||||
msgstr "封面图图片库"
|
||||
msgid "Cover manifest"
|
||||
msgstr ""
|
||||
|
||||
#: options.php:880
|
||||
#, fuzzy, php-format
|
||||
#| msgid ""
|
||||
#| "Fill in the cdn path for random picture display, without adding a slash "
|
||||
#| "at the end, for example: https://cdn.jsdelivr.net/gh/mashirozx/"
|
||||
#| "sakura@3.3.3, please refer to <a href = \"https: //github.com/mashirozx/"
|
||||
#| "Sakura/wiki/options\">Wiki </a>. Click <a href = \"%s\">here</> to update "
|
||||
#| "manifest"
|
||||
#, php-format
|
||||
msgid ""
|
||||
"Fill in the cdn path for random picture display, without adding a slash at "
|
||||
"the end, for example: https://cdn.jsdelivr.net/gh/mashirozx/sakura@3.3.3, "
|
||||
"Fill in the manifest path for random picture display, without adding a slash "
|
||||
"at the end, for example: https://cdn.jsdelivr.net/gh/mashirozx/sakura@3.3.3, "
|
||||
"please refer to <a href = \"https: //github.com/mashirozx/Sakura/wiki/options"
|
||||
"\">Wiki </a>. Click <a href = \"%s\">here</a> to update manifest"
|
||||
msgstr ""
|
||||
"填写 cdn 路径,用于随机图片展示,最后不用加斜杠,例:https://cdn.jsdelivr."
|
||||
"net/gh/mashirozx/sakura@3.3.3 ,更多信息请参考<a href=\"https://github.com/"
|
||||
"mashirozx/Sakura/wiki/options\">Wiki</a>。点击<a href =\"%s\">这里</a>更新"
|
||||
"manifest"
|
||||
"填写 manifest 路径,用于随机图片展示,最后不用加斜杠,例:https://cdn."
|
||||
"jsdelivr.net/gh/mashirozx/sakura@3.3.3 ,更多信息请参考<a href=\"https://"
|
||||
"github.com/mashirozx/Sakura/wiki/options\">Wiki</a>。点击<a href =\"%s\">这里"
|
||||
"</a>更新manifest"
|
||||
|
||||
#: options.php:886
|
||||
msgid "Use the front-end library locally (lib.js、lib.css)"
|
||||
|
@ -1858,6 +1852,9 @@ msgstr "注 册"
|
|||
msgid "Registration is not open yet."
|
||||
msgstr "暂未开放注册。"
|
||||
|
||||
#~ msgid "Cover CDN"
|
||||
#~ msgstr "封面图图片库"
|
||||
|
||||
#~ msgid "Jsdelivr CDN"
|
||||
#~ msgstr "随机图片"
|
||||
|
||||
|
|
|
@ -44,7 +44,10 @@ class Single(object):
|
|||
def main(self):
|
||||
self.hash()
|
||||
# if os.path.exists(self.jpeg) and os.path.exists(self.webp):
|
||||
try:
|
||||
self.optimize()
|
||||
except OSError:
|
||||
print("Falied to optimize the picture: " + self.file)
|
||||
self.manifest()
|
||||
return self.mani
|
||||
|
||||
|
|
|
@ -876,8 +876,8 @@ function optionsframework_options() {
|
|||
'type' => 'text');
|
||||
|
||||
$options[] = array(
|
||||
'name' => __('Cover CDN', 'sakura'),/*封面图片库*/
|
||||
'desc' => sprintf(__('Fill in the cdn path for random picture display, without adding a slash at the end, for example: https://cdn.jsdelivr.net/gh/mashirozx/sakura@3.3.3, please refer to <a href = "https: //github.com/mashirozx/Sakura/wiki/options">Wiki </a>. Click <a href = "%s">here</a> to update manifest', 'sakura'), rest_url('sakura/v1/database/update')),/*填写 cdn 路径,用于随机图片展示,最后不用加斜杠,例:https://cdn.jsdelivr.net/gh/mashirozx/sakura@3.3.3 ,更多信息请参考<a href="https://github.com/mashirozx/Sakura/wiki/options">Wiki</a>*/
|
||||
'name' => __('Cover manifest', 'sakura'),/*封面图片库*/
|
||||
'desc' => sprintf(__('Fill in the manifest path for random picture display, without adding a slash at the end, for example: https://cdn.jsdelivr.net/gh/mashirozx/sakura@3.3.3, please refer to <a href = "https: //github.com/mashirozx/Sakura/wiki/options">Wiki </a>. Click <a href = "%s">here</a> to update manifest', 'sakura'), rest_url('sakura/v1/database/update')),/*填写 manifest 路径 ,用于随机图片展示,最后不用加斜杠,例:https://cdn.jsdelivr.net/gh/mashirozx/sakura@3.3.3 ,更多信息请参考<a href="https://github.com/mashirozx/Sakura/wiki/options">Wiki</a>*/
|
||||
'id' => 'cover_cdn',
|
||||
'std' => 'https://cdn.jsdelivr.net/gh/mashirozx/sakura@3.3.3',
|
||||
'type' => 'text');
|
||||
|
|
Loading…
Reference in New Issue