ap_get_last_active( mixed $post_id = null )

Description #

Get last active time in human readable format.

Parameters #

  • $post_id
    mixed (Optional) Post ID/Object. Default value: null

Changelog #

VersionDescription
2.4.8Introduced.

Source #

File: includes/qaquery.php

function ap_get_last_active( $post_id = null ) {
	$p = ap_get_post( $post_id );
	if ( $p ) {
		$date = ! empty( $p->last_updated ) ? $p->last_updated : $p->post_modified_gmt;
		return ap_human_time( get_gmt_from_date( $date ), false );
	}
	return __( 'Invalid post', 'anspress-question-answer' );
}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment