1
0
Fork 0
mirror of https://github.com/yunluo/gdk.git synced 2024-05-26 10:22:22 +02:00
This commit is contained in:
云落 2020-03-22 00:33:39 +08:00
parent e98fa1bc6c
commit 757d36c760
3 changed files with 16 additions and 1 deletions

View file

@ -397,6 +397,12 @@ $gdk_options = [
'id' => 'gdk_sidebar_cache', 'id' => 'gdk_sidebar_cache',
'type' => 'checkbox', 'type' => 'checkbox',
], ],
[
'name' => '新窗口打开',
'desc' => '禁用 【禁用后,所有文章链接将当前窗口打开】',
'id' => 'gdk_target_blank',
'type' => 'checkbox',
],
[ [
'title' => '统一支付设置', 'title' => '统一支付设置',
'type' => 'title', 'type' => 'title',

View file

@ -32,7 +32,7 @@ function gdk_ajax_get_update()
$plugin_info = json_decode($response['body'], true); $plugin_info = json_decode($response['body'], true);
$version = $plugin_info['version']; $version = $plugin_info['version'];
if (version_compare($version, GDK_PLUGIN_VER, '>')) { if (!version_compare($version, GDK_PLUGIN_VER, '<')) {
exit('<span class="get_update_res">插件有更新,新版本:<span class="key_word">' . $version . '</span> <a class="feedback add-new-h2" href="' . $plugin_info['details_url'] . '" target="_blank">查看更新内容</a></span>'); exit('<span class="get_update_res">插件有更新,新版本:<span class="key_word">' . $version . '</span> <a class="feedback add-new-h2" href="' . $plugin_info['details_url'] . '" target="_blank">查看更新内容</a></span>');
} else { } else {
exit('<span class="get_update_res">你的插件目前已经是最新版了!</span>'); exit('<span class="get_update_res">你的插件目前已经是最新版了!</span>');

View file

@ -1314,3 +1314,12 @@ function unzip_url($url, $where)
usleep(300000); usleep(300000);
@unlink($zippath); @unlink($zippath);
} }
//新窗口打开
function blank_open()
{
if (!gdk_option('gdk_target_blank')) {
echo 'target="_blank"';
}
}