meta-words-count.php 304 B

12345678910
  1. <?php
  2. function get_meta_words_count()
  3. {
  4. $id = get_the_ID();
  5. $words_count = get_post_meta(get_the_ID(), 'post_words_count', true);
  6. if(!$words_count) {
  7. $words_count = count_post_words($id);
  8. }
  9. return sprintf(_n("%s Word", "%s Words", $words_count, "sakurairo"), $words_count);
  10. }