コード例 #1
0
ファイル: user.php プロジェクト: denpamusic/chv_feeds
    ?>
</span>
			<h1 class="display-inline"><strong><?php 
    echo get_safe_html_user()["search"]["d"];
    ?>
</strong></h1>
		</div>
		<?php 
} else {
    ?>
		<h1 class="phone-hide"><?php 
    echo sprintf(is_user_images() ? _s("%s's Images") : _s("%s's Albums"), get_user()["name_short"]);
    ?>
</h1>
		<h1 class="phone-show hidden"><?php 
    echo is_user_images() ? _s("Images") : _s("Albums");
    ?>
</h1>
		<?php 
}
?>
        
        <?php 
G\Render\include_theme_file("snippets/tabs");
?>
        
		<?php 
if (is_owner() or is_admin()) {
    G\Render\include_theme_file("snippets/user_items_editor");
    ?>
        <div class="header-content-right phone-float-none">
コード例 #2
0
ファイル: header.php プロジェクト: denpamusic/chv_feeds
<?php 
if ((int) CHV\getSetting('theme_logo_height') > 0) {
    $logo_height = (int) CHV\getSetting('theme_logo_height');
    echo '<style type="text/css">.top-bar-logo, .top-bar-logo img { height: ' . $logo_height . 'px; } .top-bar-logo { margin-top: -' . (int) ($logo_height / 2) . 'px; } </style>';
}
?>

<?php 
$open_graph = ['type' => 'website', 'url' => G\get_current_url(), 'title' => CHV\getSetting('website_doctitle', true), 'site_name' => CHV\getSetting('website_name', true), 'description' => CHV\getSetting('website_description', true)];
switch (true) {
    case function_exists('get_image') and G\is_route("image"):
        $open_graph_extend = ['title' => get_pre_doctitle(), 'description' => get_image()['description'], 'image' => get_image()['display_url'], 'image:width' => get_image()['width'], 'image:height' => get_image()['height']];
        break;
    case function_exists('get_user') and G\is_route("user"):
        $open_graph_extend = ['type' => 'profile', 'title' => get_user()['name'], 'description' => sprintf(is_user_images() ? _s("%s's Images") : _s("%s's Albums"), get_user()["name_short"]), 'image' => get_user()['avatar']['url']];
        break;
    case function_exists('get_album') and G\is_route("album"):
        $open_graph_extend = ['title' => get_album()['name'], 'description' => get_album()['description']];
        break;
}
if ($open_graph_extend) {
    $open_graph = array_merge($open_graph, $open_graph_extend);
}
foreach ($open_graph as $k => $v) {
    if (!$v) {
        continue;
    }
    echo '<meta property="og:' . $k . '" content="' . $v . '">' . "\n";
}
?>