Plugin Directory

Changeset 1184078


Ignore:
Timestamp:
06/19/2015 09:40:05 AM (11 years ago)
Author:
kinging
Message:

Fixed in readme.txt and commented other files

Location:
tldr-smart-reading-timer/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • tldr-smart-reading-timer/trunk/TLDR.php

    r1184063 r1184078  
    1515
    1616require_once(plugin_dir_path(__FILE__) . 'class.php'); // import class
    17 require_once(plugin_dir_path(__FILE__) . 'filters.php'); // import filters
     17require_once(plugin_dir_path(__FILE__) . 'filters.php'); // import filters for non-supportive themes
    1818
    1919require_once(plugin_dir_path(__FILE__) . 'dashboard.php'); // import dashboard settings
  • tldr-smart-reading-timer/trunk/class.php

    r1184063 r1184078  
    99class TLDR
    1010{
     11    /*** Defaults ***/
    1112    private static  $reading_speed = 170, // Words per minute
    1213                    $image_staring_time = 0.1, /* 2 sec */ // The time it takes you to look at an image (mins)
    1314                    $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
    1617
    1718
  • tldr-smart-reading-timer/trunk/dashboard.php

    r1184063 r1184078  
    55    $menu_title = "TL;DR Settings";
    66    $capability = "manage_options";
    7     $menu_slug = "main-settings";
    8     $function = "get_settings_page";
     7
    98
    109    add_menu_page( $page_title, $menu_title, $capability,
     
    1918
    2019    if (isset($_POST["update_settings"])) {
    21 
     20        // Save all keys
    2221        $keys = array("reading_speed", "image_staring_time", "format", "force_title", "force_date");
    2322        foreach($keys as $key) {
  • tldr-smart-reading-timer/trunk/filters.php

    r1184063 r1184078  
    88
    99    function tldr_add_to_title($title) {
    10         if(get_post_type() == 'post')
     10        if(get_post_type() == 'post') // only for posts
    1111            return $title . ' ' . TLDR::get_mins_read_text();
    1212        else
     
    2424
    2525    function tldr_add_to_date($date) {
    26         if(get_post_type() == 'post')
     26        if(get_post_type() == 'post')  // only for posts
    2727            return $date . ' ' . TLDR::get_mins_read_text();
    2828        else
  • tldr-smart-reading-timer/trunk/readme.txt

    r1184063 r1184078  
    99
    1010== 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).
     11TL;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).
    1212
    1313This 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!
     
    1616
    1717== 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.
     18After 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.
    1919
    2020== Frequently Asked Questions ==
    21 I installed the plugin but I can\'t see the minutes on the website. Why?
     21I installed the plugin but I can't see the minutes on the website. Why?
    2222----
    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).
     23A: 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).
    2424
    2525
    2626
    2727== Screenshots ==
    28 1. (example) the plugin\'s result
     281. (example) the plugin's result
    29292. The plugin settings page
Note: See TracChangeset for help on using the changeset viewer.