title: Parse error: syntax error, unexpected 'return' (T_RETURN) - Tribe Events
body: <p>I am sure I am being an indiot but I can't spot what is causing the error. It is on line 106 which is third from bottom. Any help in spotting the error would be greatly appreciated.</p>
  
  <p>Thank you in advance.</p>
  
  <pre><code>&lt;?php
  
  add_action( 'wp_enqueue_scripts', 'rs_theme_enqueue_styles' );
  function rs_theme_enqueue_styles() {
      wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
      wp_enqueue_style( 'menu-style', get_stylesheet_directory_uri() . '/menus.css' );
  }
  
  add_filter('pre_get_posts', 'my_posts');
  function my_posts($query) {
      if ((is_tag() || is_category()) &amp;&amp; (!isset($query-&gt;query_vars['post_type']) || !$query-&gt;query_vars['post_type'])) {
          $query-&gt;set('post_type', 'any');
      }
      return $query;
  }
  
  // Enqueue and tell WP to load child theme custom javascript file
  // if ( !is_admin() ) { // instruction to only load if it is not the admin area
      function rs_custom_scripts() {
          // Get current theme version
          $_theme     = wp_get_theme();
          $_theme_ver = $_theme-&gt;get( 'Version' );
  
          wp_enqueue_script( 'rs_custom_scripts', 
              get_stylesheet_directory_uri() . '/js/custom_scripts.js', 
              array( 'jquery' ), 
              $_theme_ver, 
              true);
  
          wp_enqueue_script( 'rs_custom_menu_script', 
              get_stylesheet_directory_uri() . '/js/menu-handler.js', 
              array( 'jquery' ), 
              $_theme_ver, 
              true);
          // More custom scripts can be enqueued here
      }
      add_action('wp_enqueue_scripts', 'rs_custom_scripts', 1000);
  // }
  
  
  // TGM Plugin Activation
  require_once dirname( __FILE__ ) . '/class-tgm-plugin-activation.php';
  add_action( 'tgmpa_register', 'riseandshine_register_required_plugins' );
  function riseandshine_register_required_plugins() {
  
      $plugins = array(
  
          array(
              'name'               =&gt; 'Divi Login',
              'slug'               =&gt; 'DiviLogin',
              'source'             =&gt; get_stylesheet_directory() . '/plugins/DiviLogin.zip',
              'required'           =&gt; true,
              'version'            =&gt; '1.0',
              'force_activation'   =&gt; false,
              'force_deactivation' =&gt; false,
              'external_url'       =&gt; 'http://divi.space/',
              'is_callable'        =&gt; '',
          ),
  
          array(
              'name'      =&gt; 'Wordpress Countdown Widget',
              'slug'      =&gt; 'wordpress-countdown-widget',
              'required'  =&gt; true,
          ),
  
          array(
              'name'        =&gt; 'Recipe Card',
              'slug'        =&gt; 'recipe-card',
              'required'  =&gt; true,
          ),
  
          array(
              'name'        =&gt; 'Restaurant Reservations',
              'slug'        =&gt; 'restaurant-reservations',
              'required'  =&gt; true,
          ),
  
          array(
              'name'        =&gt; 'WooCommerce',
              'slug'        =&gt; 'woocommerce',
              'required'  =&gt; true,
          ),
  
      );
  
      $config = array(
          'id'           =&gt; 'tgmpa',
          'default_path' =&gt; '',
          'menu'         =&gt; 'tgmpa-install-plugins',
          'parent_slug'  =&gt; 'themes.php',
          'capability'   =&gt; 'edit_theme_options',
          'has_notices'  =&gt; true,
          'dismissable'  =&gt; true,
          'dismiss_msg'  =&gt; '',
          'is_automatic' =&gt; false,
          'message'      =&gt; '',
  
      );
  
      tgmpa( $plugins, $config );
  }
  function my_et_builder_post_types( $post_types ) {
      $post_types[] = 'events';
      $post_types[] = 'tribe_events';
  
      return $post_types;
  }
  add_filter( 'et_builder_post_types', 'my_et_builder_post_types' );
  </code></pre>