how to get arguments from action hooks
-
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));
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘how to get arguments from action hooks’ is closed to new replies.