render_blocking = array();
$speedycache->render_blocking['except'] = '';
$speedycache->render_blocking['tags'] = array();
$speedycache->render_blocking['header_start_index'] = 0;
$speedycache->render_blocking['js_tags_text'] = '';
$speedycache->render_blocking['html'] = $html;
self::set_header_start_index();
self::set_tags();
$speedycache->render_blocking['tags'] = self::reorder_tags($speedycache->render_blocking['tags']);
}
static function set_tags(){
self::set_comments();
self::set_js();
self::set_css();
}
static function set_comments(){
global $speedycache;
$comment_tags = self::find_tags('');
self::set_except($comment_tags);
foreach($comment_tags as $key => $value){
if(preg_match("/\<\!--\s*\[if/i", $value['text'])){
if(preg_match("/data-speedycache-render\=[\"\']false[\"\']/i", $value['text'])){
continue;
}
array_push($speedycache->render_blocking['tags'], $value);
}
}
}
static function set_css(){
global $speedycache;
$style_tags = self::find_tags('');
//
$list = array();
for ($i=0; $i < count($tags); $i++){
for ($j=0; $j < count($tags); $j++){
if($tags[$i]['start'] > $tags[$j]['start']){
if($tags[$i]['end'] < $tags[$j]['end']){
array_push($list, $i);
}
}
}
}
foreach($list as $key => $value){
unset($tags[$value]);
}
$sorter = array();
$ret = array();
foreach($tags as $ii => $va){
$sorter[$ii] = $va['start'];
}
asort($sorter);
foreach($sorter as $ii => $va){
$ret[$ii] = $tags[$ii];
}
$tags = $ret;
return $tags;
}
static function exclude_scripts($text){
$excludeables = array(
'/google_ad_client/',
'/googlesyndication\.com/',
'/app\.getresponse\.com/i',
'/adsbygoogle/i',
'/^', $tag);
$style_tags = self::find_tags('