1. Do I need to define a new URL for handling the $_POST request?
不需要,您不需要定义新的URL。
2. Which action hook do I need to use for handling such a request?
您可以使用
init 钩
示例代码
function my_theme_send_email() {
if ( isset( $_POST[\'email-submission\'] ) && \'1\' == $_POST[\'email-submission\'] ) {
// Send the email...
} // end if
} // end my_theme_send_email
add_action( \'init\', \'my_theme_send_email\' );
现在,您可以使用POST所需的POST参数调用您的网站。
更新时间:

Executed function on init method

my code