We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c912c19 commit a2c6c10Copy full SHA for a2c6c10
src/Posts/Post.php
@@ -69,8 +69,10 @@ public function excerpt()
69
* @param string $format
70
* @return string
71
*/
72
- public function publishDate($format = $this->date_format)
+ public function publishDate($format = null)
73
{
74
+ $format = ($format ?: $this->date_format);
75
+
76
return \get_the_date($format, $this->id);
77
}
78
@@ -80,8 +82,10 @@ public function publishDate($format = $this->date_format)
80
82
81
83
84
- public function modifiedDate($format = $this->date_format)
85
+ public function modifiedDate($format = null)
86
87
88
89
return \get_the_modified_time($format, $this->id);
90
91
0 commit comments