Skip to main content

gravitycalendar_is_valid_feed()

function gravitycalendar_is_valid_feed( $feed_id, string $secret='', $thing_to_display='shortcode' )

Returns whether a calendar feed is valid: exists, is active, and has a valid secret (if the feed is secure).

Since: 2.6

Source: includes/class-calendar-shortcode.php:28

Parameters

NameTypeDefaultDescription
$feed_idintThe ID of the feed to check.
$secretstring''The secret to check, if the feed is set to be secure.
$thing_to_displaystring'shortcode'Optional. The type of shortcode being displayed. This is only used in error messages.

Returns

  • true | WP_Error — True if valid, WP_Error if invalid.