时间:2024-03-10
WordPress函数wp_delete_post用于删除指定ID的文章
wp_delete_post( int $postid, bool $force_delete = false )
$postid
整数
要删除的文章ID
$force_delete
布尔值,默认值:false
是否绕过回收站直接删除
wp_delete_post()函数位于:wp-includes/post.php
相关函数:
pre_delete_post()
wp_delete_attachment()
wp_delete_object_term_relationships()
wp_trash_post()
Copyright © 2019-2024 1234.club