WordPress.org

Plugin Directory

Changeset 566871


Ignore:
Timestamp:
07/03/12 12:07:44 (22 months ago)
Author:
ryanimel
Message:

tagging version 0.4

Location:
p2-check-in
Files:
6 added
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • p2-check-in/tags/0.4/p2-check-in.php

    r565673 r566871  
    44Plugin URI: http://wordpress.org/extend/plugins/p2-check-in 
    55Description: This plugin adds the ability for users to "check in" to the P2 theme when they're active. Once activated you'll find a new "Who is Checked In" widget that you can add to your sidebar, and a "Log In/I'm here!/I'm leaving!" button will automatically be added to your P2's header. 
    6 Version: 0.3.1 
     6Version: 0.4 
    77Author: Ryan Imel 
    88Author URI: http://wpcandy.com 
     
    1717} 
    1818add_action('wp_enqueue_scripts', 'p2checkinwidget_enqueue'); 
     19 
     20 
     21add_action( 'plugins_loaded', 'p2checkin_languages' );  
     22function p2checkin_languages() {  
     23    load_plugin_textdomain( 'p2-check-in', false, basename( dirname( __FILE__ ) ) . '/languages' ); 
     24} 
    1925 
    2026 
     
    115121function p2checkinwidget_user( $last_online_ts, $user ) { 
    116122     
    117     $avatar = '<a class="user-img" href="' . get_author_posts_url( $user->ID, $user->user_nicename ) . '" title="' . esc_attr( sprintf(__("Posts by %s"), $user->display_name) ) . '">' . get_avatar( $user->user_email, 52 ) . '</a>'; 
     123    $avatar = '<a class="user-img" href="' . get_author_posts_url( $user->ID, $user->user_nicename ) . '" title="' . esc_attr( sprintf(__( "Posts by %s", "p2-check-in" ), $user->display_name) ) . '">' . get_avatar( $user->user_email, 52 ) . '</a>'; 
    118124    $name = $user->display_name; 
    119     $link = '<p class="user-link"><a href="' . get_author_posts_url( $user->ID, $user->user_nicename ) . '" title="' . esc_attr( sprintf(__("Posts by %s"), $user->display_name) ) . '">' . $name . '</a></p>'; 
     125    $link = '<p class="user-link"><a href="' . get_author_posts_url( $user->ID, $user->user_nicename ) . '" title="' . esc_attr( sprintf(__( "Posts by %s", "p2-check-in" ), $user->display_name) ) . '">' . $name . '</a></p>'; 
    120126 
    121127    $link = apply_filters( 'p2checkinwidget_author_link', $link, $user ); 
     
    135141        $timesofar = ( $timenow - $timein ); 
    136142        $p2time_readable_temp = number_format( ( ( $timesofar + $p2checkin_totaltimedisplay ) / 60 / 60 ), 2, '.', '' ); 
    137         $timephrase = '<p><strong>Checked in for ' . human_time_diff( $timein, $timenow ) . '</strong></p><p class="minor">Total: ' . $p2time_readable_temp . ' hours<p>'; 
     143        $timephrase = '<p><strong>' . __( 'Checked in for ', 'p2-check-in' ) . human_time_diff( $timein, $timenow ) . '</strong></p><p class="minor">' . __( 'Total: ', 'p2-check-in' ) . $p2time_readable_temp . __( ' hours', 'p2-check-in' ) . '</p>'; 
    138144         
    139145        // Add the god action if the current user is an admin 
     
    159165    } else if ( !($rwi_checkedin ) AND ( ( $timenow - $rwi_checkedouttime ) < $timetoshow ) )  { 
    160166         
    161         $timephrase = '<p><strong>Left ' . human_time_diff( $rwi_checkedouttime, $timenow ) . ' ago.</strong></p><p class="minor">Total: ' . $p2time_readable . ' hours</p>'; 
     167        $timephrase = '<p><strong>' . __( 'Left', 'p2-check-in' )  . human_time_diff( $rwi_checkedouttime, $timenow ) . __( ' ago.', 'p2-check-in' ) . '</strong></p><p class="minor">' . __( 'Total: ', 'p2-check-in' ) . $p2time_readable . __( 'hours', 'p2-check-in' ) . '</p>'; 
    162168         
    163169        // They left somewhat recently 
     
    261267    if ( !( is_user_logged_in() ) ) { 
    262268         
    263         $buttonoutput = '<p id="p2-check-in-button"><a class="minor" href="' . wp_login_url( home_url() ) . '">Log In</a></p>'; 
     269        $buttonoutput = '<p id="p2-check-in-button"><a class="minor" href="' . wp_login_url( home_url() ) . '">' . __( 'Log In', 'p2-check-in' ) . '</a></p>'; 
    264270         
    265271    } else if ( $nowin ) { 
    266272         
    267         $buttonoutput = '<p id="p2-check-in-button"><a class="minor" href="?checkout=true">I&rsquo;m leaving!</a></p>'; 
     273        $buttonoutput = '<p id="p2-check-in-button"><a class="minor" href="?checkout=true">' . __( 'I&rsquo;m leaving!', 'p2-check-in' ) . '</a></p>'; 
    268274         
    269275    } else { 
    270276         
    271         $buttonoutput = '<p id="p2-check-in-button"><a href="?checkin=true">I&rsquo;m here!</a></p>'; 
     277        $buttonoutput = '<p id="p2-check-in-button"><a href="?checkin=true">' . __( 'I&rsquo;m here!', 'p2-check-in' ) . '</a></p>'; 
    272278         
    273279    } 
     
    292298         
    293299        extract($args); 
    294         echo $before_widget . $before_title . "Currently Checked In" . $after_title; 
     300        echo $before_widget . $before_title . __( 'Currently Checked In', 'p2-check-in' ) . $after_title; 
    295301         
    296302        echo checkin_checkout_button(); 
     
    308314    // This registers our widget so it appears with the other available 
    309315    // widgets and can be dragged and dropped into any active sidebars. 
    310     wp_register_sidebar_widget( 'widget_p2checkinwidget', "Who's Checked In", 'widget_p2checkinwidget', array( 'description' => 'Display who has checked into the office (or wherever) via P2.') ); 
    311 } 
     316    wp_register_sidebar_widget( 'widget_p2checkinwidget', __( "Who's Checked In", "p2-check-in" ), 'widget_p2checkinwidget', array( 'description' => __( 'Display who has checked into the office (or wherever) via P2.', 'p2-check-in' ) ) ); 
     317} 
  • p2-check-in/tags/0.4/readme.txt

    r565673 r566871  
    33Tags: p2, checkin, collaboration 
    44Requires at least: 3.0 
    5 Tested up to: 3.4 
    6 Stable tag: 0.3.1 
     5Tested up to: 3.4.1 
     6Stable tag: 0.4 
    77License: GPLv2 or later 
    88 
     
    3939== Changelog == 
    4040 
     41= 0.4 = 
     42* Feature: Made the plugin translation ready, kudos to David Decker for the reminder in the forums (http://wordpress.org/support/topic/plugin-p2-check-in-plugin-is-not-translateable?replies=2). Additional translations welcome! 
     43* Released: June 3, 2012 
     44 
    4145= 0.3.1 = 
    4246* Feature: Logged in admins can now check out users. Ideally this should only be done when someone forgets to check out or something. Use with caution. 
  • p2-check-in/trunk/p2-check-in.php

    r565673 r566871  
    44Plugin URI: http://wordpress.org/extend/plugins/p2-check-in 
    55Description: This plugin adds the ability for users to "check in" to the P2 theme when they're active. Once activated you'll find a new "Who is Checked In" widget that you can add to your sidebar, and a "Log In/I'm here!/I'm leaving!" button will automatically be added to your P2's header. 
    6 Version: 0.3.1 
     6Version: 0.4 
    77Author: Ryan Imel 
    88Author URI: http://wpcandy.com 
     
    1717} 
    1818add_action('wp_enqueue_scripts', 'p2checkinwidget_enqueue'); 
     19 
     20 
     21add_action( 'plugins_loaded', 'p2checkin_languages' );  
     22function p2checkin_languages() {  
     23    load_plugin_textdomain( 'p2-check-in', false, basename( dirname( __FILE__ ) ) . '/languages' ); 
     24} 
    1925 
    2026 
     
    115121function p2checkinwidget_user( $last_online_ts, $user ) { 
    116122     
    117     $avatar = '<a class="user-img" href="' . get_author_posts_url( $user->ID, $user->user_nicename ) . '" title="' . esc_attr( sprintf(__("Posts by %s"), $user->display_name) ) . '">' . get_avatar( $user->user_email, 52 ) . '</a>'; 
     123    $avatar = '<a class="user-img" href="' . get_author_posts_url( $user->ID, $user->user_nicename ) . '" title="' . esc_attr( sprintf(__( "Posts by %s", "p2-check-in" ), $user->display_name) ) . '">' . get_avatar( $user->user_email, 52 ) . '</a>'; 
    118124    $name = $user->display_name; 
    119     $link = '<p class="user-link"><a href="' . get_author_posts_url( $user->ID, $user->user_nicename ) . '" title="' . esc_attr( sprintf(__("Posts by %s"), $user->display_name) ) . '">' . $name . '</a></p>'; 
     125    $link = '<p class="user-link"><a href="' . get_author_posts_url( $user->ID, $user->user_nicename ) . '" title="' . esc_attr( sprintf(__( "Posts by %s", "p2-check-in" ), $user->display_name) ) . '">' . $name . '</a></p>'; 
    120126 
    121127    $link = apply_filters( 'p2checkinwidget_author_link', $link, $user ); 
     
    135141        $timesofar = ( $timenow - $timein ); 
    136142        $p2time_readable_temp = number_format( ( ( $timesofar + $p2checkin_totaltimedisplay ) / 60 / 60 ), 2, '.', '' ); 
    137         $timephrase = '<p><strong>Checked in for ' . human_time_diff( $timein, $timenow ) . '</strong></p><p class="minor">Total: ' . $p2time_readable_temp . ' hours<p>'; 
     143        $timephrase = '<p><strong>' . __( 'Checked in for ', 'p2-check-in' ) . human_time_diff( $timein, $timenow ) . '</strong></p><p class="minor">' . __( 'Total: ', 'p2-check-in' ) . $p2time_readable_temp . __( ' hours', 'p2-check-in' ) . '</p>'; 
    138144         
    139145        // Add the god action if the current user is an admin 
     
    159165    } else if ( !($rwi_checkedin ) AND ( ( $timenow - $rwi_checkedouttime ) < $timetoshow ) )  { 
    160166         
    161         $timephrase = '<p><strong>Left ' . human_time_diff( $rwi_checkedouttime, $timenow ) . ' ago.</strong></p><p class="minor">Total: ' . $p2time_readable . ' hours</p>'; 
     167        $timephrase = '<p><strong>' . __( 'Left', 'p2-check-in' )  . human_time_diff( $rwi_checkedouttime, $timenow ) . __( ' ago.', 'p2-check-in' ) . '</strong></p><p class="minor">' . __( 'Total: ', 'p2-check-in' ) . $p2time_readable . __( 'hours', 'p2-check-in' ) . '</p>'; 
    162168         
    163169        // They left somewhat recently 
     
    261267    if ( !( is_user_logged_in() ) ) { 
    262268         
    263         $buttonoutput = '<p id="p2-check-in-button"><a class="minor" href="' . wp_login_url( home_url() ) . '">Log In</a></p>'; 
     269        $buttonoutput = '<p id="p2-check-in-button"><a class="minor" href="' . wp_login_url( home_url() ) . '">' . __( 'Log In', 'p2-check-in' ) . '</a></p>'; 
    264270         
    265271    } else if ( $nowin ) { 
    266272         
    267         $buttonoutput = '<p id="p2-check-in-button"><a class="minor" href="?checkout=true">I&rsquo;m leaving!</a></p>'; 
     273        $buttonoutput = '<p id="p2-check-in-button"><a class="minor" href="?checkout=true">' . __( 'I&rsquo;m leaving!', 'p2-check-in' ) . '</a></p>'; 
    268274         
    269275    } else { 
    270276         
    271         $buttonoutput = '<p id="p2-check-in-button"><a href="?checkin=true">I&rsquo;m here!</a></p>'; 
     277        $buttonoutput = '<p id="p2-check-in-button"><a href="?checkin=true">' . __( 'I&rsquo;m here!', 'p2-check-in' ) . '</a></p>'; 
    272278         
    273279    } 
     
    292298         
    293299        extract($args); 
    294         echo $before_widget . $before_title . "Currently Checked In" . $after_title; 
     300        echo $before_widget . $before_title . __( 'Currently Checked In', 'p2-check-in' ) . $after_title; 
    295301         
    296302        echo checkin_checkout_button(); 
     
    308314    // This registers our widget so it appears with the other available 
    309315    // widgets and can be dragged and dropped into any active sidebars. 
    310     wp_register_sidebar_widget( 'widget_p2checkinwidget', "Who's Checked In", 'widget_p2checkinwidget', array( 'description' => 'Display who has checked into the office (or wherever) via P2.') ); 
    311 } 
     316    wp_register_sidebar_widget( 'widget_p2checkinwidget', __( "Who's Checked In", "p2-check-in" ), 'widget_p2checkinwidget', array( 'description' => __( 'Display who has checked into the office (or wherever) via P2.', 'p2-check-in' ) ) ); 
     317} 
  • p2-check-in/trunk/readme.txt

    r565673 r566871  
    33Tags: p2, checkin, collaboration 
    44Requires at least: 3.0 
    5 Tested up to: 3.4 
    6 Stable tag: 0.3.1 
     5Tested up to: 3.4.1 
     6Stable tag: 0.4 
    77License: GPLv2 or later 
    88 
     
    3939== Changelog == 
    4040 
     41= 0.4 = 
     42* Feature: Made the plugin translation ready, kudos to David Decker for the reminder in the forums (http://wordpress.org/support/topic/plugin-p2-check-in-plugin-is-not-translateable?replies=2). Additional translations welcome! 
     43* Released: June 3, 2012 
     44 
    4145= 0.3.1 = 
    4246* Feature: Logged in admins can now check out users. Ideally this should only be done when someone forgets to check out or something. Use with caution. 
Note: See TracChangeset for help on using the changeset viewer.