0

您好,我在子主题中创建/放置 Functions.php 时收到HTTP ERROR 500

这是我的代码

<?php

function my_theme_enqueue_styles() {

    $parent_style = 'parent-style';

    wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
    wp_enqueue_style( 'child-style',
        get_stylesheet_directory_uri() . '/style.css',
        array( $parent_style )
    );
}
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );




/**
 * Insert new URL's to the dashboard navigation bar
 *
 * @param  array  $urls 
 *
 * @return array  
 */
function prefix_dokan_add_seller_nav( $urls ) {
    
    $urls['help'] = array(
        'title' =&gt; __( 'Help Files', 'dokan'),
        'icon'  =&gt; '&lt;i class=&quot;fa fa-users&quot;&gt;&lt;/i&gt;',
        'url'   =&gt; 'http://www.help.com'
    );

    $urls['google'] = array(
        'title' =&gt; __( 'Google', 'dokan'),
        'icon'  =&gt; '&lt;i class=&quot;fa fa-google-plus&quot;&gt;&lt;/i&gt;',
        'url'   =&gt; 'http://www.google.com'
    );

    return $urls;
}

add_filter( 'dokan_get_dashboard_nav', 'prefix_dokan_add_seller_nav' );


?>

当我的functions.php为空时,我收到了这些错误,不管它是否有任何代码行

4

0 回答 0