⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 compile.compile_custom_function.php

📁 、支持无限级的分类与子分类
💻 PHP
字号:
<?php
/**
 * Template Lite compile custom function - template internal module
 *
 * Type:	 template
 * Name:	 compile_custom_function
 */

function compile_compile_custom_function($function, $modifiers, $arguments, &$_result, &$object)
{
	if ($function = $object->_plugin_exists($function, "function"))
	{
		$_args = $object->_parse_arguments($arguments);
		foreach($_args as $key => $value)
		{
			if (is_bool($value))
			{
				$value = $value ? 'true' : 'false';
			}
			if (is_null($value))
			{
				$value = 'null';
			}
			$_args[$key] = "'$key' => $value";
		}
		$_result = '<?php echo ';
		if (!empty($modifiers))
		{
			$_result .= $object->_parse_modifier($function . '(array(' . implode(',', (array)$_args) . '), $this)', $modifiers) . '; ';
		}
		else
		{
			$_result .= $function . '(array(' . implode(',', (array)$_args) . '), $this);';
		}
		$_result .= '?>';
		return true;
	}
	else
	{
		return false;
	}
}

?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -