Form_Edit_Page_Handler::maybe_print_templates()

Prints templates if conditions are met.

Description

Source

File: src/db-objects/forms/form-edit-page-handler.php

	public function maybe_print_templates() {
		$target_post_type = $this->form_manager->get_prefix() . $this->form_manager->get_singular_slug();

		if ( empty( $_GET['post_type'] ) || $target_post_type !== $_GET['post_type'] ) {
			if ( empty( $_GET['post'] ) || get_post_type( $_GET['post'] ) !== $target_post_type ) {
				return;
			}
		}

		$this->print_templates();
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.