有没有IDE可以导航多个php和css文件


Is there any IDE to navigate multiple php and css files?

我下载了SMThemes。它有点像wordPress。

然而,当我复制文件时,index.php没有正确执行

<?php 
    global $SMTheme;
    get_header(); 
    get_template_part('theloop');
    get_template_part('navigation');
    get_footer();
?>

我找不到get_header的定义位置。

functions.php中没有这样的函数,也没有includes文件夹。

事实上,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工作)。