Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Forms API

Amy Evans edited this page Oct 3, 2019 · 1 revision

The forms API exists to handle form data. You can register a new form endpoint via the wp_irving_form_endpoints filter. You must provide a slug and callback method. Here's an example:

add_filter(
	'wp_irving_form_endpoints',
	function( $endpoints ) {
		$endpoints[] = [
			'slug'     => 'contact_form',
			'callback' => 'get_contact_form_response',
		];
		return $endpoints;
	}
);
Clone this wiki locally