Changeset 45279
- Timestamp:
- 05/11/08 18:35:59 (2 months ago)
- Files:
-
- ajaxd-wordpress/trunk/modules/ajaxnav/ajaxnav.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
ajaxd-wordpress/trunk/modules/ajaxnav/ajaxnav.php
r45271 r45279 170 170 function AJAX(){ 171 171 global $id, $post, $awpall; 172 global $hemingway; //for themes that arn't quite sure how to place nice with others. 173 // There are these things called filters and hooks, USE THEM. 172 global $hemingway; //for themes that aren't quite sure how to place nice with others. 173 // There are these things called filters and hooks, USE THEM. 174 175 global $user_login,$userdata;; 176 get_currentuserinfo(); 177 174 178 ob_start(); 175 179 … … 190 194 include(TEMPLATEPATH . '/index.php'); 191 195 } 196 192 197 193 198 }elseif($_REQUEST['nav'] == "page"){ … … 206 211 } 207 212 } 213 $title = wp_title('',false); 208 214 209 215 }else{ … … 220 226 $url .= '?awp=ajax'; 221 227 } 222 echo file_get_contents($url); 223 228 $content = file_get_contents($url); 229 echo $content; 230 preg_match('/<title>([^<]*)<\/title>/',$content,$matches); 231 $title = $matches[1]; 224 232 }else{ 225 233 global $paged; … … 243 251 if($awpall[ajax_nav_all] != '') 244 252 $actions[] = 'setTimeout("awp_nav_links();",500);'; 253 254 if($title != '') 255 $actions[] = 'try{document.title = "'.$title.'"}catch(e){}'; 245 256 246 257 AWP::make_response($response, $vars,$actions);
