You appear to be a bot. Output may be restricted
Description
Output the article publish and last modification date.
Usage
$boolean; = WPSEO_OpenGraph::publish_date();
Parameters
Returns
boolean;
Source
File name: wordpress-seo/frontend/class-opengraph.php
Lines:
1 to 31 of 31
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; } } $post = get_post(); $pub = $this->date->format( $post->post_date_gmt ); $this->og_tag( 'article:published_time', $pub ); $mod = $this->date->format( $post->post_modified_gmt ); if ( $mod !== $pub ) { $this->og_tag( 'article:modified_time', $mod ); $this->og_tag( 'og:updated_time', $mod ); } return true; }