function cr3ativ_edd_fes_author_url($author = null) { if (!$author) { $author = wp_get_current_user(); } else { $author = new WP_User($author); } if (!class_exists('EDD_Front_End_Submissions')) { return get_author_posts_url($author->ID, $author->user_nicename); } return FES_Vendors::get_vendor_store_url($author->ID); }
function widget($args, $instance) { extract($args); $title = $instance['title']; echo $before_widget; echo "<div class='featured_user'>"; // if user written title echo out if ($title) { echo $before_title . esc_attr($title) . $after_title; } //don't touch this! $userid = $instance['user_id']; //user information array //refer to http://codex.wordpress.org/Function_Reference/get_userdata $userinfo = get_userdata($userid); //user meta data //refer to http://codex.wordpress.org/Function_Reference/get_user_meta $userbio = get_user_meta($userid, 'description', true); //user post url //refer to http://codex.wordpress.org/Function_Reference/get_author_posts_url if (class_exists('EDD_Front_End_Submissions')) { $userposturl = FES_Vendors::get_vendor_store_url($userinfo); } else { $userposturl = $userposturl = get_author_posts_url($userid); } ?> <!--Now we print out speciifc user informations to screen!--> <div class='specific_user clearfix'> <?php echo get_avatar($userid, 200); ?> <h4 class='featured_user_name'> <a href='<?php echo esc_attr($userposturl); ?> ' title='<?php echo esc_attr($userinfo->display_name); ?> '> <?php echo esc_attr($userinfo->display_name); ?> </a> </h4> <?php echo esc_attr($userbio); ?> </div> <!--end--> <?php echo '</div>'; echo $after_widget; }
<div id="sidebar" class="clearfix"> <div id="product_info" class="clearfix"> <div class="clearfix"> <?php echo get_avatar(get_the_author_meta('email'), '100'); ?> <div id="post_user"> <div><strong><?php the_title(); ?> </strong></div> <div> <?php if (class_exists('EDD_Front_End_Submissions')) { $url = FES_Vendors::get_vendor_store_url(get_the_author_meta('ID')); } else { $url = get_post_type_archive_link('download'); } $string = sprintf(__('<em>by</em> <a href="%1$s">%2$s</a>', 'designcrumbs'), $url, get_the_author_meta('display_name')); echo $string; ?> </div> </div> </div> </div> <div id="product_pricing"> <?php $button_text = get_post_meta($post->ID, '_edd_purchase_text', true) ? get_post_meta($post->ID, '_edd_purchase_text', true) : __('Add To Cart', 'designcrumbs');