<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
	<channel>
				<title><![CDATA[금지어 추가하는법]]></title>
		<link>https://www.cosmosfarm.com/threads/rss/document/57069</link>
		<description><![CDATA[<p>현재 kboard에서제공되는것은 제목과 내용 댓글 이 세개만 금지어가 가능한데</p>

<p>다른입력필드에 금지어하는법을알고싶습니다</p>]]></description>
		<copyright>Copyright 2026, 코스모스팜</copyright>
				<item>
			<title><![CDATA[안녕하세요~^^

KBoard 본문/제목/댓글 금지단어 설정을 다른 입력 필드에도 적용하고 싶으신 건지요?

...]]></title>
			<link>https://www.cosmosfarm.com/threads/document/57075</link>
			<description><![CDATA[<p>안녕하세요~^^</p>

<p>KBoard 본문/제목/댓글 금지단어 설정을 다른 입력 필드에도 적용하고 싶으신 건지요?</p>

<p>아래의 코드를 추가해보시겠어요?</p>

<pre>
<code class="language-php">add_action('kboard_pre_content_execute', 'kboard_pre_content_execute_20211224', 10, 2);
function kboard_pre_content_execute_20211224($content, $board){
	if($board-&gt;id == '1'){ // 실제 게시판 id로 적용해주세요.
		$text = isset($_POST['kboard_option_메타키']) ? $_POST['kboard_option_메타키'] : '';
		
		$replace = array(' ', '「', '」', '『', '』', '-', '_', '.', '(', ')', '［', '］', ',', '~', '＊', '+', '^', '♥', '★', '!', '#', '=', '­', '[', ']', '/', '▶', '▷', '&lt;', '&gt;', '%', ':', 'ღ', '$', '*', '♣', '♧', '☞');
		
		$content_filter = kboard_content_filter(true);
		if($content_filter){
			$subject = urldecode($text);
			$subject = strtolower($subject);
			$subject = str_replace($replace, '', $subject);
			
			$content_filter_message = get_option('kboard_content_filter_message', '');
			
			foreach($content_filter as $filter){
				if($filter &amp;&amp; strpos($subject, $filter) !== false){
					if($content_filter_message){
						$content_filter_message = sprintf($content_filter_message, $filter);
					}
					else{
						$content_filter_message = sprintf(__('%s is not available.', 'kboard'), $filter);
					}
					$content_filter_message = apply_filters('kboard_content_filter_message', $content_filter_message, $filter, $subject, $board);
					die("&lt;script&gt;alert('".$content_filter_message."');history.go(-1);&lt;/script&gt;");
				}
			}
		}
	}
}</code></pre>

<p>위의 코드에서 $board-&gt;id == '1' 부분은 실제 게시판 id로 적용해주세요.</p>

<p>메타키 부분은 실제 입력 필드의 메타키(옵션키)로 적용해주세요.</p>

<p> </p>

<p>테마의 functions.php 파일에 코드를 추가하거나 <a href="https://ko.wordpress.org/plugins/code-snippets/" target="_blank">Code Snippets</a> 플러그인을 사용해서 코드를 추가할 수 있습니다.</p>

<p>고맙습니다.</p>]]></description>
			<author>스레드봇</author>
			<pubDate>Fri, 24 Dec 2021 00:32:11 +0000</pubDate>
			<category>KBoard</category>
		</item>
			</channel>
</rss>