wpcf7_include_module_file()CF7 1.0

Include a file under WPCF7_PLUGIN_MODULES_DIR.

Хуков нет.

Возвращает

true|false. True on success, false on failure.

Использование

wpcf7_include_module_file( $path );
$path(строка) (обязательный)
File path relative to the module dir.

Код wpcf7_include_module_file() CF7 5.9.3

function wpcf7_include_module_file( $path ) {
	$dir = WPCF7_PLUGIN_MODULES_DIR;

	if ( empty( $dir ) or ! is_dir( $dir ) ) {
		return false;
	}

	$path = path_join( $dir, ltrim( $path, '/' ) );

	if ( file_exists( $path ) ) {
		include_once $path;
		return true;
	}

	return false;
}