getAdminOptions(); } // Load widgets function load_widgets() { register_widget( 'AuthorListings_Widget' ); } function doGravatarImageLink ($email, $default = '', $size=110){ // construct the gravatar url, default to no alt image and 110px square $grav_url = "http://www.gravatar.com/avatar/" . md5( strtolower( $email ) ) . "?default=" . urlencode( $default ) . "&size=" . $size; return $grav_url; } function show_author_listings($args){ $defaults = array( ); $args = wp_parse_args( $args, $defaults ); extract( $args, EXTR_SKIP ); $authors = array(); $administrators = array(); $editors = array(); $contributors = array(); if ($author == 'yes'){ $authors = getUsersByRole('author'); } if ($administrator == 'yes'){ $administrators = getUsersByRole('administrator'); } if ($editor == 'yes'){ $editors = getUsersByRole('Editor'); } if ($contributor == 'yes'){ $contributors = getUsersByRole('contributor'); } $result = array_merge((array)$authors, (array)$editors, (array)$contributors, (array)$administrators ); sort($result); foreach ($result as $key => $value){ $user_info = get_userdata($value); $post_number =count_user_posts( $user_info->ID ); ?>
'all',); foreach ($sheets as $name => $media){ stylesheet_loader_author_listing($name, $media); } } function stylesheet_loader_author_listing($name, $media){ $myStyleUrl = WP_PLUGIN_URL . "/author-listings/".$name.".css" ; $myStyleFile = WP_PLUGIN_DIR . "/author-listings/".$name.".css" ; if ( file_exists($myStyleFile) ) { wp_register_style("authors-listings-".$name."" , $myStyleUrl,array(),1,"".$media."" ); wp_enqueue_style( "authors-listings-".$name.""); } } } function my_show_extra_profile_fields( $user ) { ?>| Address |
|
|||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
||||||||||
|
|
||||||||||
|
Please enter your author excerpt |
|
|
Please enter your Twitter URL. |
|
|
Please enter your facebook URL. |
|
|
Please enter your linked in URL. |