- Timestamp:
- 11/29/08 08:10:03 (6 weeks ago)
- Location:
- plugins/blogroll/trunk
- Files:
-
- 2 modified
-
blogroll.plugin.php (modified) (3 diffs)
-
templates/blogroll.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
plugins/blogroll/trunk/blogroll.plugin.php
r1379 r1381 316 316 } 317 317 } 318 318 319 public function filter_post_xfn_relationships( $relationships, Post $post ) 320 { 321 if ($post->content_type == Post::type(self::CONTENT_TYPE)) { 322 $rel = array($relationships); 323 foreach( $this->info_fields as $info_field ) { 324 if (strpos($info_field, 'xfn_') === 0 && $post->info->$info_field){ 325 if (is_array($post->info->$info_field)) { 326 $rel = array_merge($rel, $post->info->$info_field); 327 } 328 else { 329 $rel[] = $post->info->$info_field; 330 } 331 } 332 } 333 return implode(' ', $rel); 334 } 335 } 336 319 337 public static function get_info_from_url( $url ) 320 338 { … … 427 445 } 428 446 429 public function filter_habminbar( $menu )447 public function filter_habminbar( array $menu ) 430 448 { 431 449 $menu['blogroll']= array( 'Blogroll', URL::get( 'admin', 'page=publish&content_type='.self::CONTENT_TYPE ) ); … … 487 505 } 488 506 489 public function filter_import_names( $import_names )507 public function filter_import_names( array $import_names ) 490 508 { 491 509 return array_merge( $import_names, array(_t('BlogRoll OPML file', 'blogroll')) ); -
plugins/blogroll/trunk/templates/blogroll.php
r1357 r1381 4 4 <ul> 5 5 <?php if ( ! empty( $blogs ) ) { foreach( $blogs as $blog ) { ?> 6 <li class="vcard"><a href="<?php echo $blog->info->url; ?>" class="url" title="<?php echo $blog->content; ?>" rel="<?php echo $blog->info->relationship s; ?>"><?php echo $blog->title; ?></a></li>6 <li class="vcard"><a href="<?php echo $blog->info->url; ?>" class="url" title="<?php echo $blog->content; ?>" rel="<?php echo $blog->info->relationship; ?> <?php echo $blog->xfn_relationships; ?>"><?php echo $blog->title; ?></a></li> 7 7 <?php } } ?> 8 8 </ul>
