How can I create a file inside a wordpress plugin to receive parameters passed via the front post? the file would need to use the wp_db function.
How can I create a file inside a wordpress plugin to receive parameters passed via the front post? the file would need to use the wp_db function.
You can use admin_post_ (action).
When you create your form on the front end you add the input
<input type="hidden" name="action" value="nome_da_funcao">
Inside your plugin you add the hooks
add_action( 'admin_post_nome_da_funcao', 'my_function' );
add_action( 'admin_post_nopriv_nome_da_funcao', 'my_function' );
function my_function() {
//Seus codigos e request aqui
}