Fix blog_slug not being global

This commit is contained in:
Vencislav Atanasov 2023-09-08 13:20:44 +03:00
parent aa75f2f60f
commit 6a27f51189
1 changed files with 2 additions and 0 deletions

View File

@ -9,6 +9,8 @@ add_filter( 'the_excerpt', 'do_shortcode');
// OpenGraph image for FB/Twitter // OpenGraph image for FB/Twitter
function og_image( $tags ) { function og_image( $tags ) {
global $blog_slug;
$imagePath = __DIR__ . '/img/' . $blog_slug . '_fb_preview.jpg'; $imagePath = __DIR__ . '/img/' . $blog_slug . '_fb_preview.jpg';
if (file_exists($imagePath)) { if (file_exists($imagePath)) {