$download_id]); if (dbrows($result)) { $data = dbarray($result); $info['url'] = $settings['siteurl'].'infusions/downloads/downloads.php?download_id='.$download_id; $info['keywords'] = $data['download_keywords'] ? $data['download_keywords'] : $settings['keywords']; $info['title'] = $data['download_title'].' - '.$settings['sitename']; $info['description'] = $data['download_description_short'] ? fusion_first_words(strip_tags(html_entity_decode($data['download_description_short'])), 50) : $settings['description']; $info['type'] = 'article'; if (!empty($data['download_image_thumb'])) { $info['image'] = $settings['siteurl'].'infusions/downloads/images/'.$data['download_image_thumb']; } else { $info['image'] = defined('THEME_ICON') ? THEME_ICON.'mstile-150x150.png' : $settings['siteurl'].'images/favicons/mstile-150x150.png'; } } OpenGraphDownloads::setValues($info); } public static function ogDownloadCat($cat_id = 0) { $settings = fusion_get_settings(); $info = []; $result = dbquery("SELECT download_cat_name, download_cat_description FROM ".DB_DOWNLOAD_CATS." WHERE download_cat_id=:cat_id", [':cat_id' => $cat_id]); if (dbrows($result)) { $data = dbarray($result); $info['url'] = $settings['siteurl'].'infusions/downloads/downloads.php?cat_id='.$cat_id; $info['keywords'] = $settings['keywords']; $info['title'] = $data['download_cat_name'].' - '.$settings['sitename']; $info['description'] = $data['download_cat_description'] ? fusion_first_words(strip_tags(html_entity_decode($data['download_cat_description'])), 50) : $settings['description']; $info['type'] = 'website'; $info['image'] = defined('THEME_ICON') ? THEME_ICON.'mstile-150x150.png' : $settings['siteurl'].'images/favicons/mstile-150x150.png'; } OpenGraphDownloads::setValues($info); } }