在我的Child主题中创建Functions.php时出错500

时间:2017-04-04 17:42:13

标签: php wordpress function dokan child-theming

当我在我的子主题中创建/放置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' );


?>
&#13;
&#13;
&#13;

当我的functions.php为空时,我遇到了这些错误,它的剂量是否有任何代码行?

0 个答案:

没有答案