astra_post_date( string $get_for = 'single-post' )
Function to get Date of Post
Description
Parameters
- $get_for
-
(string) (Optional) Get for single/related post/etc.
Default value: 'single-post'
Return
(string) Markup.
Source
File: inc/blog/blog-config.php
function astra_post_date() { $output = ''; $format = apply_filters( 'astra_post_date_format', '' ); $time_string = esc_html( get_the_date( $format ) ); $modified_date = esc_html( get_the_modified_date( $format ) ); $posted_on = sprintf( esc_html( '%s' ), $time_string ); $modified_on = sprintf( esc_html( '%s' ), $modified_date ); $output .= '<span class="posted-on">'; $output .= '<span class="published" itemprop="datePublished"> ' . $posted_on . '</span>'; $output .= '<span class="updated" itemprop="dateModified"> ' . $modified_on . '</span>'; $output .= '</span>'; return apply_filters( 'astra_post_date', $output ); }
Expand full source code Collapse full source code View on Trac