Changeset 45271
- Timestamp:
- 05/11/08 17:53:28 (2 months ago)
- Files:
-
- ajaxd-wordpress/trunk/modules/ajaxnav/ajaxnav.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
ajaxd-wordpress/trunk/modules/ajaxnav/ajaxnav.php
r45246 r45271 238 238 $response = str_replace('http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'] ,get_settings('siteurl'),$match[0]); 239 239 240 $actions = AWP_nav::find_JS($response);241 242 240 if(!$response){ 243 241 echo __('AJAX Page could not be loaded.','awp'); exit;} … … 247 245 248 246 AWP::make_response($response, $vars,$actions); 249 }250 251 function find_JS($response){252 global $id, $aWP,$awpall;253 $actions = array();254 preg_match_all('!\<script[^>]*\>([\S\s]*?)\<\/script\>!ims',$response,$matches, PREG_SET_ORDER);255 256 if(count($matches) > 0){257 foreach($matches as $match){258 $match = str_replace(array('<!--','-->','/*','*/','<![CDATA[',']]>'),'',$match[1]);259 $actions[] = "setTimeout(\"try{".trim($match)."}catch(e){}\",1000);";260 }261 }262 263 return $actions;264 247 } 265 248
