/**
 * Get extra meta tags that need to go into the page header
 *
 * @param object $oublog
 * @param object $bloginstance
 * @param int $groupid
 * @param object $context
 * @return string
 */
function oublog_get_meta_tags($oublog, $bloginstance, $groupid, $cm, $post = null)
{
    global $CFG;
    $meta = '';
    $blogurlatom = oublog_get_feedurl('atom', $oublog, $bloginstance, $groupid, false, false, $cm);
    $blogurlrss = oublog_get_feedurl('rss', $oublog, $bloginstance, $groupid, false, false, $cm);
    if ($CFG->enablerssfeeds) {
        $meta .= '<link rel="alternate" type="application/atom+xml" title="' . get_string('atomfeed', 'oublog') . '" href="' . $blogurlatom . '" />';
        $meta .= '<link rel="alternate" type="application/atom+xml" title="' . get_string('rssfeed', 'oublog') . '" href="' . $blogurlrss . '" />';
    }
    if (isset($post)) {
        $postname = !empty($post->title) ? $post->title : get_string('untitledpost', 'oublog');
        $meta .= '<meta property="og:type" content="article" />';
        $meta .= '<meta property="og:title" content="' . $postname . '" />';
        $meta .= '<meta property="og:description" content="' . $oublog->name . '" />';
        $meta .= '<meta property="og:url" content="' . $CFG->wwwroot . '/mod/oublog/viewpost.php?post=' . $post->id . '" />';
    }
    return $meta;
}
/**
 * Get extra meta tags that need to go into the page header
 *
 * @param object $oublog
 * @param object $bloginstance
 * @param int $groupid
 * @param object $context
 * @return string
 */
function oublog_get_meta_tags($oublog, $bloginstance, $groupid, $cm)
{
    global $CFG;
    $meta = '';
    $blogurlatom = oublog_get_feedurl('atom', $oublog, $bloginstance, $groupid, false, false, $cm);
    $blogurlrss = oublog_get_feedurl('rss', $oublog, $bloginstance, $groupid, false, false, $cm);
    if ($CFG->enablerssfeeds) {
        $meta .= '<link rel="alternate" type="application/atom+xml" title="' . get_string('atomfeed', 'oublog') . '" href="' . $blogurlatom . '" />';
        $meta .= '<link rel="alternate" type="application/atom+xml" title="' . get_string('rssfeed', 'oublog') . '" href="' . $blogurlrss . '" />';
    }
    return $meta;
}