>
0) {
$logo_height = CHV\getSetting('theme_logo_height');
echo '';
}
$open_graph = [
'type' => 'website',
'url' => G\get_current_url(),
'title' => CHV\getSetting('website_doctitle'),
'image' => CHV\getSetting('homepage_cover_images')[0]['url'],
'site_name' => CHV\getSetting('website_name'),
'description' => CHV\getSetting('website_description')
];
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()['url'],
'image:width' => get_image()['width'],
'image:height' => get_image()['height']
];
if(get_image()['is_animated']) {
$open_graph_extend['type'] = 'video.other';
$open_graph_extend['url'] = get_image()['url'];
}
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 '' . "\n";
}
// Set twitter card
$twitter_card = [
'card' => 'summary',
'description' => function_exists('get_meta_description') ? get_meta_description() : NULL,
'title' => G\str_replace_last(' - ' . CHV\getSetting('website_name'), NULL, get_doctitle()),
'site' => CHV\getSetting('twitter_account') ? ('@' . CHV\getSetting('twitter_account')) : NULL
];
switch(true) {
case G\is_route('image'):
$twitter_card['card'] = 'photo';
break;
case function_exists('get_admin') and G\is_route('album'):
case function_exists('get_user') and G\is_route('user'):
$twitter_card['card'] = 'gallery';
if(G\is_route('album')) {
$twitter_card['creator'] = get_album()['user']['twitter']['username'];
} else {
$twitter_card['creator'] = get_user()['twitter']['username'];
}
$list_output = function_exists('get_list') ? get_list()->output_assoc : NULL;
if(count($list_output) > 0) {
for($i=0; $i<4; $i++) {
$twitter_card['image' . $i] = $list_output[$i]['display_url'];
}
}
break;
}
foreach($twitter_card as $k => $v) {
if(!$v) continue;
echo '' . "\n";
}
?>
-
0) {
array_unshift($categories, [
'id' => NULL,
'name' => _s('All'),
'url_key' => NULL,
'url' => G\get_base_url('explore')
]);
$cols = min(5, round(count($categories)/5, 0, PHP_ROUND_HALF_UP));
?>
-
-
-
-
-
">
-
- data-login-needed="true">
- top-btn-el">
- pop-btn pop-btn-delayed pop-account pop-keep-click">
- phone-hide top-btn-el">
- phone-hide pop-btn pop-btn-delayed pop-account pop-keep-click">
'.$notifications_display.'', ['%c' => $notifications_unread > 0 ? ' on' : NULL]);
?>
-
-
" alt="" class="user-image">
">
-
-