Make WordPress Core

Changeset 57853

Timestamp:
03/19/2024 09:31:23 AM (5 months ago)
Author:
swissspidy
Message:

Posts, Post Types: Introduce delete_post_{$post->post_type} and deleted_post_{$post->post_type} hooks.

The hooks fire before the general delete_post / deleted_post hooks and have the same parameters.

They complement the save_post_{$post->post_type} hook added in [25050] and the edit_post_{$post->post_type} hook added in [43617].

Props benniledl, swissspidy, dargus.
Fixes #60433.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post.php

    r57845 r57853  
    35563556     * Fires immediately before a post is deleted from the database.
    35573557     *
     3558
     3559
     3560
     3561
     3562
     3563
     3564
     3565
     3566
     3567
     3568
     3569
     3570
    35583571     * @since 1.2.0
    35593572     * @since 5.5.0 Added the `$post` parameter.
     
    35683581        return false;
    35693582    }
     3583
     3584
     3585
     3586
     3587
     3588
     3589
     3590
     3591
     3592
     3593
     3594
     3595
    35703596
    35713597    /**
Note: See TracChangeset for help on using the changeset viewer.