Title: Parse error: syntax error, unexpected T_FUNCTION &#8230;
Last modified: January 18, 2019

---

# Parse error: syntax error, unexpected T_FUNCTION …

 *  Resolved [metaltatt](https://wordpress.org/support/users/metaltatt/)
 * (@metaltatt)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_function-39/)
 * I tried to update my plugins today to the newest version. Word press updated 
   automatically and my pictures were not showing up on my pages. I am hosted on
   GO Daddy and have figured out how to get to the file in order to fix it, but 
   I am not a programmer and have no idea what is wrong with the syntax. I copied
   the whole function, but the error is for the line preceeded by ****. It is the
   add action before the else.
    Is it missing a ; somewhere? I ran it through two
   checkers I found online and they came back with no error found..? I can’t get
   into my webpage. Any thoughts would be appreciated.
 * function start_plugin() {
 *  // Content Filters
    add_filter(‘flag_gallery_name’, ‘sanitize_title’);
 *  // Load the admin panel or the frontend functions
    if ( is_admin() ) {
 *  // Pass the init check or show a message
    if (get_option( “flag_init_check” )!
   = false ) ***** add_action( ‘admin_notices’, function(){ echo ‘<div id=”message”
   class=”error”><p>**‘ . get_option( “flag_init_check” ) . ‘**</p></div>’; } );
 *  } else {
 *  // Add MRSS to wp_head
    if ( $this->options[‘useMediaRSS’] ) add_action(‘wp_head’,
   array(‘flagMediaRss’, ‘add_mrss_alternate_link’));
 *  // Add the script and style files
    add_action(‘wp_print_scripts’, array(&$this,‘
   load_scripts’) ); add_action( ‘flag_footer_scripts’, array( &$this, ‘load_scripts’));
 *  // Add a version number to the header
    add_action(‘wp_head’, function(){ global
   $flag; echo “\n<!– <meta name=’Grand Flagallery’ content='{$flag->version}’ /
   > –>\n”; } );
 *  }
    }
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fparse-error-syntax-error-unexpected-t_function-39%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [NicolasKulka](https://wordpress.org/support/users/nicolaskulka/)
 * (@nicolaskulka)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_function-39/#post-11103743)
 * Après ceci :
 * “if ( $this->options[‘useMediaRSS’] )”
 * Il manque ceci : “{“

Viewing 1 replies (of 1 total)

The topic ‘Parse error: syntax error, unexpected T_FUNCTION …’ is closed to new 
replies.

 * ![](https://ps.w.org/wps-hide-login/assets/icon-256x256.png?rev=1820667)
 * [WPS Hide Login](https://wordpress.org/plugins/wps-hide-login/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wps-hide-login/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wps-hide-login/)
 * [Active Topics](https://wordpress.org/support/plugin/wps-hide-login/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wps-hide-login/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wps-hide-login/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [NicolasKulka](https://wordpress.org/support/users/nicolaskulka/)
 * Last activity: [7 years, 4 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_function-39/#post-11103743)
 * Status: resolved