title: Wordpress - Parse error: syntax error, unexpected 'function' (T_FUNCTION), expecting identifier (T_STRING)
body: <p>I have the following error with Wordpress using Woo-Commerce and Storefront theme.<br><br>
  Error is -  Parse error: syntax error, unexpected 'function' (T_FUNCTION), expecting identifier (T_STRING)<br><br>
  Can anyone help?<br><br>
  This is the standard code from the theme. No edits. It just started to not work.</p>
  
  <p>Here is the function from line 31:</p>
  
  <pre><code>    &lt;?php
  if ( ! function_exists( 'storefront_display_comments' ) ) {
  
      function storefront_display_comments() {
          // If comments are open or we have at least one comment, load up the comment template.
          if ( comments_open() || '0' != get_comments_number() ) :
              comments_template();
          endif;
      }
  }
  
  if ( ! function_exists( 'storefront_comment' ) ) {
  
      function storefront_comment( $comment, $args, $depth ) {
          if ( 'div' == $args['style'] ) {
              $tag = 'div';
              $add_below = 'comment';
          } else {
              $tag = 'li';
              $add_below = 'div-comment';
          }
          ?&gt;
          &lt;&lt;?php echo esc_attr( $tag ); ?&gt; &lt;?php comment_class( empty( $args['has_children'] ) ? '' : 'parent' ) ?&gt; id="comment-&lt;?php comment_ID() ?&gt;"&gt;
          &lt;div class="comment-body"&gt;
          &lt;div class="comment-meta commentmetadata"&gt;
              &lt;div class="comment-author vcard"&gt;
              &lt;?php echo get_avatar( $comment, 128 ); ?&gt;
              &lt;?php printf( wp_kses_post( '&lt;cite class="fn"&gt;%s&lt;/cite&gt;', 'storefront' ), get_comment_author_link() ); ?&gt;
              &lt;/div&gt;
              &lt;?php if ( '0' == $comment-&gt;comment_approved ) : ?&gt;
                  &lt;em class="comment-awaiting-moderation"&gt;&lt;?php esc_attr_e( 'Your comment is awaiting moderation.', 'storefront' ); ?&gt;&lt;/em&gt;
                  &lt;br /&gt;
              &lt;?php endif; ?&gt;
  
              &lt;a href="&lt;?php echo esc_url( htmlspecialchars( get_comment_link( $comment-&gt;comment_ID ) ) ); ?&gt;" class="comment-date"&gt;
                  &lt;?php echo '&lt;time datetime="' . get_comment_date( 'c' ) . '"&gt;' . get_comment_date() . '&lt;/time&gt;'; ?&gt;
              &lt;/a&gt;
          &lt;/div&gt;
          &lt;?php if ( 'div' != $args['style'] ) : ?&gt;
          &lt;div id="div-comment-&lt;?php comment_ID() ?&gt;" class="comment-content"&gt;
          &lt;?php endif; ?&gt;
          &lt;div class="comment-text"&gt;
          &lt;?php comment_text(); ?&gt;
          &lt;/div&gt;
          &lt;div class="reply"&gt;
          &lt;?php comment_reply_link( array_merge( $args, array( 'add_below' =&gt; $add_below, 'depth' =&gt; $depth, 'max_depth' =&gt; $args['max_depth'] ) ) ); ?&gt;
          &lt;?php edit_comment_link( __( 'Edit', 'storefront' ), '  ', '' ); ?&gt;
          &lt;/div&gt;
          &lt;/div&gt;
          &lt;?php if ( 'div' != $args['style'] ) : ?&gt;
          &lt;/div&gt;
          &lt;?php endif; ?&gt;
      &lt;?php
      }
  }
  </code></pre>