나는 사용자에게 전화 번호 형식을 표시하도록 제한하려는 시나리오가 있습니다.WordPress the_content()에서 숫자 서식 스타일을 제거 할 수 있습니까?
간단히 말해서 사용자가 설명 및 기타 필드가있는 자신의 목록을 추가 할 수있는 WordPress의 목록 웹 사이트가 있습니다. 사용자는 설명 탭 (프론트 엔드에 wp_editor가 있음)에 비즈니스 주소를 추가합니다.
이제 전화 번호 또는 팩스 번호와 같은 번호 서식을 제거하고 싶다고 표시되면.
프론트 엔드에서 숨길 수 있습니까? the_content 필터를 시도했지만 작동하지 않습니다.
add_filter('the_content','manipulate_content');
function manipulate_content($content){
// Here manipulate your content, you can replace string which is exactly matching your format. eg is given below
$content = preg_replace('/\d{3}([().-\s[\]]*)\d{3}([().-\s[\]]*)\d{4}/',
"*phone*", $content);
return $content;
}
당신이뿐만 아니라 사이트 링크를 줄 수 - –
나는이 테마 https://themeforest.net/item/superlist-directory-wordpress-theme/13507181을 사용했고 그들은 목록 작성을 위해 사용 된 inbuild inventor plugin을 가지고있다. –