wpseek.com
WordPress开发者和主题制作者的搜索引擎
block_core_calendar_update_has_published_post_on_delete › WordPress Function
Since5.9.0
已弃用n/a
› block_core_calendar_update_has_published_post_on_delete ( $post_id )
| 参数: |
|
| 定义在: |
|
| 文档: |
Handler for updating the has published posts flag when a post is deleted.
源码
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();
}
/**
* Handler for updating the has published posts flag when a post status changes.
*
* @since 5.9.0
*
* @param string $new_status The status the post is changing to.
* @param string $old_status The status the post is changing from.
* @param WP_Post $post Post object.
*/