• First of all, great plugin!

    Wouldn’t it make more sense to count the words output by shortcodes since there are page builders out there that actually have text blocks.

    My recommendation would be to generate the full output of the content by applying the_content filter than counting the words. We could save the count in a meta value and clear it whenever the post is saved so we can cache the value of rt_calculate_reading_time to further optimize things.

    – AJ

Viewing 1 replies (of 1 total)
  • Plugin Author Jason Yingling

    (@yingling017)

    Originally my concern with shortcodes was around not knowing what they would output, but as the plugin has evolved it may be worth it to revisit that. Since we could render the shortcodes and strip out the markup generated with wp_strip_all_tags.

    Storing something in postmeta is something on the feature list too when I get some time to rework the plugin.

Viewing 1 replies (of 1 total)

The topic ‘Count shortcode output & cache result’ is closed to new replies.