get_the_time WordPress Filter Hook

The get_the_time WordPress hook is used to get the time for a given post. It takes two parameters: the first is the post ID, and the second is the format string. The format string can be either 'G', 'U', or 'F'.

apply_filters( 'get_the_time', string|int $the_time, string $format, WP_Post $post ) #

Filters the time a post was written.


Parameters

$the_time

(string|int)Formatted date string or Unix timestamp if $format is 'U' or 'G'.

$format

(string)Format to use for retrieving the time the post was written. Accepts 'G', 'U', or PHP date format.

$post

(WP_Post)Post object.


Top ↑

Source

File: wp-includes/general-template.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
1.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More