Changeset 1184078
- Timestamp:
- 06/19/2015 09:40:05 AM (11 years ago)
- Location:
- tldr-smart-reading-timer/trunk
- Files:
-
- 5 edited
-
TLDR.php (modified) (1 diff)
-
class.php (modified) (1 diff)
-
dashboard.php (modified) (2 diffs)
-
filters.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tldr-smart-reading-timer/trunk/TLDR.php
r1184063 r1184078 15 15 16 16 require_once(plugin_dir_path(__FILE__) . 'class.php'); // import class 17 require_once(plugin_dir_path(__FILE__) . 'filters.php'); // import filters 17 require_once(plugin_dir_path(__FILE__) . 'filters.php'); // import filters for non-supportive themes 18 18 19 19 require_once(plugin_dir_path(__FILE__) . 'dashboard.php'); // import dashboard settings -
tldr-smart-reading-timer/trunk/class.php
r1184063 r1184078 9 9 class TLDR 10 10 { 11 /*** Defaults ***/ 11 12 private static $reading_speed = 170, // Words per minute 12 13 $image_staring_time = 0.1, /* 2 sec */ // The time it takes you to look at an image (mins) 13 14 $format = "(%% min. read)", // The format of the text 14 $force_title = "no", 15 $force_date = "no"; 15 $force_title = "no", // Forcing minutes to title 16 $force_date = "no"; // Forcing minutes to fate 16 17 17 18 -
tldr-smart-reading-timer/trunk/dashboard.php
r1184063 r1184078 5 5 $menu_title = "TL;DR Settings"; 6 6 $capability = "manage_options"; 7 $menu_slug = "main-settings"; 8 $function = "get_settings_page"; 7 9 8 10 9 add_menu_page( $page_title, $menu_title, $capability, … … 19 18 20 19 if (isset($_POST["update_settings"])) { 21 20 // Save all keys 22 21 $keys = array("reading_speed", "image_staring_time", "format", "force_title", "force_date"); 23 22 foreach($keys as $key) { -
tldr-smart-reading-timer/trunk/filters.php
r1184063 r1184078 8 8 9 9 function tldr_add_to_title($title) { 10 if(get_post_type() == 'post') 10 if(get_post_type() == 'post') // only for posts 11 11 return $title . ' ' . TLDR::get_mins_read_text(); 12 12 else … … 24 24 25 25 function tldr_add_to_date($date) { 26 if(get_post_type() == 'post') 26 if(get_post_type() == 'post') // only for posts 27 27 return $date . ' ' . TLDR::get_mins_read_text(); 28 28 else -
tldr-smart-reading-timer/trunk/readme.txt
r1184063 r1184078 9 9 10 10 == Description == 11 TL;DR is a common short for \"Too long - Didn\'t read\". This plugin allows you to put a small snippet next to each post which tells the users how long it would take to read the post, just like in [Medium.com](http://medium.com).11 TL;DR is a common short for "Too long - Didn't read". This plugin allows you to put a small snippet next to each post which tells the users how long it would take to read the post, just like in [Medium.com](http://medium.com). 12 12 13 13 This plugin is smarter than most reading timers, because it takes into account the images and the videos of the post. In the future there will be even more support for image height, better support for media (videos and mp3s), and more! … … 16 16 17 17 == Installation == 18 After the usual installation, you \'ll probably need to go to the settings and check one of the \"force ...\" checkboxes. This is to make sure your visitors cn see the minutes count even if your theme wasn\'t built to support TL;DR.18 After the usual installation, you'll probably need to go to the settings and check one of the "force ..." checkboxes. This is to make sure your visitors cn see the minutes count even if your theme wasn't built to support TL;DR. 19 19 20 20 == Frequently Asked Questions == 21 I installed the plugin but I can \'t see the minutes on the website. Why?21 I installed the plugin but I can't see the minutes on the website. Why? 22 22 ---- 23 A: Go to the settings page and check one of the \"force ..\" checkboxes. You can choose where to show the text - after the title or the date (more to come).23 A: Go to the settings page and check one of the "force .." checkboxes. You can choose where to show the text - after the title or the date (more to come). 24 24 25 25 26 26 27 27 == Screenshots == 28 1. (example) the plugin \'s result28 1. (example) the plugin's result 29 29 2. The plugin settings page
Note: See TracChangeset
for help on using the changeset viewer.