示例#1
0
<head>
<meta charset="utf-8">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no, maximum-scale=1">
<meta name="description" content="<?php 
echo get_meta_description();
?>
">
<meta name="keywords" content="<?php 
echo get_meta_keywords();
?>
">

<title><?php 
echo get_doctitle();
?>
</title>

<?php 
CHV\Render\include_peafowl_head();
?>

<link rel="stylesheet" href="<?php 
echo CHV\Render\versionize_src(CHV\Render\get_theme_file_url('style.css'));
?>
">
<link rel="stylesheet" href="<?php 
echo CHV\Render\versionize_src(CHV\Render\get_theme_file_url('custom_hooks/style.css'));
?>
">
function show_chevereto_header()
{
    $doctitle = check_value(get_doctitle()) ? get_doctitle() . ' - ' : '';
    $html = '<script type="text/javascript" src="' . __CHV_URL_SYSTEM_JS__ . conditional_minify('jquery.js') . '"></script>
<script type="text/javascript" src="' . __CHV_URL_SYSTEM_JS__ . conditional_minify('jquery.uploadify-3.1_chevereto.js') . '"></script>
<script type="text/javascript" src="' . __CHV_URL_SYSTEM_JS__ . conditional_minify('functions.js') . '"></script>
<script type="text/javascript" src="' . __CHV_URL_SYSTEM_JS__ . conditional_minify('chevereto.js') . '"></script>
<script type="text/javascript" src="' . __CHV_URL_THEME__ . conditional_minify('theme.js') . '"></script>

<link type="text/css" href="' . __CHV_URL_THEME__ . conditional_minify('style.css') . '" rel="stylesheet" />
<link type="text/css" href="' . __CHV_URL_THEME__ . conditional_minify('uploadify.css') . '" rel="stylesheet" />
<link type="image/x-icon" href="' . __CHV_URL_THEME__ . 'favicon.ico" rel="shortcut icon"  />

<meta name="generator" content="Chevereto ' . get_chevereto_version() . '" />

<meta name="description" content="' . chevereto_config('meta_description') . '" />
<meta name="keywords" content="' . chevereto_config('meta_keywords') . '" />

<title>' . $doctitle . chevereto_config('doctitle') . '</title>

<script type="text/javascript">
	var base_url = "' . __CHV_BASE_URL__ . '";
	var base_url_js = "' . __CHV_URL_SYSTEM_JS__ . '";
	var uploadify_swf = "' . absolute_to_relative(__CHV_PATH_SYSTEM_JS__) . 'uploadify.swf";
	var uploader_file = "' . __CHV_RELATIVE_ROOT__ . 'upload.php";
	var zeroclip_swf = "' . __CHV_URL_SYSTEM_JS__ . 'ZeroClipboard.swf";
	var session_id = "' . session_id() . '";
	var virtual_url_image = "' . __CHV_BASE_URL__ . __CHV_VIRTUALFOLDER_IMAGE__ . '/";
	var virtual_url_uploaded = "' . __CHV_BASE_URL__ . __CHV_VIRTUALFOLDER_UPLOADED__ . '/";
	var config = {
		doctitle : "' . chevereto_config('doctitle') . '",
		virtual_folder_image : "' . chevereto_config('virtual_folder_image') . '",
		virtual_folder_uploaded : "' . chevereto_config('virtual_folder_uploaded') . '",
		max_filesize : "' . chevereto_config('max_filesize') . '",
		min_resize_size : ' . chevereto_config('min_resize_size') . ',
		max_resize_size : ' . chevereto_config('max_resize_size') . ',
		multiupload : ' . (chevereto_config('multiupload') ? "true" : "false") . ',
		multiupload_limit : ' . chevereto_config('multiupload_limit') . ',
		error_reporting : ' . (chevereto_config('error_reporting') ? "true" : "false") . '
	}
	var ImagesUp = ' . json_encode(get_uploaded_images()) . ';
	var lang = ' . json_encode(get_chevereto_safe_lang()) . ';
</script>';
    if (check_value(chevereto_config('facebook_app_id'))) {
        $html .= "\n\n";
        $html .= '<meta property="fb:app_id" content="' . chevereto_config('facebook_app_id') . '" />' . "\n";
        $html .= '<script type="text/javascript">
	(function(d, s, id) {
		  var js, fjs = d.getElementsByTagName(s)[0];
		  if (d.getElementById(id)) return;
		  js = d.createElement(s); js.id = id;
		  js.src = "//connect.facebook.net/' . get_lang_locale() . '/all.js#xfbml=1&appId=' . chevereto_config('facebook_app_id') . '";
		  fjs.parentNode.insertBefore(js, fjs);
		}(document, "script", "facebook-jssdk"));' . "\n";
        $html .= '</script>' . "\n";
    }
    $ga = get_google_analytics();
    $html .= $ga ? "\n" . $ga . "\n" : '';
    $html .= "\n" . '<noscript><meta http-equiv="refresh" content="0;url=' . __CHV_BASE_URL__ . 'error-javascript" /></noscript>' . "\n";
    echo $html;
}