block_core_calendar_update_has_published_post_on_delete() – Handler for updating the has published posts flag when a post is deleted.

You appear to be a bot. Output may be restricted

Description

Handler for updating the has published posts flag when a post is deleted.

Usage

block_core_calendar_update_has_published_post_on_delete( $post_id );

Parameters

$post_id
( int ) required – Deleted post ID.

Returns

void

Source

File name: wordpress/wp-includes/blocks/calendar.php


Lines:

1 to 10 of 10
  function block_core_calendar_update_has_published_post_on_delete( $post_id ) {
    $post = get_post( $post_id );

    if ( ! $post || 'publish' !== $post->post_status || 'post' !== $post->post_type ) {
      return;
    }

    block_core_calendar_update_has_published_posts();
  }
 

 View on GitHub View on Trac