ID, '_seconds_read_time', true ); // bail without the key if ( empty( $seconds ) ) { return $content; } // get our calculation $readtime = rkv_calc_read_time( $seconds ); // create a prefix $readprfx = __( 'Estimated read time:', 'rkv-reading-time' ); // make a fancy box $readbox = '
' . esc_attr( $readprfx ) . ' ' . esc_attr( $readtime ) . '
'; // send it back before the content return $readbox.$content; } add_filter( 'the_content', 'rkv_display_read_time', 10 );