[ Index ]

PHP Cross Reference of PageLines Framework

title

Body

[close]

/sections/postauthor/ -> section.php (source)

   1  <?php
   2  /*
   3      Section: PostAuthor
   4      Author: PageLines
   5      Author URI: http://www.pagelines.com
   6      Description: Adds post author to page/single post.
   7      Class Name: PageLinesPostAuthor
   8      Workswith: main-single, author
   9      Failswith: archive, category, posts, tags, search, 404_page
  10  */
  11  
  12  /**
  13   * Post Author Section
  14   *
  15   * @package PageLines Framework
  16   * @author PageLines
  17   */
  18  class PageLinesPostAuthor extends PageLinesSection {
  19  
  20      /**
  21      * Section template.
  22      */
  23     function section_template() {
  24      global $post;
  25      setup_postdata($post);
  26  
  27      ob_start();
  28          the_author_meta('url');
  29      $link = ob_get_clean();
  30  ?>
  31  
  32          <div class="media author-info">
  33              <div class="img thumbnail author-thumb">
  34                  <a class="thumbnail" href="<?php echo $link; ?>" target="_blank">
  35                      <?php echo get_avatar( get_the_author_meta('email', $post->post_author), $size = '120', $default = PL_IMAGES . '/avatar_default.gif' ); ?>
  36                  </a>
  37              </div>
  38              <div class="bd">
  39                  <small class="author-note"><?php _e('Author', 'pagelines');?></small>
  40                  <h2>
  41                      <?php echo get_the_author(); ?>
  42                  </h2>
  43                  <p><?php the_author_meta('description', $post->post_author); ?></p>
  44                  <div class="author-details">
  45                      <?php if($link != ''):
  46                          printf( '<a href="%s" target="_blank">%s</a>', $link, __( 'Visit Authors Website &rarr;', 'pagelines') );
  47                      endif;
  48  
  49                      $google_profile = get_the_author_meta( 'google_profile' );
  50                      if ( $google_profile ) {
  51                          printf( '<br /><a href="%s" rel="me">%s</a>',  $google_profile, __( 'Authors Google Profile &rarr;', 'pagelines' ) );
  52                      } ?>
  53                  </div>
  54              </div>
  55  
  56          </div>
  57          <div class="clear"></div>
  58  <?php    }
  59  
  60  }


Generated: Sat Apr 6 23:00:27 2013 Cross-referenced by PHPXref 0.7.1