so I'm reading that action hooks pass arguments to the function that you hook to the action, but how does it happen? I mean how do I access the argument in my function?
this code doesn't get it
function remove_post_dir($post_ID) {
if(file_exists(ABSPATH. '/wp-content/uploads/'. $post_ID)) {
rmdir(ABSPATH. '/wp-content/uploads/'. $post_ID);
}
}
add_action( 'delete_post', remove_post_dir($post_ID));