2016-09-12 55 views
-1

我用終極版框架對我的主題,但在這個link終極版教程根據,但它給錯誤解析錯誤:語法錯誤,意想不到的終極版框架WordPress的

錯誤:

Parse error: syntax error, unexpected ''placeholder'' (T_CONSTANT_ENCAPSED_STRING), expecting ')' in C:\xampp\htdocs\wp\wp-content\themes\theme\options\config.php on line 273 

和配置文件:

Redux::setSection($opt_name, array(
 
     'title'  => __('صفحه ی اصلی', 'dima_theme'), 
 
     'id'   => 'dima-index', 
 
     'desc'  => __('تنظیمات صفحه ی اصلی', 'dima_theme'), 
 
     'icon'  => 'el el-instagram', 
 
     'fields'  => array(
 
      array(
 
      'id'   => 'opt-slides', 
 
      'type'  => 'slides', 
 
      'title'  => __('Slides Options', 'redux-framework-demo'), 
 
      'subtitle' => __('Unlimited slides with drag and drop sortings.', 'redux-framework-demo'), 
 
      'desc'  => __('.', 'redux-framework-demo') 
 
      'placeholder' => array(
 
       'title'   => __('This is a title', 'redux-framework-demo'), 
 
       'description'  => __('Description Here', 'redux-framework-demo'), 
 
       'url'    => __('Give us a link!', 'redux-framework-demo'), 
 
      ) 
 
       ), 
 
      ) 
 
     ) 
 
    );

line 273:'placeholder'=> array(

怎麼了?

回答

0

你已經錯過了 「」 後:

'desc'  => __('.', 'redux-framework-demo') 

所以,你的代碼應該是:

Redux::setSection($opt_name, array(
    'title' => __('صفحه ی اصلی', 'dima_theme'), 
    'id'  => 'dima-index', 
    'desc' => __('تنظیمات صفحه ی اصلی', 'dima_theme'), 
    'icon' => 'el el-instagram', 
    'fields' => array(
     array(
      'id'   => 'opt-slides', 
      'type'  => 'slides', 
      'title'  => __('Slides Options', 'redux-framework-demo'), 
      'subtitle' => __('Unlimited slides with drag and drop sortings.', 'redux-framework-demo'), 
      'desc'  => __('.', 'redux-framework-demo'), 
      'placeholder' => array(
       'title'  => __('This is a title', 'redux-framework-demo'), 
       'description' => __('Description Here', 'redux-framework-demo'), 
       'url'   => __('Give us a link!', 'redux-framework-demo'), 
      ), 
     ), 
    ), 
)); 
在 '說明'
+0

添加後 「」:解析錯誤:語法錯誤,意外' )'在第282行的C:\ xampp \ htdocs \ wp \ wp-content \ themes \ theme \ options \ config.php –

+0

您可以將272行粘貼到代碼的282行嗎? – MoeinPorkamel

+0

此代碼沒有任何問題 – MoeinPorkamel

相關問題