*/ class Abovethefold_CriticalCSSEditor { /** * Above the fold controller */ public $CTRL; /** * CSS buffer started */ public $buffer_started = false; /** * Initialize the class and set its properties */ public function __construct(&$CTRL) { $this->CTRL = & $CTRL; // output buffer $this->CTRL->loader->add_action('init', $this, 'start_output_buffer', 99999); } /** * Init output buffering */ public function start_output_buffer() { // prevent double buffer if ($this->buffer_started) { return; } $this->buffer_started = true; // start buffer ob_start(array($this, 'end_buffering')); } /** * End compare critical CSS output buffer */ public function end_buffering($HTML) { if (is_feed() || is_admin()) { return $HTML; } if (stripos($HTML, "