Parse error: syntax error, unexpected in Redux framework wordpress

Parse error: syntax error, unexpected in Redux framework wordpress

我为我的主题使用了 Redux 框架,但是根据这个 link 中的 redux 教程,但是它给出了错误

错误:

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'),
            )
                ),
            )
        )
    );

第 273 行:'placeholder' => 数组(

怎么了?

您在以下位置后遗漏了一个“,”:

'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'),
            ),
        ),
    ),
));