[wp-trac] [WordPress Trac] #63207: Docs: Enhance inline documentation for current_time, wp_date, and date_i18n functions/filters.

WordPress Trac noreply at wordpress.org
Wed Apr 2 21:30:36 UTC 2025


#63207: Docs: Enhance inline documentation for current_time, wp_date, and date_i18n
functions/filters.
--------------------------+-----------------------------
 Reporter:  dilipbheda    |       Owner:  SergeyBiryukov
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  6.9
Component:  Date/Time     |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  docs
--------------------------+-----------------------------

Comment (by SergeyBiryukov):

 Replying to [comment:5 dilipbheda]:
 > From my perspective, we should revert the `@param` type from `bool` to
 `int|bool`
 >
 > What do you think?

 I think `bool` is fine here, and is more consistent with the same
 parameter in `date_i18n()`. Let's update the instances in core and unit
 tests to pass `true` instead of `1` for consistency. It's OK if some
 plugins or themes would still pass `1`, as the function just checks for a
 truthy value.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63207#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list