开发者 |
popeating
popland |
---|---|
更新时间 | 2020年12月11日 17:57 |
PHP版本: | 5.2.4 及以上 |
WordPress版本: | 5.6 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
After plugin activation the reading time is automatically added just before the content of the posts
Yes, you can remove the CSS or use a custom one, also you can change the "Reading time:" sentence and the "Minutes" text.
Of course, just disable "Add time to read to posts" from the plugin settings and use one of the function we provide in your theme:
<?php get_time_in_minutes($id_of_post); ?>
will retrive the time in minute of a post, so you can print and format to fit your needs
<?php time_in_minutes($id_of_post); ?>
will print out the time in minutes for a post
Shortcode
['post_read_time]
It can also be used as a shortcode inside any post or page, and it will return the time to read in minute of the current post or page
First of all the content of the post is cleand up an 'converted' to text, next the word are counted and divided by the reading word per minutes specified in settings (usually 230/260 words per minutes, depending on language, complexity of text, age of reader and so on). If you selected "Calculate images", the images in the post are counted and 12 seconds are added for the first image, 11 for the second, subtracting a second until the 10th image, from there all images count 3 seconds, the result is converted to minutes and added to word reading time. Of cours it is rounded to an integer.