Plugin Directory

Changeset 1002666


Ignore:
Timestamp:
10/06/2014 05:06:37 PM (11 years ago)
Author:
paperleaf
Message:

change variables, update version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • timespan/trunk/timespan.php

    r999403 r1002666  
    44Plugin URI: http://paper-leaf.com
    55Description: A simple, easy to use plugin which can be used to display the average time it will take to read a post.
    6 Version: 1.0
     6Version: 1.0.1
    77Author: Paper Leaf Design
    88Author URI: http://paper-leaf.com
     
    3838
    3939
    40 add_shortcode('time-span', 'time_to_read');
    4140
    4241function time_to_read() {
     
    5756        }
    5857        $full .= '</p></span>';
    59         // $full .= strval($time_in_minutes);
    6058        return $full;
    6159    } else {
    6260        $time_in_minutes = round($time_in_minutes); // round the time to a full number
    6361        $strTime = strval($time_in_minutes); // convert time to a string
    64         $content = '<span class="timespan greater-than"><p>';
     62        $full = '<span class="timespan greater-than"><p>';
    6563        if (get_option('gt1') != '') {
    6664            $full .= get_option('gt1'); // get the option from WP backend
     
    6866            $full .= 'greater than';
    6967        }
    70         $content .= '<span class="ts-time"> ' . $strTime . '</span> '; // add time onto the end of the content
     68        $full .= '<span class="ts-time"> ' . $strTime . '</span> '; // add time onto the end of the content
    7169        if (get_option('gt1po') != '') {
    7270            $full .= get_option('gt1po'); // get the option from WP backend
     
    7472            $full .= 'minutes';
    7573        }
    76         return $content; // return rounded time
     74        return $full; // return rounded time
    7775    }
    7876}
     77add_shortcode('time-span', 'time_to_read');
    7978
    8079function auto_TTR( $content ) {
Note: See TracChangeset for help on using the changeset viewer.