• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.
  • Chevereto Support CLST

    Support response

    Support checklist

twitter card

Theme overrides: https://chevereto.com/docs/theme

app/themes/Peafowl/head.php

PHP:
// 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 (is_array($list_output) && 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 '<meta name="twitter:'.$k.'" content="'.$v.'">'."\n";
}
 
Back
Top