block_core_calendar_has_published_posts
block_core_calendar_has_published_posts ( No parameters )
Returns:- (bool) Has any published posts or not.
Defined at: - Introduced in WordPress: 5.9.0
- Deprecated in WordPress: —
Description
Returns whether or not there are any published posts.Used to hide the calendar block when there are no published posts.
This compensates for a known Core bug: https://core.trac.wordpress.org/ticket/12016