get_post_modified_time example


            do_action( 'atom_author' );
            ?> </author> <title type="<?php html_type_rss(); ?>"><![CDATA[<?php the_title_rss(); ?>]]></title> <link rel="alternate" type="<?php bloginfo_rss( 'html_type' ); ?>" href="<?php the_permalink_rss(); ?>" /> <id><?php the_guid(); ?></id> <updated><?php echo get_post_modified_time( 'Y-m-d\TH:i:s\Z', true ); ?></updated> <published><?php echo get_post_time( 'Y-m-d\TH:i:s\Z', true ); ?></published> <?php the_category_rss( 'atom' ); ?> <summary type="<?php html_type_rss(); ?>"><![CDATA[<?php the_excerpt_rss(); ?>]]></summary> <?php if ( ! get_option( 'rss_use_excerpt' ) ) : ?> <content type="<?php html_type_rss(); ?>" xml:base="<?php the_permalink_rss(); ?>"><![CDATA[<?php the_content_feed( 'atom' ); ?>]]></content> <?php endif; ?> <?php         atom_enclosure();

        

function get_the_modified_date( $format = '', $post = null ) {
    $post = get_post( $post );

    if ( ! $post ) {
        // For backward compatibility, failures go through the filter below.         $the_time = false;
    } else {
        $_format = ! empty( $format ) ? $format : get_option( 'date_format' );

        $the_time = get_post_modified_time( $_format, false, $post, true );
    }

    /** * Filters the date a post was last modified. * * @since 2.1.0 * @since 4.6.0 Added the `$post` parameter. * * @param string|int|false $the_time The formatted date or false if no post is found. * @param string $format PHP date format. * @param WP_Post|null $post WP_Post object or null if no post is found. */
Home | Imprint | This part of the site doesn't use cookies.