' . base64_encode( $output ) . '' ); } static function close_connection( $val = null ) { if (isset( $_REQUEST['json_result'] ) && $_REQUEST['json_result'] == true) : $output = json_encode( $val ); else: $output = serialize( $val ); endif; $output = '' . base64_encode( $output ) . ''; // Close browser connection so that it can resume AJAX polling header( 'Content-Length: ' . strlen( $output ) ); header( 'Connection: close' ); header( 'Content-Encoding: none' ); if ( session_id() ) { session_write_close(); } echo $output; if ( ob_get_level() ) { ob_end_flush(); } flush(); } static function error( $error, $code = null ) { $information['error'] = $error; if (null !== $code) $information['error_code'] = $code; MainWP_Helper::write( $information ); } /** * PARSE * Parses some CSS into an array * CSSPARSER * Copyright (C) 2009 Peter Kröner */ public static function parse_css($css){ // Remove CSS-Comments $css = preg_replace('/\/\*.*?\*\//ms', '', $css); // Remove HTML-Comments $css = preg_replace('/([^\'"]+?)(\