get_noptin_template( mixed $template_name, array $args = array(), string $template_path = 'noptin', string $default_path = '' )

Gets and includes template files.


Parameters Parameters

$template_name

(mixed) (Required) The file name of the template to load.

$args

(array) (Optional) (default: array()).

Default value: array()

$template_path

(string) (Optional) (default: 'noptin').

Default value: 'noptin'

$default_path

(string) (Optional) (default: 'templates').

Default value: ''


Top ↑

Source Source

File: includes/functions.php

function get_noptin_template( $template_name, $args = array(), $template_path = 'noptin', $default_path = '' ) {

	$the_template_path = locate_noptin_template( $template_name, $template_path, $default_path );

	if ( ! empty( $the_template_path ) ) {

		if ( $args && is_array( $args ) ) {
			// phpcs:ignore WordPress.PHP.DontExtract.extract_extract -- Please, forgive us.
			extract( $args );
		}

		include $the_template_path;
	}

}


Top ↑

Changelog Changelog

Changelog
VersionDescription
1.2.2Introduced.

Top ↑

User Contributed Notes User Contributed Notes

30 day money back guarantee
Safe & Secure online payment
Custom CSS Slide Example
Custom Animation Example
Default Animation