Plugin Directory

Changeset 888082


Ignore:
Timestamp:
04/05/2014 08:33:09 PM (12 years ago)
Author:
JonBishop
Message:

Fixed update
Fixing title alignment with avatar
Fixing display of text area next to avatar

Location:
wp-about-author
Files:
24 added
4 edited

Legend:

Unmodified
Added
Removed
  • wp-about-author/trunk/readme.txt

    r884341 r888082  
    55Requires at least: 3.0
    66Tested up to: 3.8.1
    7 Stable tag: 1.4
     7Stable tag: 1.5
    88
    99Easily display customizable author bios below your posts
     
    8989
    9090The following filters have been added:
    91 wp_about_author_name - Modify the output of the name in the author box
    92 wp_about_author_description - Modify the output of the description in the author box
    93 wp_about_author_more_posts - Modify the "More Posts" text in the author box
    94 wp_about_author_website - Modify the "Website" text in the author box
    95 wp_about_author_follow_me - Modify the "Follow Me:" text in the author box
    96 wp_about_author_separator - Change the separator displayed between text links
     91* `wp_about_author_name()` - Modify the output of the name in the author box
     92* `wp_about_author_description()` - Modify the output of the description in the author box
     93* `wp_about_author_more_posts()` - Modify the "More Posts" text in the author box
     94* `wp_about_author_website()` - Modify the "Website" text in the author box
     95* `wp_about_author_follow_me()` - Modify the "Follow Me:" text in the author box
     96* `wp_about_author_separator()` - Change the separator displayed between text links
    9797
    9898
     
    105105== Changelog ==
    106106
    107 The current version is 1.4 (2014.3.29)
     107The current version is 1.5 (2014.4.5)
     108
     109= 1.5 (2014.4.5) =
     110* Fixed update
     111* Fixing title alignment with avatar
     112* Fixing display of text area next to avatar
    108113
    109114= 1.4 (2014.3.29) =
  • wp-about-author/trunk/wp-about-author-admin.php

    r884341 r888082  
    8989//=============================================
    9090function wp_about_author_general_settings() {
     91
     92    // Make sure we have defaults
     93    add_defaults_wp_about_author();
     94
    9195    $wp_about_author_settings = wp_about_author_process_settings();
    9296
     
    148152//
    149153function wp_about_author_get_options(){
    150     $fields = array(
    151         'wp_author_alert_border' => "",
    152         'wp_author_display_front' => "",
    153         'wp_author_display_archives' => "",
    154         'wp_author_display_search' => "",
    155         'wp_author_display_posts' => "",
    156         'wp_author_display_pages' => "",
    157         'wp_author_display_feed' => "",
    158         'wp_author_social_images' => "",
    159         'wp_author_avatar_size' => "100",
    160         'wp_author_avatar_shape' => ""
    161     );
    162154    $wp_about_author_settings = get_option('wp_about_author_settings');
     155    // Make sure we have defaults
     156    add_defaults_wp_about_author($wp_about_author_settings);
     157
    163158    return wp_parse_args( $wp_about_author_settings, $fields );
    164159}
  • wp-about-author/trunk/wp-about-author.css

    r884341 r888082  
    4242.wp-about-author-text{
    4343    margin: 0 0 0 140px;
    44     display: inline-block;
     44    display: table;
     45}
     46.wp-about-author-text > h3 {
     47    margin-top: 0;
    4548}
    4649.wp-about-author-text p {
  • wp-about-author/trunk/wp-about-author.php

    r884341 r888082  
    44Plugin URI: http://www.jonbishop.com/downloads/wordpress-plugins/wp-about-author/
    55Description: Easily display customizable author bios below your posts
    6 Version: 1.4
     6Version: 1.5
    77Author: Jon Bishop
    88Author URI: http://www.jonbishop.com
     
    1919    define('WPAUTHORURL_BASENAME', plugin_basename(__FILE__));
    2020}
     21if (!defined('WPAUTHORURL_VER')) {
     22    define('WPAUTHORURL_VER', '17');
     23}
    2124
    2225require_once(WPAUTHORURL_PATH."/wp-about-author-admin.php");
     
    2629function wp_about_author_display($for_feed = false){
    2730    global $post;
     31
    2832    $wp_about_author_settings=array();
    2933    $wp_about_author_settings=get_option('wp_about_author_settings');
     
    103107// Add buttons to page
    104108function insert_wp_about_author($content) {
    105     $wp_about_author_settings=wp_about_author_get_options();
     109    $wp_about_author_settings = wp_about_author_get_options();
     110    // Make sure we have defaults
     111    add_defaults_wp_about_author($wp_about_author_settings);
    106112   
    107         if(is_front_page() && isset($wp_about_author_settings['wp_author_display_front']) && $wp_about_author_settings['wp_author_display_front']){
     113    if(is_front_page() && isset($wp_about_author_settings['wp_author_display_front']) && $wp_about_author_settings['wp_author_display_front']){
    108114        $content.=wp_about_author_display();
    109115    } else if(is_archive() && isset($wp_about_author_settings['wp_author_display_archives']) && $wp_about_author_settings['wp_author_display_archives']){
     
    184190register_activation_hook(__FILE__, 'add_defaults_wp_about_author');
    185191// Define default option settings
    186 function add_defaults_wp_about_author() {
    187     $tmp = get_option('wp_about_author_settings');
     192function add_defaults_wp_about_author($tmp = "") {
     193    if(empty($tmp)){
     194        $tmp = get_option('wp_about_author_settings');
     195    }
     196
     197    // Check to see if we're up to date
     198    if(intval($tmp['wp_author_version']) >= WPAUTHORURL_VER){
     199        return false;
     200    }
     201
    188202    if(!is_array($tmp)) {
    189203        $tmp = array(
    190                     "wp_author_installed"=>"on",
    191                     "wp_author_version"=>"15",
    192                     "wp_author_alert_bg"=>"#FFEAA8",
    193                     "wp_author_display_front"=>"on",
    194                     "wp_author_display_archives"=>"on",
    195                     "wp_author_display_search"=>"",
    196                     "wp_author_display_posts"=>"on",
    197                     "wp_author_display_pages"=>"on",
    198                     "wp_author_display_feed"=>"",
    199                     "wp_author_alert_border"=>"top",
    200                     "wp_author_social_images"=>"on",
    201                     "wp_author_avatar_size"=>"100",
    202                     "wp_author_avatar_shape"=>""
    203                     );
     204            "wp_author_installed"=>"on",
     205            "wp_author_version"=>"16",
     206            "wp_author_alert_bg"=>"#FFEAA8",
     207            "wp_author_display_front"=>"on",
     208            "wp_author_display_archives"=>"on",
     209            "wp_author_display_search"=>"",
     210            "wp_author_display_posts"=>"on",
     211            "wp_author_display_pages"=>"on",
     212            "wp_author_display_feed"=>"",
     213            "wp_author_alert_border"=>"top",
     214            "wp_author_social_images"=>"on",
     215            "wp_author_avatar_size"=>"100",
     216            "wp_author_avatar_shape"=>""
     217        );
    204218        update_option('wp_about_author_settings', $tmp);
    205219    }
    206220    if (!$tmp['wp_author_social_images']){
     221            $tmp['wp_author_version'] = "14";
    207222            $tmp['wp_author_display_feed'] = "";
    208223            update_option('wp_about_author_settings', $tmp);
    209224    }
    210225    if (!$tmp['wp_author_display_feed']){
     226            $tmp['wp_author_version'] = "15";
    211227            $tmp['wp_author_display_feed'] = "";
    212228            update_option('wp_about_author_settings', $tmp);
    213229    }
    214     if (!$tmp['wp_author_avatar_size']){
    215             $tmp['wp_author_avatar_size'] = "100";
    216             $tmp['wp_author_avatar_shape'] = "";
     230    if (intval($tmp['wp_author_version']) < 17){
     231            $tmp['wp_author_version'] = "17";
     232            if(!isset($tmp['wp_author_avatar_size']))
     233                $tmp['wp_author_avatar_size'] = "100";
     234            if(!isset($tmp['wp_author_avatar_shape']))
     235                $tmp['wp_author_avatar_shape'] = "";
    217236            update_option('wp_about_author_settings', $tmp);
    218 
    219237    }
    220238}
    221239
    222240function wp_about_author_shortcode( ){
    223     return wp_about_author_display();
    224 }
    225 
     241    wp_about_author_display();
     242}
    226243
    227244add_shortcode( 'wp_about_author', 'wp_about_author_shortcode' );
Note: See TracChangeset for help on using the changeset viewer.