Changeset 6025 for trunk/wp-app.php
- Timestamp:
- 09/03/2007 11:19:20 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-app.php
r6010 r6025 128 128 $this->redirect($this->get_service_url()); 129 129 } 130 130 131 131 // dispatch 132 132 foreach($this->selectors as $regex => $funcs) { … … 221 221 222 222 $entry = array_pop($parser->feed->entries); 223 223 224 224 log_app('Received entry:', print_r($entry,true)); 225 225 226 226 $catnames = array(); 227 227 foreach($entry->categories as $cat) 228 228 array_push($catnames, $cat["term"]); 229 229 230 230 $wp_cats = get_categories(array('hide_empty' => false)); 231 231 232 232 $post_category = array(); 233 233 234 234 foreach($wp_cats as $cat) { 235 235 if(in_array($cat->cat_name, $catnames)) … … 253 253 $post_date = $pubtimes[0]; 254 254 $post_date_gmt = $pubtimes[1]; 255 255 256 256 if ( isset( $_SERVER['HTTP_SLUG'] ) ) 257 257 $post_name = $_SERVER['HTTP_SLUG']; … … 1114 1114 1115 1115 function rfc3339_str2time($str) { 1116 1116 1117 1117 $match = false; 1118 1118 if(!preg_match("/(\d{4}-\d{2}-\d{2})T(\d{2}\:\d{2}\:\d{2})\.?\d{0,3}(Z|[+-]+\d{2}\:\d{2})/", $str, $match)) 1119 1119 return false; 1120 1120 1121 1121 if($match[3] == 'Z') 1122 1122 $match[3] == '+0000'; 1123 1123 1124 1124 return strtotime($match[1] . " " . $match[2] . " " . $match[3]); 1125 1125 } … … 1128 1128 1129 1129 $pubtime = $this->rfc3339_str2time($entry->published); 1130 1130 1131 1131 if(!$pubtime) { 1132 1132 return array(current_time('mysql'),current_time('mysql',1));
Note: See TracChangeset
for help on using the changeset viewer.