Title: Parse error: syntax error
Last modified: August 21, 2016

---

# Parse error: syntax error

 *  [ReadyToWrap](https://wordpress.org/support/users/readytowrap/)
 * (@readytowrap)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-73/)
 * Just lost my entire site. Stuck on this error code:
 * Parse error: syntax error, unexpected ‘[‘ in /home/whatmuse/public_html/wp-content/
   plugins/nextgen-gallery/non_pope/class.nextgen_shortcode_manager.php on line 
   127
 * Not sure what I did. I have never tried to edit the files since I don’t know 
   what I’m doing. But I was reading. Did I hit a key??
 * Here is the code:
 * `
    <?php
 * class C_NextGen_Shortcode_Manager
    { private static $_instance = NULL; private
   $_shortcodes = array();
 *  /**
    * Gets an instance of the class * [@return](https://wordpress.org/support/users/return/)
   C_NextGen_Shortcode_Manager */ static function get_instance() { if (is_null(self::
   $_instance)) { $klass = get_class(); self::$_instance = new $klass; } return 
   self::$_instance; }
 *  /**
    * Adds a shortcode * [@param](https://wordpress.org/support/users/param/)
   $name * [@param](https://wordpress.org/support/users/param/) $callback */ static
   function add($name, $callback) { $manager = self::get_instance(); $manager->add_shortcode(
   $name, $callback); }
 *  /**
    * Removes a previously added shortcode * [@param](https://wordpress.org/support/users/param/)
   $name */ static function remove($name) { $manager = self::get_instance(); $manager-
   >remove_shortcode($name); }
 *  /**
    * Constructor */ private function __construct() { add_filter(‘the_content’,
   array(&$this, ‘deactivate_all’), 1); add_filter(‘the_content’, array(&$this, ‘
   parse_content’), PHP_INT_MAX-1); }
 *  /**
    * Deactivates all shortcodes */ function deactivate_all($content) { foreach(
   array_keys($this->_shortcodes) as $shortcode) { $this->deactivate($shortcode);}
 *  return $content;
    }
 *  /**
    * Activates all registered shortcodes */ function activate_all() { foreach(
   array_keys($this->_shortcodes) as $shortcode) { $this->activate($shortcode); }
 * }
    /** * Parses the content for shortcodes and returns the substituted content*
   [@param](https://wordpress.org/support/users/param/) $content * [@return](https://wordpress.org/support/users/return/)
   string */ function parse_content($content) { $this->activate_all(); return do_shortcode(
   $content); }
 *  /**
    * Adds a shortcode * [@param](https://wordpress.org/support/users/param/)
   $name * [@param](https://wordpress.org/support/users/param/) $callback */ function
   add_shortcode($name, $callback) { $this->_shortcodes[$name] = $callback; $this-
   >activate($name); }
 *  /**
    * Activates a particular shortcode * [@param](https://wordpress.org/support/users/param/)
   $shortcode */ function activate($shortcode) { if (isset($this->_shortcodes[$shortcode])){
   add_shortcode($shortcode, $this->_shortcodes[$shortcode]); } }
 *  /**
    * Removes a shortcode * [@param](https://wordpress.org/support/users/param/)
   $name */ function remove_shortcode($name) { unset($this->_shortcodes[$name]);
   $this->deactivate($name); }
 *  /**
    * De-activates a shortcode * [@param](https://wordpress.org/support/users/param/)
   $shortcode */ function deactivate($shortcode) { if (isset($this->_shortcodes[
   $shortcode])) remove_shortcode($shortcode); } }
 * [http://wordpress.org/plugins/nextgen-gallery/](http://wordpress.org/plugins/nextgen-gallery/)

The topic ‘Parse error: syntax error’ is closed to new replies.

 * ![](https://ps.w.org/nextgen-gallery/assets/icon-256x256.png?rev=2083961)
 * [Photo Gallery, Sliders, Proofing and Themes - NextGEN Gallery](https://wordpress.org/plugins/nextgen-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nextgen-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nextgen-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/nextgen-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nextgen-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nextgen-gallery/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [ReadyToWrap](https://wordpress.org/support/users/readytowrap/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-73/)
 * Status: not resolved