mirror of
https://github.com/yunluo/gdk.git
synced 2024-05-05 07:53:34 +02:00
优化
This commit is contained in:
parent
e98fa1bc6c
commit
757d36c760
|
@ -397,6 +397,12 @@ $gdk_options = [
|
|||
'id' => 'gdk_sidebar_cache',
|
||||
'type' => 'checkbox',
|
||||
],
|
||||
[
|
||||
'name' => '新窗口打开',
|
||||
'desc' => '禁用 【禁用后,所有文章链接将当前窗口打开】',
|
||||
'id' => 'gdk_target_blank',
|
||||
'type' => 'checkbox',
|
||||
],
|
||||
[
|
||||
'title' => '统一支付设置',
|
||||
'type' => 'title',
|
||||
|
|
|
@ -32,7 +32,7 @@ function gdk_ajax_get_update()
|
|||
$plugin_info = json_decode($response['body'], true);
|
||||
$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>');
|
||||
} else {
|
||||
exit('<span class="get_update_res">你的插件目前已经是最新版了!</span>');
|
||||
|
|
|
@ -1314,3 +1314,12 @@ function unzip_url($url, $where)
|
|||
usleep(300000);
|
||||
@unlink($zippath);
|
||||
}
|
||||
|
||||
//新窗口打开
|
||||
function blank_open()
|
||||
{
|
||||
if (!gdk_option('gdk_target_blank')) {
|
||||
echo 'target="_blank"';
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue