| 开发者 | munizasultan |
|---|---|
| 更新时间 | 2026年9月11日 04:07 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[rdlt_reading_time] shortcode for manual placement, including [rdlt_reading_time id="123"] for another post.{time} / {unit} placeholders), and which post types it applies to.--rdlt-color, --rdlt-icon-color, --rdlt-font-size, --rdlt-gap), so a theme can restyle the badge from its own stylesheet.rdlt_word_count, rdlt_calculated_read_time, rdlt_read_time_text, rdlt_read_time_icon.readlyte-reading-time folder to /wp-content/plugins/.Yes. Set "Display mode" to "Shortcode / block only" in Settings → Readlyte, then use the [rdlt_reading_time] shortcode or the "Reading Time (Readlyte)" block wherever you like, or call RDLT_Display::instance()->render_badge( $post_id ) directly in a theme template.
Yes. The shortcode works with both. The block requires the block editor (Gutenberg / WordPress 5.8+).
HTML tags, shortcodes, and block-editor comments are stripped before counting whitespace-separated words in the visible text.
Yes, with the rdlt_read_time_icon filter. Return your own HTML (inline SVG, a <i> icon-font tag, or an <img>), or return an empty string to remove the icon entirely.
// Swap in a Font Awesome icon.
add_filter( 'rdlt_read_time_icon', function( $icon, $post_id ) {
return '';
}, 10, 2 );
// Remove the icon.
add_filter( 'rdlt_read_time_icon', '__return_empty_string' );
The icon is sanitized with wp_kses (svg/path/circle/i/span/img only), so only presentational markup gets through.
[rdlt_reading_time] shortcode, Gutenberg block, and Elementor widget.rdlt_word_count, rdlt_calculated_read_time, rdlt_read_time_text, rdlt_read_time_icon.