PDA

View Full Version : Error message updating functions.php file



EnnisP
02-23-2009, 04:56 PM
When I attempt to update my function.php file in wordpress kubrick I get the following error message:

Parse error: syntax error, unexpected '}' ... on line 26

The code is...


<?php
/**
* @package WordPress
* @subpackage Default_Theme
*/

if ( function_exists('register_sidebar') )
register_sidebar(array(
'before_widget' => '<li id="%1$s" class="widget %2$s">',
'after_widget' => '</li>',
'before_title' => '<h2 class="widgettitle">',
'after_title' => '</h2>',
));

/** @ignore */
function kubrick_head() {
$head = "<style type='text/css'>\n<!--";
$output = '';
if ( kubrick_header_image() ) {
$url = kubrick_header_image_url() ;
$output .= "#header { background: url('$url') no-repeat bottom center; }\n";
}
if ( false !== ( $color = kubrick_header_color() ) ) {
$output .= "#headerimg h1 a, #headerimg h1 a:visited, #headerimg .description { color: $color; }\n";
}
if ( false !== ( $display = kubrick_header_display() ) ) {
$output .= "#headerimg { display: $display }\n";
}
$foot = "--></style>\n";
if ( '' != $output )
echo $head . $output . $foot;
}

Twey
02-23-2009, 05:52 PM
Works for me, but you should probably end your PHP block with a ?>. Which is line 26?

JasonDFR
02-23-2009, 06:24 PM
You're sure the error is for this file? Post the whole error message if you can.

EnnisP
02-23-2009, 06:29 PM
The entire error message is...


Parse error: syntax error, unexpected '}' in /home/nowth3/public_html/wp-content/themes/default/functions.php on line 26

EnnisP
02-23-2009, 06:44 PM
Hey Twey,
I am assuming this is line 26...


if ( false !== ( $display = kubrick_header_display() ) ) {