Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ‘)’ – PHP

  php

Q(Question):

I try to change my heather image and i make a mistake, but i don’t know what i did. Yhis is what i see:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ‘)’ in /homepages/13/d318063066/htdocs/es/wp-content/themes/twentyten/functions.php on line 176

// Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI.
register_default_headers( array(
'berries' => array(
'url' => '%s/images/headers /berries.jpg',
'thumbnail_url' => '%s/images/headers/berries-thumbnail.jpg',
/* translators: header image description */
'description' => __( 'Berries', 'twentyten' )
),
'cherryblossom' => array(
'url' => '%s/images/headers/cherryblossoms.jpg',
'thumbnail_url' => '%s/images/headers/cherryblossoms-thumbnail.jpg',
/* translators: header image description */
'description' => __( 'Cherry Blossoms', 'twentyten' )
),
'concave' => array(
'url' => '%s/images/headers/concave.jpg',
'thumbnail_url' => '%s/images/headers/concave-thumbnail.jpg',
/* translators: header image description */
'description' => __( 'Concave', 'twentyten' )
),
'fern' => array(
'url' => '%s/images/headers/fern.jpg',
'thumbnail_url' => '%s/images/headers/fern-thumbnail.jpg',
/* translators: header image description */
'description' => __( 'Fern', 'twentyten' )
),
'forestfloor' => array(
'url' => '%s/images/headers/forestfloor.jpg',
'thumbnail_url' => '%s/images/headers/forestfloor-thumbnail.jpg',
/* translators: header image description */
'description' => __( 'Forest Floor', 'twentyten' )
),
'inkwell' => array(
'url' => '%s/images/headers/inkwell.jpg',
'thumbnail_url' => '%s/images/headers/inkwell-thumbnail.jpg',
/* translators: header image description */
'description' => __( 'Inkwell', 'twentyten' )
),
'path' => array(
'url' => '%s/images/headers/path.jpg',
'thumbnail_url' => '%s/images/headers/path-thumbnail.jpg',
/* translators: header image description */
'description' => __( 'Path', 'twentyten' )
),
'sunset' => array(
'url' => '%s/images/headers/sunset.jpg',
'thumbnail_url' => '%s/images/headers/sunset-thumbnail.jpg',
/* translators: header image description */
'description' => __( 'Sunset', 'twentyten' )
)
) );
}
endif;

A(Answer):

Its really hard to read your code if you dont use
code tag

A(Answer):

which is line 176?

A(Answer):

Sorry, i don’t know nothing about programming, than’k for your help, the problem is in line 47 :p

A(Answer):

must be somewhere different, no errors up to line 51.

A(Answer):

Are you posting the code from functions.php or another page that called functions.php and had an error?

A(Answer):

Without going over all your code, that error usually comes up when you’re missing a close-parentheses ")". Check the end of your script to make sure that each opening one has a closing one.

LEAVE A COMMENT