0

I want to replace any saudian phone in specfic field in my theme "my-listings" in description and this my script in functions.php:

function cudjex($text){
    $text = preg_replace('/(009665|9665|\+9665|05|5)(5|0|3|6|4|9|1|8|7)([0-9]{7})/', '********', $text);
    return $text;
}
add_filter('comment_text', 'cudjex');

it works good in comments ,but I want it works in another field called description in my theme ,how?

1
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
    – Community Bot
    Jan 5 at 17:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.