ap_get_template_part( string $file, array|false $args = false )

Description #

Include template php files.

Parameters #

  • $file
    string (Required) File name without extension.
  • $args
    array | false (Optional) Arguments to be passed. Default value: false

Changelog #

VersionDescription
2.1Introduced.

Source #

File: includes/theme.php

function ap_get_template_part( $file, $args = false ) {
	if ( false !== $args ) {
		extract( $args ); // phpcs:ignore WordPress.PHP.DontExtract.extract_extract
	}

	include ap_get_theme_location( $file . '.php' );
}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment