Пример #1
0
/**
 * Function to print the html <title>title</title> within the <head> of a html page based on the current theme page
 * Usefull if you use one header.php for the header of all theme pages instead of individual ones on the theme pages
 * It prints the title and site name including the <title> tag in reversed breadcrumb order:
 * <title><title of current page> | <parent item if present> | <gallery title></title>
 * It supports standard gallery pages as well a custom and Zenpage news articles, categories and pages.
 *
 * @param string $separator How you wish the parts to be separated
 * @param bool $listparentalbums If the parent albums should be printed in reversed order before the current
 * @param bool $listparentpage If the parent Zenpage pages should be printed in reversed order before the current page
 */
function printHeadTitle($separator = ' | ', $listparentalbums = true, $listparentpages = true)
{
    echo '<title>' . getHeadTitle($separator, $listparentalbums, $listparentpages) . '</title>';
}
<li class="sb_google sb_icon">
<a href="https://plus.google.com/share?url=<?php 
echo $linkUrl;
?>
&amp;t=<?php 
echo urlencode(getHeadTitle());
?>
" target="_blank" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;"><span class="vk_icon_w_r_sns_google icon_sns"></span><span class="sns_txt">Google+</span></a>
</li>

<?php 
if (wp_is_mobile()) {
    ?>
<li class="sb_line sb_icon">
<a href="line://msg/text/<?php 
    echo getHeadTitle() . ' ' . $linkUrl;
    ?>
"><span class="vk_icon_w_r_sns_line icon_sns"></span><span class="sns_txt">LINE</span></a>
</li>
<?php 
}
?>

<li class="sb_pocket"><?php 
/* do not delete span */
?>
<span></span>
<a data-pocket-label="pocket" data-pocket-count="horizontal" class="pocket-btn" data-save-url="<?php 
echo $linkUrl;
?>
" data-lang="en"></a>
Пример #3
0
/**
 * Print any Javascript required by zenphoto.
 */
function printThemeHeadItems()
{
    global $_zp_current_album;
    printStandardMeta();
    ?>
	<title><?php 
    echo getHeadTitle(getOption('theme_head_separator'), getOption('theme_head_listparents'));
    ?>
</title>

	<script type="text/javascript" src="<?php 
    echo WEBPATH . "/" . ZENFOLDER;
    ?>
/js/jquery.js"></script>
	<script type="text/javascript" src="<?php 
    echo WEBPATH . "/" . ZENFOLDER;
    ?>
/js/zenphoto.js"></script>
	<?php 
    if (zp_loggedin()) {
        ?>
		<link rel="stylesheet" href="<?php 
        echo WEBPATH . '/' . ZENFOLDER;
        ?>
/toolbox.css" type="text/css" />

		<script type="text/javascript">
			// <!-- <![CDATA[
			var deleteAlbum1 = "<?php 
        echo gettext("Are you sure you want to delete this entire album?");
        ?>
";
			var deleteAlbum2 = "<?php 
        echo gettext("Are you Absolutely Positively sure you want to delete the album? THIS CANNOT BE UNDONE!");
        ?>
";
			var deleteImage = "<?php 
        echo gettext("Are you sure you want to delete the image? THIS CANNOT BE UNDONE!");
        ?>
";
			var deleteArticle = "<?php 
        echo gettext("Are you sure you want to delete this article? THIS CANNOT BE UNDONE!");
        ?>
";
			var deletePage = "<?php 
        echo gettext("Are you sure you want to delete this page? THIS CANNOT BE UNDONE!");
        ?>
";


			function newAlbum(folder, albumtab) {
				var album = prompt('<?php 
        echo gettext('New album name?');
        ?>
', '<?php 
        echo gettext('new album');
        ?>
');
				if (album) {
					launchScript('<?php 
        echo PROTOCOL . '://' . $_SERVER['HTTP_HOST'] . WEBPATH . "/" . ZENFOLDER;
        ?>
/admin-edit.php', ['action=newalbum', 'album=' + encodeURIComponent(folder), 'name=' + encodeURIComponent(album), 'albumtab=' + albumtab, 'XSRFToken=<?php 
        echo getXSRFToken('newalbum');
        ?>
']);
				}
			}
			// ]]> -->
		</script>
		<?php 
    }
}
} else {
    $card_image_url = isset($biz_vektor_options['ogpImage']) ? $biz_vektor_options['ogpImage'] : '';
}
// domain
preg_match('/https?:\\/\\/(.+?)\\//i', admin_url(), $match);
// image size
if (isset($biz_vektor_options['twitter']) && $biz_vektor_options['twitter'] && $card_image_url) {
    ?>
<!-- twitter card -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:description" content="<?php 
    getHeadDescription();
    ?>
">
<meta name="twitter:title" content="<?php 
    echo getHeadTitle();
    ?>
">
<meta name="twitter:url" content="<?php 
    echo $linkUrl;
    ?>
">
<meta name="twitter:image" content="<?php 
    echo esc_url($card_image_url);
    ?>
">
<meta name="twitter:domain" content="<?php 
    echo $match[1];
    ?>
">
<meta name="twitter:site" content="@<?php 
" target="_blank" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');return false;" ><span class="vk_icon_w_r_sns_twitter icon_sns"></span><span class="sns_txt">twitter</span></a>
</li>

<li class="sb_google sb_icon">
<a href="https://plus.google.com/share?url=<?php 
echo $linkUrl;
?>
&amp;t=<?php 
echo urlencode(getHeadTitle());
?>
" target="_blank" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;"><span class="vk_icon_w_r_sns_google icon_sns"></span><span class="sns_txt">Google+</span></a>
</li>

<li class="sb_line sb_icon">
<a href="http://line.naver.jp/R/msg/text/?<?php 
echo urlencode(getHeadTitle());
?>
%0D%0A<?php 
echo $linkUrl;
?>
"><span class="vk_icon_w_r_sns_line icon_sns"></span><span class="sns_txt">LINE</span></a>
</li>

<li class="sb_pocket"><?php 
/* do not delete span */
?>
<span></span>
<a data-pocket-label="pocket" data-pocket-count="horizontal" class="pocket-btn" data-save-url="<?php 
echo $linkUrl;
?>
" data-lang="en"></a>