Advertisements

get_post_modified_time

Definition:
function get_post_modified_time( $d = 'U', $gmt = false, $post = null, $translate = false ) {}

Retrieve the time at which the post was last modified.

Parameters

  • string $d: Optional, default is ‘U’. Either ‘G’, ‘U’, or php date format.
  • bool $gmt: Optional, default is false. Whether to return the gmt time.
  • int|object $post: Optional, default is global post object. A post_id or post object
  • bool $translate: Optional, default is false. Whether to translate the result

Return values

returns:Returns timestamp

Defined filters

  • get_post_modified_time
    apply_filters('get_post_modified_time', $time, $d, $gmt)

Source code

function get_post_modified_time( $d = 'U', $gmt = false, $post = null, $translate = false ) {

	$post = get_post($post);



	if ( $gmt )

		$time = $post->post_modified_gmt;

	else

		$time = $post->post_modified;

	$time = mysql2date($d, $time, $translate);



	return apply_filters('get_post_modified_time', $time, $d, $gmt);

}

1601

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: