wpcf7_include_module_file()
Include a file under WPCF7_PLUGIN_MODULES_DIR.
Хуков нет.
Возвращает
bool. True on success, false on failure.
Использование
wpcf7_include_module_file( $path );
- $path(строка) (обязательный)
- File path relative to the module dir.
Код wpcf7_include_module_file() wpcf7 include module file CF7 6.1.7
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;
}