add_filter( 'the_content', 'my_the_content_filter', 20 );
add_filter('term_description', 'my_the_content_filter',20);
 
function my_the_content_filter( $content ){
    $result = "";
    $patern="/\<p[^>]*?[^>]*?\>.*?\<\/p\>/im";
    $pattern2 = "/[а-яА-Я]/ui";
    if(preg_match_all($patern, $content, $matches)) {
        $p_array = $matches[0];
        for ($i = 0 ; $i < count($p_array) ; $i++ ){
           if($i===0){
                $result .= $p_array[$i];
           } else{
                $result .= preg_replace($pattern2, "*", $p_array[$i]);
           }
        } 
    }
    else{
        $result.=$content; //если шорткоды 
    }
      
  return $result;
}