My Wordpress theme works fine on my localhost yet when I activate it on my live server I am getting the following breaking error...
[30-Jun-2016 13:06:19 UTC] PHP Parse error: syntax error, unexpected '[' in /home/launchcode/public_html_staging/wp-content/themes/launchcode/functions.php on line 13
Line 13 in my functions.php file is the following (lines above this are comments)
$sage_includes = [ 'lib/assets.php', // Scripts and stylesheets 'lib/extras.php', // Custom functions 'lib/setup.php', // Theme setup 'lib/titles.php', // Page titles 'lib/wrapper.php', // Theme wrapper class 'lib/customizer.php' // Theme customizer ];
Please note that other themes work fine on my live server. Does anyone have any idea as to why this might be causing an error? I'm thinking maybe it's to do with the PHP versions but not 100%.
Local PHP Version: 5.5.10 Local Apache Version: 2.2.26
Live PHP Version: 5.5.30 Live Apache Version: 2.4.16
Thank you for your time.