2011-01-14 5 views
1

Hy. 그러면 WYSISWYG 편집기를 통해 입력 된 특정 클래스의 모든 링크를 삭제하는 함수를 작성하는 방법을 아는 사람이 있습니까? 내가 wordpress 내장 - sanitize_title 기능에 대해 알고 있지만, 나는 그 링크 (특정 클래스의 링크)를 어떻게 참조 할 수 있는지 모르겠다. 도움을 주시면 감사하겠습니다.wordpress에서 인라인 링크를 살균 하시겠습니까?

답변

0

필터 기능을 사용하여 the_content()을 필터링하지 않는 이유는 무엇입니까?

function your_sanitizer_function($content){ 

    /* use some php here to change your content as you see fit... 
     for example, $content = str_replace('foo', 'bar', $content); 
    */ 

    return $content; 

} 
: 또한 functions.php에 the_content()의 정상 출력을 필터링 할 살균 함수를 작성이어서

add_filter ('the_content', 'your_sanitizer_function'); 

: 당신 functions.php 파일에서

는 필터 후크를 포함