I just created a WordPress plugin with a custom template that handles a $_GET request before the HTML code. Wordpress team is asking me to put this code inside a function.
I understand that for admin panel forms the way is to use
add_action( 'admin_post_****', '****' );
But how do you handle a front-end form post (not that of admin panel). In what kind of a function should I put my template's $_GET or $_POST handling code. Because wordpress.org is not accepting my plugin without these request handles to be inside a function.