Acessing WP functions in form submission handler

Accessing files within WP installation directly is a bad practice. While you can implement a custom core load routine, it is fragile and impossible to reliably ship in public plugins.

There are different approaches to form submission in WP. On of the most appropriate ones (if slightly underknown) is sending form to wp-admin/admin-post.php and using hooks inside to attach processing logic.

tech