@@ -2716,8 +2716,8 @@ function the_date( $format = '', $before = '', $after = '', $display = true ) {
27162716 *
27172717 * @since 3.0.0
27182718 *
2719- * @param string $format Optional. PHP date format. Defaults to the 'date_format' option.
2720- * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default current post.
2719+ * @param string $format Optional. PHP date format. Defaults to the 'date_format' option.
2720+ * @param int|WP_Post|null $post Optional. Post ID or WP_Post object. Default current post.
27212721 * @return string|int|false Date the current post was written. False on failure.
27222722 */
27232723function get_the_date ( $ format = '' , $ post = null ) {
@@ -2782,8 +2782,8 @@ function the_modified_date( $format = '', $before = '', $after = '', $display =
27822782 * @since 2.1.0
27832783 * @since 4.6.0 Added the `$post` parameter.
27842784 *
2785- * @param string $format Optional. PHP date format. Defaults to the 'date_format' option.
2786- * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default current post.
2785+ * @param string $format Optional. PHP date format. Defaults to the 'date_format' option.
2786+ * @param int|WP_Post|null $post Optional. Post ID or WP_Post object. Default current post.
27872787 * @return string|int|false Date the current post was modified. False on failure.
27882788 */
27892789function get_the_modified_date ( $ format = '' , $ post = null ) {
@@ -2838,10 +2838,10 @@ function the_time( $format = '' ) {
28382838 *
28392839 * @since 1.5.0
28402840 *
2841- * @param string $format Optional. Format to use for retrieving the time the post
2842- * was written. Accepts 'G', 'U', or PHP date format.
2843- * Defaults to the 'time_format' option.
2844- * @param int|WP_Post $post Post ID or post object. Default is global `$post` object.
2841+ * @param string $format Optional. Format to use for retrieving the time the post
2842+ * was written. Accepts 'G', 'U', or PHP date format.
2843+ * Defaults to the 'time_format' option.
2844+ * @param int|WP_Post|null $post Post ID or post object. Default is global `$post` object.
28452845 * @return string|int|false Formatted date string or Unix timestamp if `$format` is 'U' or 'G'.
28462846 * False on failure.
28472847 */
@@ -2874,11 +2874,11 @@ function get_the_time( $format = '', $post = null ) {
28742874 *
28752875 * @since 2.0.0
28762876 *
2877- * @param string $format Optional. Format to use for retrieving the time the post
2878- * was written. Accepts 'G', 'U', or PHP date format. Default 'U'.
2879- * @param bool $gmt Optional. Whether to retrieve the GMT time. Default false.
2880- * @param int|WP_Post $post Post ID or post object. Default is global `$post` object.
2881- * @param bool $translate Whether to translate the time string. Default false.
2877+ * @param string $format Optional. Format to use for retrieving the time the post
2878+ * was written. Accepts 'G', 'U', or PHP date format. Default 'U'.
2879+ * @param bool $gmt Optional. Whether to retrieve the GMT time. Default false.
2880+ * @param int|WP_Post|null $post Post ID or post object. Default is global `$post` object.
2881+ * @param bool $translate Whether to translate the time string. Default false.
28822882 * @return string|int|false Formatted date string or Unix timestamp if `$format` is 'U' or 'G'.
28832883 * False on failure.
28842884 */
@@ -2938,11 +2938,11 @@ function get_post_time( $format = 'U', $gmt = false, $post = null, $translate =
29382938 *
29392939 * @since 5.3.0
29402940 *
2941- * @param int|WP_Post $post Optional. Post ID or post object. Default is global `$post` object.
2942- * @param string $field Optional. Published or modified time to use from database. Accepts 'date' or 'modified'.
2943- * Default 'date'.
2944- * @param string $source Optional. Local or UTC time to use from database. Accepts 'local' or 'gmt'.
2945- * Default 'local'.
2941+ * @param int|WP_Post|null $post Optional. Post ID or post object. Default is global `$post` object.
2942+ * @param string $field Optional. Published or modified time to use from database. Accepts 'date' or 'modified'.
2943+ * Default 'date'.
2944+ * @param string $source Optional. Local or UTC time to use from database. Accepts 'local' or 'gmt'.
2945+ * Default 'local'.
29462946 * @return DateTimeImmutable|false Time object on success, false on failure.
29472947 */
29482948function get_post_datetime ( $ post = null , $ field = 'date ' , $ source = 'local ' ) {
@@ -2983,9 +2983,9 @@ function get_post_datetime( $post = null, $field = 'date', $source = 'local' ) {
29832983 *
29842984 * @since 5.3.0
29852985 *
2986- * @param int|WP_Post $post Optional. Post ID or post object. Default is global `$post` object.
2987- * @param string $field Optional. Published or modified time to use from database. Accepts 'date' or 'modified'.
2988- * Default 'date'.
2986+ * @param int|WP_Post|null $post Optional. Post ID or post object. Default is global `$post` object.
2987+ * @param string $field Optional. Published or modified time to use from database. Accepts 'date' or 'modified'.
2988+ * Default 'date'.
29892989 * @return int|false Unix timestamp on success, false on failure.
29902990 */
29912991function get_post_timestamp ( $ post = null , $ field = 'date ' ) {
@@ -3026,10 +3026,10 @@ function the_modified_time( $format = '' ) {
30263026 * @since 2.0.0
30273027 * @since 4.6.0 Added the `$post` parameter.
30283028 *
3029- * @param string $format Optional. Format to use for retrieving the time the post
3030- * was modified. Accepts 'G', 'U', or PHP date format.
3031- * Defaults to the 'time_format' option.
3032- * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default current post.
3029+ * @param string $format Optional. Format to use for retrieving the time the post
3030+ * was modified. Accepts 'G', 'U', or PHP date format.
3031+ * Defaults to the 'time_format' option.
3032+ * @param int|WP_Post|null $post Optional. Post ID or WP_Post object. Default current post.
30333033 * @return string|int|false Formatted date string or Unix timestamp. False on failure.
30343034 */
30353035function get_the_modified_time ( $ format = '' , $ post = null ) {
@@ -3063,11 +3063,11 @@ function get_the_modified_time( $format = '', $post = null ) {
30633063 *
30643064 * @since 2.0.0
30653065 *
3066- * @param string $format Optional. Format to use for retrieving the time the post
3067- * was modified. Accepts 'G', 'U', or PHP date format. Default 'U'.
3068- * @param bool $gmt Optional. Whether to retrieve the GMT time. Default false.
3069- * @param int|WP_Post $post Post ID or post object. Default is global `$post` object.
3070- * @param bool $translate Whether to translate the time string. Default false.
3066+ * @param string $format Optional. Format to use for retrieving the time the post
3067+ * was modified. Accepts 'G', 'U', or PHP date format. Default 'U'.
3068+ * @param bool $gmt Optional. Whether to retrieve the GMT time. Default false.
3069+ * @param int|WP_Post|null $post Post ID or post object. Default is global `$post` object.
3070+ * @param bool $translate Whether to translate the time string. Default false.
30713071 * @return string|int|false Formatted date string or Unix timestamp if `$format` is 'U' or 'G'.
30723072 * False on failure.
30733073 */
0 commit comments