clean_content is working fine but for some reason word_count is not working , it returns 0. i was wondering if someone could help me!?

[ad_1]

`class read_time_counter`
`{`
`public static function bmb_read_time_counter(string $content, string $wpm = ‘300’) :string`
`{`
`$clean_content = strip_tags(strip_shortcodes($content));`
`$word_count = str_word_count($clean_content);`
`return ceil($word_count / $wpm);`
`}`
`}`

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer