Ali Asadi Ali Asadi - 2 months ago 5
PHP Question

Parse error: syntax error, unexpected in Redux framework wordpress

I used Redux framework for my theme but according by tutorial of redux in this link but it gives error

Error :

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


And config file :



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(

whats wrong ?

Answer

You have missed a "," after:

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

So your code should be:

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