其實,SMThemes是WordPress主題。請參閱鏈接末尾的評論。
get_header()
定義在WordPress核心本身,而不是在主題文件中,因爲你無法在其中找到它。
您可以在wp-installation-root/wp-includes/general-template.php
文件中找到它的定義,線24,它的定義是:
/**
* Load header template.
*
* Includes the header template for a theme or if a name is specified then a
* specialised header will be included.
*
* For the parameter, if the file is called "header-special.php" then specify
* "special".
*
* @uses locate_template()
* @since 1.5.0
* @uses do_action() Calls 'get_header' action.
*
* @param string $name The name of the specialised header.
*/
function get_header($name = null) {
do_action('get_header', $name);
$templates = array();
$name = (string) $name;
if ('' !== $name)
$templates[] = "header-{$name}.php";
$templates[] = 'header.php';
// Backward compat code will be removed in a future release
if ('' == locate_template($templates, true))
load_template(ABSPATH . WPINC . '/theme-compat/header.php');
}
隨着你的真正的問題,你可以按照@SteAp建議,並給予PHPStorm一個嘗試,它很確實很好,這種問題你會很容易解決(我不適用於JetBrains)。
請下載PHPStorm的評估副本,將源加載爲項目並使用IDE自動查找get_header()的定義。 – SteAp