mh_author_box

The MH Corporate lite mh author box function.

Description

mh_author_box( (string) $author_ID = '' ); 

Parameters (1)

0. $author_id — Optional. (string) => ''
The author ID.

Usage

  1. if ( !function_exists( 'mh_author_box' ) ) { 
  2. require_once '/functions.php'; 
  3.  
  4. // The author ID. 
  5. $author_id = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = mh_author_box($author_id); 
  9.  

Defined (1)

The function is defined in the following location(s).

/functions.php  
  1. function mh_author_box($author_ID = '') { 
  2. if (get_the_author_meta('description', $author_ID) && !is_attachment()) { 
  3. $author_ID = get_the_author_meta('ID'); 
  4. $name = get_the_author_meta('display_name', $author_ID); 
  5. echo '<section class="author-box clearfix">' . "\n"; 
  6. echo '<div class="author-box-avatar">' . get_avatar($author_ID, 115) . '</div>' . "\n"; 
  7. echo '<div class="author-box-desc">' . "\n"; 
  8. echo '<h5 class="author-box-name">' . sprintf(__('About %s', 'mhc'), esc_attr($name)) . '</h5>' . "\n"; 
  9. echo '<p>' . esc_attr(get_the_author_meta('description', $author_ID)) . '</p>' . "\n"; 
  10. echo '</div>' . "\n"; 
  11. echo '</section>' . "\n";