'buffercode_author_list_info', 'description' => 'Author List Display' ); parent::__construct( 'buffercode_author_list_info', 'Author List', $widget_ops ); } public function form($instance) { global $wp_roles; if (!isset($wp_roles)) { $wp_roles = new WP_Roles(); } $buffercode_author_list_options = array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8', '9' => '9', '10' => '10', 'All' => '99'); $buffercode_author_list_cutom_title = isset($instance['buffercode_author_list_cutom_title']) ? $instance['buffercode_author_list_cutom_title'] : 'Our Authors'; $buffercode_author_list_limit = isset($instance['buffercode_author_list_limit']) ? $instance['buffercode_author_list_limit'] : 5; $buffercode_author_list_img_size = isset($instance['buffercode_author_list_img_size']) ? $instance['buffercode_author_list_img_size'] : 48; $buffercode_author_list_role = isset($instance['buffercode_author_list_role']) ? $instance['buffercode_author_list_role'] : 'author'; $buffercode_author_list_roles = $wp_roles->get_names(); ?>

Roles:

Custom Name:

Number of Authors:

Author Image Size:

0) { foreach ($buffercode_author_list_uc as $value) { $post = ''; $buffercode_author_list_author_email = get_the_author_meta('user_email', $value->ID); $buffercode_author_list_author_login_id = get_the_author_meta('user_login', $value->ID); $buffercode_author_list_author_nickname = get_the_author_meta('nickname', $value->ID); ?>
  • 5, 'author' => $value->ID,]); $post .= '
      '; foreach ($authorPosts as $authorPost) { $post .= '
    • ' . $authorPost->post_title . '
    • '; } $post .= '
    '; ?>
    Total Post :ID); ?>

    0) { echo '
    Recent Posts
    '; echo $post; } ?>
  • $i) $i++; else break; } else { if ($k > $j) $j++; else break; } } } else { echo 'Sorry there are no user under the role ' . $buffercode_author_list_role; } echo $after_widget; } }