admin管理员组

文章数量:1332383

I would like to delete a specific post when the user is deleted in admin/users.php.

I did this code :

add_action('delete_user', array(__CLASS__, "delete_user_profile"), 10 ); //I´m sure the code passed by here.

public static function delete_user_profile( $user_id ){
    var_dump( $user_id ); //Never called
    wp_die( "delete_user_profile");

}

What could be the problem ? Is there a different way or hook to do this ?

本文标签: usersdeleteuser hook failed