get_comment_time example

/* translators: Individual comment title. 1: Post title, 2: Comment author name. */
            printf( ent2ncr( __( 'Comment on %1$s by %2$s' ) )$titleget_comment_author_rss() );
        } else {
            /* translators: Comment author title. %s: Comment author name. */
            printf( ent2ncr( __( 'By: %s' ) )get_comment_author_rss() );
        }
        ?> </title> <link><?php comment_link(); ?></link> <dc:creator><![CDATA[<?php echo get_comment_author_rss(); ?>]]></dc:creator> <pubDate><?php echo mysql2date( 'D, d M Y H:i:s +0000', get_comment_time( 'Y-m-d H:i:s', true, false ), false ); ?></pubDate> <guid isPermaLink="false"><?php comment_guid(); ?></guid> <?php if ( post_password_required( $comment_post ) ) : ?> <description><?php echo ent2ncr( __( 'Protected Comments: Please enter your password to view comments.' ) ); ?></description> <content:encoded><![CDATA[<?php echo get_the_password_form(); ?>]]></content:encoded> <?php else : ?> <description><![CDATA[<?php comment_text_rss(); ?>]]></description> <content:encoded><![CDATA[<?php comment_text(); ?>]]></content:encoded> <?php endif; // End if post_password_required(). ?> <?php
<?php endif; ?> <div class="comment-meta commentmetadata"> <?php             printf(
                '<a href="%s">%s</a>',
                esc_url( get_comment_link( $comment$args ) ),
                sprintf(
                    /* translators: 1: Comment date, 2: Comment time. */
                    __( '%1$s at %2$s' ),
                    get_comment_date( '', $comment ),
                    get_comment_time()
                )
            );

            edit_comment_link( __( '(Edit)' ), ' &nbsp;&nbsp;', '' );
            ?> </div> <?php         comment_text(
            $comment,
            array_merge(
                
<?php comment_author_rss(); ?></name> <?php             if ( get_comment_author_url() ) {
                echo '<uri>' . get_comment_author_url() . '</uri>';
            }
            ?> </author> <id><?php comment_guid(); ?></id> <updated><?php echo mysql2date( 'Y-m-d\TH:i:s\Z', get_comment_time( 'Y-m-d H:i:s', true, false ), false ); ?></updated> <published><?php echo mysql2date( 'Y-m-d\TH:i:s\Z', get_comment_time( 'Y-m-d H:i:s', true, false ), false ); ?></published> <?php if ( post_password_required( $comment_post ) ) : ?> <content type="html" xml:base="<?php comment_link(); ?>"><![CDATA[<?php echo get_the_password_form(); ?>]]></content> <?php else : ?> <content type="html" xml:base="<?php comment_link(); ?>"><![CDATA[<?php comment_text(); ?>]]></content> <?php endif; // End if post_password_required(). ?> <?php         // Return comment threading information (https://www.ietf.org/rfc/rfc4685.txt).         if ( 0 == $comment->comment_parent ) : // This comment is top-level.
/** * Displays the comment time of the current comment. * * @since 0.71 * @since 6.2.0 Added the `$comment_id` parameter. * * @param string $format Optional. PHP time format. Defaults to the 'time_format' option. * @param int|WP_Comment $comment_id Optional. WP_Comment or ID of the comment for which to print the time. * Default current comment. */
function comment_time( $format = '', $comment_id = 0 ) {
    echo get_comment_time( $format, false, true, $comment_id );
}

/** * Retrieves the comment type of the current comment. * * @since 1.5.0 * @since 4.4.0 Added the ability for `$comment_id` to also accept a WP_Comment object. * * @param int|WP_Comment $comment_id Optional. WP_Comment or ID of the comment for which to get the type. * Default current comment. * @return string The comment type. */
Home | Imprint | This part of the site doesn't use cookies.