Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
/** Custom Reading Time Meta Function */ function custom_reading_time_meta() { if ( \JNews\Single\SinglePost::getInstance()->show_reading_time_meta() ) { $output = ''; if ( vp_metabox( 'jnews_single_post.override_template' ) ) { $wpm = (int) vp_metabox( 'jnews_single_post.override.0.post_reading_time_wpm' ); } else { $wpm = (int) get_theme_mod( 'jnews_single_reading_time_wpm', 300 ); } $content = get_post_field( 'post_content', get_the_ID() ); if ( $content && $wpm ) { $content = strip_shortcodes( $content ); $word_count = str_word_count( $content ); $word_count = ceil( $word_count / $wpm ); $reading_time = jnews_return_translation( 'Reading Time: ', 'jnews', 'reading_time' ) . sprintf( _n( jnews_return_translation( '%d min read', 'jnews', 'min_read_s' ), jnews_return_translation( '%d mins read', 'jnews', 'min_read_p', 'jnews' ), $word_count ), $word_count ); if ( $word_count ) { $output = "
" . $reading_time . "
"; } } return jnews_sanitize_by_pass( $output ); } }
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)