-1

I'm trying to install a new theme for a wordpress site and when I want to activate a plugin I get this error. Can you help me understand how to solve this error?

function thegem_cf_shortcode_settings()
{
    return array(
        'name' => __('Custom Fields', 'thegem'),
        'base' => 'gem_custom_fields',
        'icon' => 'thegem-icon-wpb-ui-custom-fields',
        'category' => __('TheGem', 'thegem'),
        'description' => __('Custom Fields', 'thegem'),
        'params' => array_merge(
            /* General - Layout */
            thegem_cf_set_layout_params(),

            /* General - Styles */
            thegem_cf_set_style_params(),

            /* Extra Options */
            thegem_set_elements_extra_options(),

            // Design Options
            thegem_cf_set_design_options_params(),

            /* Responsive Options */
            thegem_set_elements_responsive_options(),
            thegem_cf_extends_responsive_options_params(),
         
     )      
}

function thegem_cf_shortcode($atts, $content)
{
1
  • 2
    Check the error log, the stack trace should tell you exactly which lines of which PHP file the error is. Jul 31, 2023 at 6:26

1 Answer 1

4

You have a missing closing bracket on your params parameter on the array_merge(). It should look like this:

    return array(
        'name' => __('Custom Fields', 'thegem'),
        'base' => 'gem_custom_fields',
        'icon' => 'thegem-icon-wpb-ui-custom-fields',
        'category' => __('TheGem', 'thegem'),
        'description' => __('Custom Fields', 'thegem'),
        'params' => array_merge(
            /* General - Layout */
            thegem_cf_set_layout_params(),

            /* General - Styles */
            thegem_cf_set_style_params(),

            /* Extra Options */
            thegem_set_elements_extra_options(),

            // Design Options
            thegem_cf_set_design_options_params(),

            /* Responsive Options */
            thegem_set_elements_responsive_options(),
            thegem_cf_extends_responsive_options_params(),
         ) // <-- missing this bracket
     ); // <-- missing semicolon
1
  • 3
    They're also missing a ; at the end of the return array( ... ) bit.
    – Pat J
    Jul 31, 2023 at 17:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.