Ejemplo n.º 1
0
 function cb_author_list($cb_full_width = false)
 {
     $cb_authors = cb_authors_filter();
     $cb_authors_list = NULL;
     $i = 0;
     if ($cb_full_width == true) {
         $cb_line_amount = 4;
     } else {
         $cb_line_amount = 3;
     }
     if (count($cb_authors) > 0) {
         $cb_authors_list .= '<div class="cb-author-line clearfix">';
         foreach ($cb_authors as $author) {
             if ($i % $cb_line_amount == 0 && $i != 0) {
                 $cb_authors_list .= '</div><div class="cb-author-line clearfix">';
             }
             $cb_authors_list .= cb_author_details($author->ID, false);
             $i++;
         }
         $cb_authors_list .= '</div>';
     } else {
         $cb_authors_list .= '<h2>No Authors Enabled</h2><p>Tick the "Show On About Us Page Template" checkbox on each author profile you wish to showcase here.</p>';
     }
     return $cb_authors_list;
 }
Ejemplo n.º 2
0
 function cb_author_list($cb_full_width = false)
 {
     $cb_authors = cb_authors_filter();
     $cb_authors_list = NULL;
     $i = 0;
     $x = 1;
     if ($cb_full_width == true) {
         $cb_line_amount = 3;
     } else {
         $cb_line_amount = 2;
     }
     if (count($cb_authors) > 0) {
         $cb_authors_list .= '<div class="cb-author-line clearfix">';
         foreach ($cb_authors as $cb_author) {
             if ($i % $cb_line_amount == 0 && $i != 0) {
                 $cb_authors_list .= '</div><div class="cb-author-line clearfix">';
             }
             if ($cb_full_width == true) {
                 if ($x == 4) {
                     $x = 1;
                 }
                 $cb_class = 'cb-article-row-3 cb-article-row cb-no-' . $x;
             } else {
                 if ($x == 3) {
                     $x = 1;
                 }
                 $cb_class = 'cb-article-row-2 cb-article-row cb-no-' . $x;
             }
             $cb_authors_list .= cb_author_details($cb_author->ID, $cb_class);
             $i++;
             $x++;
         }
         $cb_authors_list .= '</div>';
     } else {
         $cb_authors_list .= '<h2>No Authors Are Currently Enabled</h2><p>Tick the "Show On About Us Page Template" checkbox on each author profile you wish to showcase here.</p>';
     }
     return $cb_authors_list;
 }