Skip to content

Instantly share code, notes, and snippets.

@Pross
Created March 7, 2013 21:16
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 Pross/5111864 to your computer and use it in GitHub Desktop.
Save Pross/5111864 to your computer and use it in GitHub Desktop.
You MUST add this to cron.php: define( 'CRMCRON', true );
<?php
// Add this to wp-content/mu-plugins/crm.php
if( class_exists( 'CRM_Utils_System_WordPress' ) ) {
class Fix_CRM_Cron extends CRM_Utils_System_WordPress {
function __construct() {
if( ! defined( 'CRMCRON' ) )
return;
add_filter('template', array( &$this, 'change_theme') );
add_filter('option_template', array( &$this, 'change_theme') );
add_filter('option_stylesheet', array( &$this, 'change_theme') );
}
function change_theme() {
// Alternate theme
return 'twentyten';
}
}
}
new Fix_CRM_Cron;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment