Basit aslında.
Yeni fonksiyonunuz echo yerine return üretirse, değişkene de atarsan yazdırabilirsin.
function kelime_sayar() { $hiz = 250; $kelime = str_word_count( strip_tags( get_post_field( 'post_content', get_the_ID() ) ) ); $sonuc = $kelime/$hiz; $sonuc = round($sonuc); $txt = sprintf("%s dakikada okuyabilirsiniz", $sonuc, 'text-domain'); if ($sonuc>0) { return $txt; } }$ks = kelime_sayar();
$cb_date = apply_filters( 'cb_byline_date', '<span class="cb-date"><time class="updated" datetime="' . get_the_time('Y-m-d', $cb_post_id) . '">' . date_i18n( get_option('date_format'), strtotime(get_the_time("Y-m-d", $cb_post_id )) ) . '</time></span><span class="cb-separator"><i class="fa fa-times"></i></span><span>'.$ks.'</span> ', $cb_post_id );