请教一段wordpress 语句的意思
attop 2015-11-05 03:37:16 $templates = array();
if ( '' !== $name )
$templates[] = "header-{$name}.php";
$templates[] = 'header.php';
这段程序判断 $name 是否不空,如果不空则给$templates[]赋值"header-{$name}.php“
但又紧接着$templates[] = 'header.php'; 那么templates最终就是header.php。
那前面的判断有何作用?