Skip to content

Instantly share code, notes, and snippets.

@codearachnid
Created December 12, 2012 11:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codearachnid/4267100 to your computer and use it in GitHub Desktop.
Save codearachnid/4267100 to your computer and use it in GitHub Desktop.
There is an issue in WordPress v3.5 causing an error of in_admin() when loading the Tri.be Events community pages.
<?php
/**
* There is an issue in WordPress v3.5 causing an error of in_admin() when loading the community pages.
* Here is the fix:
* 1. open lib/tribe-community-events.class.php (in your community events plugin folder)
* 2. comment out the line add_action( 'wp', array( $this, 'maybeLoadAssets' ) );
* 3. replace function init() with the one provided below
*/
// in WordPress v3.5 this is causing an error. So comment out.
// add_action( 'wp', array( $this, 'maybeLoadAssets' ) );
// replace the function init() method with the following code
public function init() {
self::$instance = self::instance();
self::loadTextDomain();
self::maybeFlushRewriteRules();
self::maybeLoadAssets();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment