Changeset 884341
- Timestamp:
- 03/29/2014 07:49:27 PM (12 years ago)
- Location:
- wp-about-author
- Files:
-
- 24 added
- 5 edited
-
tags/1.4 (added)
-
tags/1.4/images (added)
-
tags/1.4/images/delicious.png (added)
-
tags/1.4/images/digg.png (added)
-
tags/1.4/images/facebook.png (added)
-
tags/1.4/images/feed.png (added)
-
tags/1.4/images/flickr.png (added)
-
tags/1.4/images/googleplus.png (added)
-
tags/1.4/images/jonbishopcom.png (added)
-
tags/1.4/images/linkedin.png (added)
-
tags/1.4/images/pinterest.png (added)
-
tags/1.4/images/reddit.png (added)
-
tags/1.4/images/stumbleupon.png (added)
-
tags/1.4/images/twitter.png (added)
-
tags/1.4/images/wordpress.png (added)
-
tags/1.4/images/wordpressorg.png (added)
-
tags/1.4/images/yelp.png (added)
-
tags/1.4/images/youtube.png (added)
-
tags/1.4/readme.txt (added)
-
tags/1.4/screenshot-1.png (added)
-
tags/1.4/screenshot-2.png (added)
-
tags/1.4/wp-about-author-admin.php (added)
-
tags/1.4/wp-about-author.css (added)
-
tags/1.4/wp-about-author.php (added)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/screenshot-1.png (modified) (previous)
-
trunk/wp-about-author-admin.php (modified) (6 diffs)
-
trunk/wp-about-author.css (modified) (1 diff)
-
trunk/wp-about-author.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-about-author/trunk/readme.txt
r510511 r884341 2 2 Contributors: JonBishop 3 3 Donate link: http://www.jonbishop.com/donate/ 4 Tags: author, author bio, author box, post, widget, bio, twitter, facebook, about, about author 4 Tags: author, author bio, author box, post, widget, bio, twitter, facebook, about, about author, author biography, avatar, user box, wp about author, guest author, guest post 5 5 Requires at least: 3.0 6 Tested up to: 3. 3.17 Stable tag: 1. 36 Tested up to: 3.8.1 7 Stable tag: 1.4 8 8 9 9 Easily display customizable author bios below your posts … … 19 19 1. Display settings allow you to control when to display author bios 20 20 1. Display text links or icons to a users social media profiles 21 1. Change the size and shape of your avatar 21 22 22 23 This plugin also expands your profile page by adding popular social media fields so it's easier for readers to follow your authors. … … 104 105 == Changelog == 105 106 106 The current version is 1.3 (2012.2.23) 107 The current version is 1.4 (2014.3.29) 108 109 = 1.4 (2014.3.29) = 110 * Fixed conflict with WordPress SEO 111 * Can change size and shape of Avatar image 112 * Fixed broken color picker 113 * Added link to Settings page from Plugins page 107 114 108 115 = 1.3 (2012.2.23) = -
wp-about-author/trunk/wp-about-author-admin.php
r510511 r884341 11 11 wp_enqueue_style('wp-admin'); 12 12 wp_enqueue_style('farbtastic'); 13 wp_enqueue_style('wp-color-picker'); 13 14 } 14 15 } … … 24 25 wp_enqueue_script('custom-background'); 25 26 } 27 } 28 29 //============================================= 30 // Display plugin Settings Link on plugins page 31 //============================================= 32 function wp_about_author_plugin_settings_link($links) { 33 $url = admin_url('options-general.php?page=wp-about-author/wp-about-author-admin.php'); 34 $settings_link = '<a href="'.$url.'">' . __('Settings') . '</a>'; 35 array_unshift( $links, $settings_link ); 36 return $links; 26 37 } 27 38 … … 84 95 $social_content = ""; 85 96 $box_content = ""; 97 $avatar_content = ""; 86 98 87 99 if (function_exists('wp_nonce_field')) { … … 108 120 $wrapped_content .= wp_about_author_postbox('wp-about-author-settings-general', 'Display Settings', $general_content); 109 121 122 $avatar_content .= '<p><strong>' . __("Size") . '</strong><br /> 123 <input type="text" name="wp_author_avatar_size" value="' . $wp_about_author_settings['wp_author_avatar_size'] . '" /><br /> 124 <small>By default, the size of the image is 100x100.</small></p>'; 125 $avatar_content .= '<p><strong>' . __("Display as Circle") . '</strong><br /> 126 <input type="checkbox" name="wp_author_avatar_shape" ' . checked($wp_about_author_settings['wp_author_avatar_shape'], 'on', false) . ' /> 127 <small>Display circular images instead of square ones.</small></p>'; 128 $wrapped_content .= wp_about_author_postbox('wp-about-author-settings-avatar', 'Avatar Settings', $avatar_content); 129 110 130 $social_content .= '<p><strong>' . __("Display Social Media Icons") . '</strong><br /> 111 131 <input type="checkbox" name="wp_author_social_images" ' . checked($wp_about_author_settings['wp_author_social_images'], 'on', false) . ' /> … … 114 134 115 135 $box_content .= '<p><strong>' . __("Box Background Color") . '</strong><br /> 116 <input type="text" name="wp_author_alert_bg" id="background-color" value="' . $wp_about_author_settings['wp_author_alert_bg'] . '" /> 117 <a class="hide-if-no-js" href="#" id="pickcolor">' . __('Select a Color') . '</a> 118 <div id="colorPickerDiv" style="z-index: 100; background:#eee; border:1px solid #ccc; position:absolute; display:none;"></div> 136 <input type="text" name="wp_author_alert_bg" id="background-color" value="' . $wp_about_author_settings['wp_author_alert_bg'] . '" /><br /> 119 137 <small>By default, the background color of the box is a yellowish tone.</small></p>'; 120 138 $box_content .= '<p><strong>' . __("Box Border") . '</strong><br /> … … 138 156 'wp_author_display_pages' => "", 139 157 'wp_author_display_feed' => "", 140 'wp_author_social_images' => "" 158 'wp_author_social_images' => "", 159 'wp_author_avatar_size' => "100", 160 'wp_author_avatar_shape' => "" 141 161 ); 142 162 $wp_about_author_settings = get_option('wp_about_author_settings'); -
wp-about-author/trunk/wp-about-author.css
r510511 r884341 33 33 border: 1px solid #e7e7e7; 34 34 float: left; 35 height: 100px;36 width: 100px;37 35 margin: 0 -122px 0 0; 38 36 padding: 10px; 39 37 } 40 .wp-about-author-pic img{ 41 width: 100px; 42 height: 100px; 43 max-width: 100px; 38 .wp-about-author-pic.wp-about-author-circle, 39 .wp-about-author-pic.wp-about-author-circle img { 40 border-radius: 50%; 44 41 } 45 42 .wp-about-author-text{ 46 float: left;47 43 margin: 0 0 0 140px; 44 display: inline-block; 48 45 } 49 46 .wp-about-author-text p { -
wp-about-author/trunk/wp-about-author.php
r510511 r884341 4 4 Plugin URI: http://www.jonbishop.com/downloads/wordpress-plugins/wp-about-author/ 5 5 Description: Easily display customizable author bios below your posts 6 Version: 1. 36 Version: 1.4 7 7 Author: Jon Bishop 8 8 Author URI: http://www.jonbishop.com … … 10 10 */ 11 11 12 define('WPAUTHORURL_URL', plugin_dir_url(__FILE__)); 13 define('WPAUTHORURL_PATH', plugin_dir_path(__FILE__)); 12 if (!defined('WPAUTHORURL_URL')) { 13 define('WPAUTHORURL_URL', plugin_dir_url(__FILE__)); 14 } 15 if (!defined('WPAUTHORURL_PATH')) { 16 define('WPAUTHORURL_PATH', plugin_dir_path(__FILE__)); 17 } 18 if (!defined('WPAUTHORURL_BASENAME')) { 19 define('WPAUTHORURL_BASENAME', plugin_basename(__FILE__)); 20 } 14 21 15 22 require_once(WPAUTHORURL_PATH."/wp-about-author-admin.php"); … … 23 30 24 31 $wp_about_author_content = ""; 25 $wp_about_author_links = "";26 $wp_about_author_social = "";32 $wp_about_author_links = ""; 33 $wp_about_author_social = ""; 27 34 $wp_about_author_author_pic = ""; 28 35 $wp_about_author_author = array(); … … 32 39 $wp_about_author_author['posts'] = (int)get_the_author_posts(); 33 40 $wp_about_author_author['posts_url'] = get_author_posts_url(get_the_author_meta('ID')); 34 $wp_about_author_author_pic = get_avatar(get_the_author_meta('email'), '100');41 $wp_about_author_author_pic = get_avatar(get_the_author_meta('email'), $wp_about_author_settings['wp_author_avatar_size']); 35 42 36 43 // About Author Title … … 64 71 $wp_about_author_content .= "</p>"; 65 72 } 66 73 74 // Avatar size and shape 75 $wp_about_author_avatar_class = 'wp-about-author-pic'; 76 if($wp_about_author_settings['wp_author_avatar_shape'] === "on"){ 77 $wp_about_author_avatar_class .= ' wp-about-author-circle'; 78 } 79 $wp_about_author_text_margin = ($wp_about_author_settings['wp_author_avatar_size'] + 40) . 'px'; 80 67 81 // Create output 68 82 $return_content = ''; 69 83 // Allow filters to create new templates for output 70 84 if (!$for_feed){ 71 $return_content = apply_filters( 'wp_about_author_template','<div class="wp-about-author-containter-%%bordertype%%" style="background-color:%%borderbg%%;"><div class=" wp-about-author-pic">%%authorpic%%</div><div class="wp-about-author-text">%%content%%</div></div>');85 $return_content = apply_filters( 'wp_about_author_template','<div class="wp-about-author-containter-%%bordertype%%" style="background-color:%%borderbg%%;"><div class="'.$wp_about_author_avatar_class.'">%%authorpic%%</div><div class="wp-about-author-text" style="margin-left:'.$wp_about_author_text_margin.'">%%content%%</div></div>'); 72 86 } else { 73 87 $return_content = apply_filters( 'wp_about_author_feed_template','<p><div style="float:left; text-align:left;>%%authorpic%%</div>%%content%%</p>'); … … 129 143 function wp_about_author_get_socials() { 130 144 $socials = array(); 131 $socials['twitter'] = array('title'=>'Twitter', 'link'=>'http://www.twitter.com/%%username%%', 'icon'=> WPAUTHORURL_URL .'/images/twitter.png'); 132 $socials['facebook'] = array('title'=>'Facebook', 'link'=>'http://www.facebook.com/%%username%%', 'icon'=> WPAUTHORURL_URL .'/images/facebook.png'); 133 $socials['linkedin'] = array('title'=>'LinkedIn', 'link'=>'http://www.linkedin.com/in/%%username%%', 'icon'=> WPAUTHORURL_URL .'/images/linkedin.png'); 134 $socials['pinterest'] = array('title'=>'Pinterest', 'link'=>'http://www.pinterest.com/%%username%%', 'icon'=> WPAUTHORURL_URL .'/images/pinterest.png'); 135 $socials['googleplus'] = array('title'=>'Google Plus', 'link'=>'https://plus.google.com/%%username%%', 'icon'=> WPAUTHORURL_URL .'/images/googleplus.png'); 136 $socials['digg'] = array('title'=>'Digg', 'link'=>'http://www.digg.com/%%username%%', 'icon'=> WPAUTHORURL_URL .'/images/digg.png'); 137 $socials['flickr'] = array('title'=>'Flickr', 'link'=>'http://www.flickr.com/people/%%username%%', 'icon'=> WPAUTHORURL_URL .'/images/flickr.png'); 138 $socials['stumbleupon'] = array('title'=>'StumbleUpon', 'link'=>'http://www.stumbleupon.com/stumbler/%%username%%', 'icon'=> WPAUTHORURL_URL .'/images/stumbleupon.png'); 139 $socials['youtube'] = array('title'=>'YouTube', 'link'=>'http://www.youtube.com/user/%%username%%', 'icon'=> WPAUTHORURL_URL .'/images/youtube.png'); 140 $socials['yelp'] = array('title'=>'Yelp', 'link'=>'http://www.yelp.com/user_details?userid=%%username%%', 'icon'=> WPAUTHORURL_URL .'/images/yelp.png'); 141 $socials['reddit'] = array('title'=>'Reddit', 'link'=>'http://www.reddit.com/user/%%username%%', 'icon'=> WPAUTHORURL_URL .'/images/reddit.png'); 142 $socials['delicious'] = array('title'=>'Delicious', 'link'=>'http://www.delicious.com/%%username%%', 'icon'=> WPAUTHORURL_URL .'/images/delicious.png'); 145 $socials['twitter'] = array('title'=>'Twitter', 'link'=>'http://www.twitter.com/%%username%%', 'icon'=> WPAUTHORURL_URL .'images/twitter.png'); 146 $socials['facebook'] = array('title'=>'Facebook', 'link'=>'http://www.facebook.com/%%username%%', 'icon'=> WPAUTHORURL_URL .'images/facebook.png'); 147 $socials['linkedin'] = array('title'=>'LinkedIn', 'link'=>'http://www.linkedin.com/in/%%username%%', 'icon'=> WPAUTHORURL_URL .'images/linkedin.png'); 148 $socials['pinterest'] = array('title'=>'Pinterest', 'link'=>'http://www.pinterest.com/%%username%%', 'icon'=> WPAUTHORURL_URL .'images/pinterest.png'); 149 if(defined( 'WPSEO_VERSION')){ 150 $socials['googleplus'] = array('title'=>'Google Plus', 'link'=>'%%username%%', 'icon'=> WPAUTHORURL_URL .'images/googleplus.png'); 151 } else { 152 $socials['googleplus'] = array('title'=>'Google Plus', 'link'=>'https://plus.google.com/%%username%%', 'icon'=> WPAUTHORURL_URL .'images/googleplus.png'); 153 } 154 $socials['digg'] = array('title'=>'Digg', 'link'=>'http://www.digg.com/%%username%%', 'icon'=> WPAUTHORURL_URL .'images/digg.png'); 155 $socials['flickr'] = array('title'=>'Flickr', 'link'=>'http://www.flickr.com/people/%%username%%', 'icon'=> WPAUTHORURL_URL .'images/flickr.png'); 156 $socials['stumbleupon'] = array('title'=>'StumbleUpon', 'link'=>'http://www.stumbleupon.com/stumbler/%%username%%', 'icon'=> WPAUTHORURL_URL .'images/stumbleupon.png'); 157 $socials['youtube'] = array('title'=>'YouTube', 'link'=>'http://www.youtube.com/user/%%username%%', 'icon'=> WPAUTHORURL_URL .'images/youtube.png'); 158 $socials['yelp'] = array('title'=>'Yelp', 'link'=>'http://www.yelp.com/user_details?userid=%%username%%', 'icon'=> WPAUTHORURL_URL .'images/yelp.png'); 159 $socials['reddit'] = array('title'=>'Reddit', 'link'=>'http://www.reddit.com/user/%%username%%', 'icon'=> WPAUTHORURL_URL .'images/reddit.png'); 160 $socials['delicious'] = array('title'=>'Delicious', 'link'=>'http://www.delicious.com/%%username%%', 'icon'=> WPAUTHORURL_URL .'images/delicious.png'); 143 161 return apply_filters( 'wp_about_author_get_socials', $socials ); 144 162 } … … 171 189 $tmp = array( 172 190 "wp_author_installed"=>"on", 173 "wp_author_version"=>"1 4",191 "wp_author_version"=>"15", 174 192 "wp_author_alert_bg"=>"#FFEAA8", 175 193 "wp_author_display_front"=>"on", … … 178 196 "wp_author_display_posts"=>"on", 179 197 "wp_author_display_pages"=>"on", 180 "wp_author_display_feed"=>"",198 "wp_author_display_feed"=>"", 181 199 "wp_author_alert_border"=>"top", 182 "wp_author_social_images"=>"on" 200 "wp_author_social_images"=>"on", 201 "wp_author_avatar_size"=>"100", 202 "wp_author_avatar_shape"=>"" 183 203 ); 184 204 update_option('wp_about_author_settings', $tmp); 185 205 } 186 if (!$tmp['wp_author_social_images']){ 187 $tmp['wp_author_display_feed'] = ""; 188 update_option('wp_about_author_settings', $tmp); 189 } 190 if (!$tmp['wp_author_display_feed']){ 191 $tmp['wp_author_display_feed'] = ""; 192 update_option('wp_about_author_settings', $tmp); 193 } 194 } 195 206 if (!$tmp['wp_author_social_images']){ 207 $tmp['wp_author_display_feed'] = ""; 208 update_option('wp_about_author_settings', $tmp); 209 } 210 if (!$tmp['wp_author_display_feed']){ 211 $tmp['wp_author_display_feed'] = ""; 212 update_option('wp_about_author_settings', $tmp); 213 } 214 if (!$tmp['wp_author_avatar_size']){ 215 $tmp['wp_author_avatar_size'] = "100"; 216 $tmp['wp_author_avatar_shape'] = ""; 217 update_option('wp_about_author_settings', $tmp); 218 219 } 220 } 221 222 function wp_about_author_shortcode( ){ 223 return wp_about_author_display(); 224 } 225 226 227 add_shortcode( 'wp_about_author', 'wp_about_author_shortcode' ); 196 228 197 229 add_action('admin_menu','add_wp_about_author_options_subpanel'); 198 230 add_action('admin_print_scripts', 'add_wp_about_author_admin_scripts'); 199 231 add_action('admin_print_styles', 'add_wp_about_author_admin_styles'); 232 add_filter('plugin_action_links_' . WPAUTHORURL_BASENAME, 'wp_about_author_plugin_settings_link'); 200 233 201 234 add_action('wp_print_styles', 'wp_about_author_style' );
Note: See TracChangeset
for help on using the changeset viewer.