public function publish_date()
{
if (!is_singular('post')) {
/**
* Filter: 'wpseo_opengraph_show_publish_date' - Allow showing publication date for other post types
*
* @api bool $unsigned Whether or not to show publish date
*
* @param string $post_type The current URL's post type.
*/
if (false === apply_filters('wpseo_opengraph_show_publish_date', false, get_post_type())) {
return false;
}
}
$pub = get_the_date(DATE_W3C);
$this->og_tag('article:published_time', $pub);
$mod = get_the_modified_date(DATE_W3C);
if ($mod != $pub) {
$this->og_tag('article:modified_time', $mod);
$this->og_tag('og:updated_time', $mod);
}
return true;
}