douxie3625 2016-01-21 16:01
浏览 49
已采纳

functions.php上的语法错误

When I add this to the end of my theme function.php I get a syntax error on the last line, how do I fix this?

add_action( 'admin_enqueue_scripts', function() {
    wp_enqueue_style('fontawesome', '//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css');
}
  • 写回答

2条回答 默认 最新

  • dongsha7215 2016-01-21 16:05
    关注

    The statement is incomplete. You never closed the add_action() function call:

    add_action( 'admin_enqueue_scripts', function() {
        //...
    }); // <--- Need to close the function call and end the statement with a semi-colon
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?