Changeset 1002666
- Timestamp:
- 10/06/2014 05:06:37 PM (11 years ago)
- File:
-
- 1 edited
-
timespan/trunk/timespan.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
timespan/trunk/timespan.php
r999403 r1002666 4 4 Plugin URI: http://paper-leaf.com 5 5 Description: 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 6 Version: 1.0.1 7 7 Author: Paper Leaf Design 8 8 Author URI: http://paper-leaf.com … … 38 38 39 39 40 add_shortcode('time-span', 'time_to_read');41 40 42 41 function time_to_read() { … … 57 56 } 58 57 $full .= '</p></span>'; 59 // $full .= strval($time_in_minutes);60 58 return $full; 61 59 } else { 62 60 $time_in_minutes = round($time_in_minutes); // round the time to a full number 63 61 $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>'; 65 63 if (get_option('gt1') != '') { 66 64 $full .= get_option('gt1'); // get the option from WP backend … … 68 66 $full .= 'greater than'; 69 67 } 70 $ content.= '<span class="ts-time"> ' . $strTime . '</span> '; // add time onto the end of the content68 $full .= '<span class="ts-time"> ' . $strTime . '</span> '; // add time onto the end of the content 71 69 if (get_option('gt1po') != '') { 72 70 $full .= get_option('gt1po'); // get the option from WP backend … … 74 72 $full .= 'minutes'; 75 73 } 76 return $ content; // return rounded time74 return $full; // return rounded time 77 75 } 78 76 } 77 add_shortcode('time-span', 'time_to_read'); 79 78 80 79 function auto_TTR( $content ) {
Note: See TracChangeset
for help on using the changeset viewer.