As an update, my hosting company migrated my site to a new server with PHP 5.4.23. I reverted the functions.php file and the issue no longer existed. It seems that this arises with certain (possibly older?) versions of PHP.
Thanks for the help in identifying the issue and providing workaround solutions everyone!
@luigivieira Thank for your solution!
I think you can make a pull request to https://github.com/Codeinwp/flat
Upgrading to FLAT version 1.5.7 grossly distorted my website:
http://csectionrecoverycenter.com
Currently using WordPress latest release 4.1.1. PHP is version 5.3.29 however.
Do I understand correctly that upgrading to PHP version 5.4.24 will resolve the problem?
Answered my own question: YES!
Flat ver 1.5.7 works correctly on WP 4.1.1 using PHP 5.4.24
(My Thanks to Michael at Site5.com who showed me how to very quickly change my PHP version by inserting a single line into my .htaccess file.)
Hey ! I had the same error when updated to 1.5.7. I used luigivieira solution and it worked but now I have this message under titles of my post :
WARNING: CALL_USER_FUNC_ARRAY() [FUNCTION.CALL-USER-FUNC-ARRAY]: FIRST ARGUMENT IS EXPECTED TO BE A VALID CALLBACK, 'RETURN ' ITEMPROP="DISCUSSIONURL"';' WAS GIVEN IN /HOME/PASTOUTD/WWW/WP-INCLUDES/PLUGIN.PHP ON LINE 213
TITLE="COMMENTAIRE SUR ARTICLE WEB">0 COMMENTS
So I was getting the same error on line #63 as mentioned above, made the code change as suggested as now the error has moved to line #64:
#63 add_filter( ‘comments_popup_link_attributes’, “return ‘ itemprop=\”discussionUrl”‘;” } ); # schema.org property on comments links
#64 add_filter( ‘current_theme_supports-tha_hooks’, ‘__return_true’ ); # Enables checking for THA hooks
Not sure how I can check the version of PHP or WP as now I can’t get to my hosting site.
HELP!
Hi,
My web site disappeared and the page went blank after updating the last version of Flat theme.
Now I’ve got this error:
Parse error: syntax error, unexpected T_FUNCTION in /var/www/vhosts/tamayacikel.com/httpdocs/wp-content/themes/flat/functions.php on line 65
Could you please help?
I was able to get this same issue resolved by getting my hosting site to upgrade the PHP level. If you refer back to this thread you’ll see what level the Flat theme works on