Usage
PHP
nebula()->estimated_reading_time($id);
Parameters
$id
(Optional) (Integer) The post to get reading time for
Default: Current post
Additional Notes
This returns the estimated reading time in minutes for an average of 250 words per minute reading speed.
Note: Be sure to hook custom fields into the Nebula word_count() function to get an accurate estimate!
Source File
Located in /libs/Functions.php on line 1022.
No Hooks
This function does not have any filters or actions available. Request one?Note: This function contains 1 to-do comment.
PHP
public function estimated_reading_time($id=false){ //@todo "Nebula" 0: Use null coalescing operator here if possible if ( empty($id) ){ $id = get_the_ID(); } $wpm = 250; //Words per minute reading speed $content = $this->word_count(array('id' => $id)); return intval(round($content/$wpm)); }
Override
This function can not be short-circuited with an override filter. Request one?