A WordPress-centric search engine for devs and theme authors



pre_delete_post ›

Since4.4.0
Deprecatedn/a
apply_filters( 'pre_delete_post', null, $post, $force_delete )
Parameters: (3)
  • (bool) $delete Whether to go forward with deletion.
    Required: Yes
  • (WP_Post) $post Post object.
    Required: Yes
  • (bool) $force_delete Whether to bypass the trash.
    Required: Yes
Defined at:
Codex:

Filters whether a post deletion should take place.





Source

$check = apply_filters( 'pre_delete_post', null, $post, $force_delete );