php - How to Fix Syntax error in Wordpress Blog for a theme -
i new programming , while trying remove footer message site, coding went wrong , getting error message in site.
parse error: syntax error, unexpected t_class in g:\inetpub\vhosts\socialwebarena.com\httpdocs\wp-content\themes\spacious\inc\functions.php on line 440 /**************************************************************************************/ add_action( 'spacious_footer_copyright', 'spacious_footer_copyright', 10 ); /** * function show footer info, copyright information */ if ( ! function_exists( 'spacious_footer_copyright' ) ) : function spacious_footer_copyright() { $site_link = '<a href="' . esc_url( home_url( '/' ) ) . '" title="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" ><span>' . get_bloginfo( 'name', 'display' ) . '</span></a>'; //$wp_link = '<a href="'.esc_url( 'http://wordpress.org' ).'" target="_blank" title="' . esc_attr__( 'wordpress', 'spacious' ) . '"><span>' . __( 'wordpress', 'spacious' ) . '</span></a>'; //$tg_link = '<a href="'.esc_url( 'http://themegrill.com/themes/spacious' ).'" target="_blank" title="'.esc_attr__( 'themegrill', 'spacious' ).'" rel="designer"><span>'.__( 'themegrill', 'spacious') .'</span></a>'; //$default_footer_value = sprintf( __( 'copyright © %1$s %2$s.', 'spacious' ), date( 'y' ), $site_link ).' '.sprintf( __( 'powered %s.', 'spacious' ), $wp_link ).' '.sprintf( __( 'theme: %1$s %2$s.', 'spacious' ), 'spacious', $tg_link ); $default_footer_value = sprintf( __( 'copyright © %1$s %2$s.', 'spacious' ), date( 'y' ), $site_link ).' '.sprintf( __( 'powered %s.', 'spacious' ), $wp_link ).', $tg_link ); $spacious_footer_copyright = '<div class="copyright">'.$default_footer_value.'</div>'; echo $spacious_footer_copyright; } endif; /*
this section , closing braces before endif; line no 440. can me fix this. asked host service, mentioned has gone wrong in coding.
can me in this
your add action incorrect, please check below sample use of add_action in word-press.you need apply hook name in first argument instead of custom function.
<?php add_action( $hook, $function_to_add, $priority, $accepted_args ); ?>
$hook (string) (required)
the name of action $function_to_add hooked. (see plugin api/action reference list of action hooks). can name of action inside theme or plugin file, or special tag "all", in case function called hooks.
$function_to_add (callback) (required)
the name of function wish hooked.
default: none
$priority (int) (optional)
used specify order in functions associated particular action executed. lower numbers correspond earlier execution, , functions same priority executed in order in added action.
$accepted_args (int) (optional)
the number of arguments hooked function accepts. in wordpress 1.5.1+, hooked functions can take arguments set when matching do_action() or apply_filters() call run. example, action comment_id_not_found pass functions hook onto id of requested comment.
default: 1
for more info. add_action can visit this
Comments
Post a Comment