Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?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