Form_Manager::maybe_start_session()

Starts a PHP session if the current request is any frontend form request.

Description

See also

Source

File: src/db-objects/forms/form-manager.php

	protected function maybe_start_session() {
		if ( is_admin() ) {
			return;
		}

		if ( is_singular() && $this->get_prefix() . 'form' === get_post_type( get_queried_object_id() ) || isset( $_POST['torro_submission'] ) ) {
			if ( ! isset( $_SESSION ) && ! headers_sent() ) {
				session_start();
			}
		}
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.