function gk_theme_options_show_page() { $option_name = basename($_GET['page']); include get_gk_file('options/' . $option_name . '.php'); }
function widget($args, $instance) { include get_gk_file('widgets/nav_menu.php'); }
return __PURL__ . '/' . $path; } } function gk_url($path) { echo get_gk_url(); } //加载配置 gk_config(include __PROOT__ . '/config/config.php'); if (IS_CHILD && file_exists(__ROOT__ . '/config/config.php')) { gk_config(include __ROOT__ . '/config/config.php'); } //加载扩展配置 $ext_config = gk_config('ext_config'); foreach ($ext_config as $config_name) { $config_value = (include get_gk_file('config/' . $config_name . '.php')); gk_config($config_name, $config_value); } /*if(is_admin()){ //升级检查 $gkwp_check_upgrade=get_option('gkwp_check_upgrade'); if(!$gkwp_check_upgrade || $gkwp_check_upgrade['last_time']<strtotime('-1 day')){ //每天连接网络检查一次 $text=@file_get_contents('http://sinaclouds.sinaapp.com/thinkapi/gkwp_upgrade.php?version='.$gkwp_version,false,stream_context_create(array('http'=>array('timeout'=>10)))); if($text && ($upgrade_info=json_decode($text,true))){ $gkwp_check_upgrade=array( 'latest_version'=>$upgrade_info['version'], 'latest_msg'=>$upgrade_info['msg'], 'last_time'=>time() ); update_option('gkwp_check_upgrade',$gkwp_check_upgrade);