Skip to content

Instantly share code, notes, and snippets.

@erikreagan
Created December 4, 2012 16:58
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 erikreagan/4206180 to your computer and use it in GitHub Desktop.
Save erikreagan/4206180 to your computer and use it in GitHub Desktop.
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Disable Profiler
*
* @package Disable Profiler
* @author Focus Lab, LLC <dev@focuslabllc.com>
* @copyright Copyright (c) 2012 Focus Lab, LLC
* @license MIT http://opensource.org/licenses/mit-license.php
*/
$plugin_info = array(
'pi_name' => 'Disable Profiler',
'pi_version' => '0.1',
'pi_author' => 'Erik Reagan',
'pi_author_url' => 'http://focuslabllc.com',
'pi_description' => 'Disable the Output Profiler for individual templates (useful for ajax requests)',
'pi_usage' => '{exp:disable_profiler}'
);
class Disable_profiler {
public function __construct()
{
$this->EE =& get_instance();
$this->EE->output->enable_profiler = FALSE;
$this->EE->TMPL->debugging = FALSE;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment