<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
	<channel>
				<title><![CDATA[관리자 승인 대기 중인 글을 승인전까지 리스트 목록에도 보이지 않게 할 수 있나요?]]></title>
		<link>https://www.cosmosfarm.com/threads/rss/document/22764</link>
		<description><![CDATA[<p>승인대기중인글도 내용 말고 에디터 목록 글들은 다 볼 수 있는데</p>

<p>혹시 유저가 글을 쓰고 승인 대기 중인 글은 승인하기 전까지 목록에 보이지 않게 할 수 있나요?</p>]]></description>
		<copyright>Copyright 2026, 코스모스팜</copyright>
				<item>
			<title><![CDATA[안녕하세요~^^

필터는 여러 개 중복해서 사용하셔도 문제없습니다.

다만, PHP에서 같은 함수명을 중복...]]></title>
			<link>https://www.cosmosfarm.com/threads/document/24395</link>
			<description><![CDATA[<p>안녕하세요~^^</p>

<p>필터는 여러 개 중복해서 사용하셔도 문제없습니다.</p>

<p>다만, PHP에서 같은 함수명을 중복해서 사용할 수는 없습니다.</p>

<p>올려주신 코드 중에서 아래의 코드를</p>

<pre>
<code class="language-php">/*승인대기 목록에서 안보이게*/
add_filter('kboard_list_where', 'my_kboard_list_where', 10, 3);
function my_kboard_list_where($where, $board_id, $content_list){
	if(in_array($board_id, array('2', '3', '4', '10'))){
		$where .= "AND (`status`='' OR `status` IS NULL)";
	}
	return $where;
}</code></pre>

<p>아래의 코드로 교체해보시겠어요?</p>

<pre>
<code class="language-php">/*승인대기 목록에서 안보이게*/
add_filter('kboard_list_where', 'my_kboard_list_where1', 10, 3);
function my_kboard_list_where1($where, $board_id, $content_list){
	if(in_array($board_id, array('2', '3', '4', '10'))){
		$where .= "AND (`status`='' OR `status` IS NULL)";
	}
	return $where;
}</code></pre>

<p>고맙습니다.</p>]]></description>
			<author>스레드봇</author>
			<pubDate>Mon, 09 Jul 2018 03:28:58 +0000</pubDate>
			<category>KBoard</category>
		</item>
				<item>
			<title><![CDATA[위의 답변을 보고 펑션파일을 수정하니까 error 코드 500이 뜹니다.

아래는 펑션파일의 전체 내용입니...]]></title>
			<link>https://www.cosmosfarm.com/threads/document/24393</link>
			<description><![CDATA[<p>위의 답변을 보고 펑션파일을 수정하니까 error 코드 500이 뜹니다.</p>

<p>아래는 펑션파일의 전체 내용입니다. 혹시 펑션파일 안에서 같은 필터가 두개 있어서 충돌이 난 것일까요?</p>

<p>add_filter('kboard_list_where', 'my_kboard_list_where', 10, 3);</p>

<pre>
<code>&lt;?php
// Exit if accessed directly
if ( !defined( 'ABSPATH' ) ) exit;

// BEGIN ENQUEUE PARENT ACTION
// AUTO GENERATED - Do not modify or remove comment markers above or below:

// END ENQUEUE PARENT ACTION
add_filter('kboard_content_date', 'my_kboard_content_date', 10, 3);
function my_kboard_content_date($date, $content, $board){
	$date = date('Y.m.d', strtotime($content-&gt;date));
	return $date;
}
function my_login_logo() { ?&gt;
&lt;style type="text/css"&gt;
body.login div#login h1 a {
background-image: url(&lt;?php echo get_stylesheet_directory_uri(); ?&gt;/images/site-login-logo.png);
padding-bottom: 1px;
}
&lt;/style&gt;
&lt;?php }
add_action( 'login_enqueue_scripts', 'my_login_logo' );

/*메인화면에게시글미리보기길이조정*/
add_shortcode('my_kboard_latest_content_view', 'my_kboard_latest_content_view');
function my_kboard_latest_content_view($args=array()){
	global $wpdb;
	$board_id = '7'; // 보여주고자 하는 게시판 번호 입력 
	$result = $wpdb-&gt;get_row("SELECT * FROM `{$wpdb-&gt;prefix}kboard_board_content` WHERE `board_id`='$board_id' AND (`status`='' OR `status` IS NULL OR `status`='pending_approval') ORDER BY `date` DESC LIMIT 1");
	
	if($result){
		$content = new KBContent();
		$content-&gt;initWithUID($result-&gt;uid);
		$url = new KBUrl();
		$router = new KBRouter();
		$board_url = $router-&gt;getContentURL($result-&gt;uid);
		
		$content-&gt;content = wp_strip_all_tags($content-&gt;content);
		$content-&gt;content = mb_strimwidth($content-&gt;content, 0, 250, '...', 'utf-8'); // 100 수치를 조절하시면 길이를 조절할 수 있습니다.
		
		ob_start();
        echo '&lt;div class="kboard-title"&gt;';
        if($content-&gt;isNew()){
            echo '&lt;span class="kboard-default-new-notify"&gt;N&lt;/span&gt;';
        }
        echo '&lt;a href="'.$url-&gt;set('uid', $content-&gt;uid)-&gt;set('mod', 'document')-&gt;toStringWithPath($board_url).'"&gt; '.$content-&gt;title.'&lt;/a&gt;&lt;/div&gt;';
        echo '&lt;div class="kboard-content"&gt;'.$content-&gt;content.'&lt;/div&gt;';
        return ob_get_clean();
	}
}

/*댓글자동링크적용*/
add_filter('kboard_comments_content', 'my_kboard_comments_content', 10, 3);
function my_kboard_comments_content($comment, $comment_uid, $content_uid){
	return preg_replace_callback('#(?i)(http|https)?(://)?(([-\w^@]+\.)+(kr|co.kr|go.kr|net|org|edu|gov|me|com|co+)(?:/[^,\s]*|))#', 'kboard_comment_autolink_prependHTTP', $comment);
}

function kboard_comment_autolink_prependHTTP($m){
	$mStr = $m[1].$m[2].$m[3];
	if(preg_match('#([a-z0-9&amp;\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#', $mStr)){
		return "&lt;a href=\"mailto:".$m[2].$m[3]."\" target=\"_blank\"&gt;".$m[1].$m[2].$m[3]."&lt;/a&gt;";
	}
	else{
		$http = (!preg_match("#(https://)#", $mStr)) ? 'http://' : 'https://';
		return "&lt;a href=\"".$http.$m[3]."\" target=\"_blank\"&gt;".$m[1].$m[2].$m[3]."&lt;/a&gt;";
	}
}
/*최신글미리보기답글표시*/
add_filter('kboard_list_where', 'my_kboard_list_where', 10, 3);
function my_kboard_list_where($where, $board_id, $content_list){
	if($content_list-&gt;is_latest &amp;&amp; in_array($board_id, array('2', '3', '4', '5', '6', '7'))){
		if($content_list-&gt;category1){
			$where = "`board_id`='{$board_id}' AND `category1`='{$content_list-&gt;category1}' AND (`status`='' OR `status` IS NULL OR `status`='pending_approval')";
		}
		else{
			$where = "`board_id`='{$board_id}' AND (`status`='' OR `status` IS NULL OR `status`='pending_approval')";
		}
	}
	return $where;
}
/*특정글new표시길게*/
add_filter('kboard_content_is_new', 'my_kboard_content_is_new', 10, 2);
function my_kboard_content_is_new($is_new, $content){
	if(in_array($content-&gt;uid, array(''))){ // 'uid번호'여러개일때는쉼표로구분함
		$is_new = true;
	}
	return $is_new;
}
/*로그인사용자일때작성자입력필드표시시작*/
add_action('init', 'kboard_comments_field_reshape');
function kboard_comments_field_reshape(){
	if(is_user_logged_in()){
		
		// 기존 댓글 입력 필드의 출력을 삭제합니다.
		remove_action('kboard_comments_field', 'kboard_comments_field', 10, 4);
		
		// 새로운 댓글 입력 필드를 출력합니다.
		add_action('kboard_comments_field', 'my_kboard_comments_field', 10, 4);
	}
}


function my_kboard_comments_field($field_html, $board, $content_uid, $comment_builder){
	?&gt;
	&lt;div class="comments-field"&gt;
		&lt;label class="comments-field-label" for="comment_member_display"&gt;&lt;?php echo __('Author', 'kboard-comments')?&gt;&lt;/label&gt;
		&lt;input type="text" id="comment_member_display" name="member_display" value="" placeholder="&lt;?php echo __('Author', 'kboard-comments')?&gt;..." required&gt;
	&lt;/div&gt;
	&lt;?php
}

/*새글과댓글알림기능추가*/
add_action('kboard_comments_insert', 'my_kboard_comments_insert', 10, 3);
function my_kboard_comments_insert($comment_uid, $content_uid, $board){
	$comment = new KBComment();
	$comment-&gt;initWithUID($comment_uid);
	
	if(!$board-&gt;isAdmin()){
		if(!class_exists('KBMail')){
			include_once KBOARD_DIR_PATH . '/class/KBMail.class.php';
		}
		$url = new KBUrl();
		$mail = new KBMail();
		$mail-&gt;to = explode(',', $board-&gt;meta-&gt;latest_alerts);
		$mail-&gt;title = "댓글이 등록 되었습니다.";
		$mail-&gt;content = $comment-&gt;content;
		$mail-&gt;url = $url-&gt;getDocumentRedirect($content_uid);
		$mail-&gt;url_name = '페이지로 이동';
		$mail-&gt;send();
	}
}
/*관리자에게만 아이피 표시*/
add_filter('kboard_document_add_option_value_field_data', 'my_kboard_document_add_option_value_field_data', 10, 3);
function my_kboard_document_add_option_value_field_data($field, $content, $board){
	if(isset($field['meta_key']) &amp;&amp; $field['meta_key'] == 'ip' &amp;&amp; !$board-&gt;isAdmin()){
		return array();
	}
	return $field;
}
/*승인대기 목록에서 안보이게*/
add_filter('kboard_list_where', 'my_kboard_list_where', 10, 3);
function my_kboard_list_where($where, $board_id, $content_list){
	if(in_array($board_id, array('2', '3', '4', '10'))){
		$where .= "AND (`status`='' OR `status` IS NULL)";
	}
	return $where;
}</code></pre>

<p> </p>]]></description>
			<author>2kiya</author>
			<pubDate>Mon, 09 Jul 2018 03:20:28 +0000</pubDate>
			<category>KBoard</category>
		</item>
				<item>
			<title><![CDATA[해결되었습니다. 감사합니다^^]]></title>
			<link>https://www.cosmosfarm.com/threads/document/22929</link>
			<description><![CDATA[<p>해결되었습니다. 감사합니다^^</p>]]></description>
			<author>Levitt</author>
			<pubDate>Fri, 01 Jun 2018 00:36:26 +0000</pubDate>
			<category>KBoard</category>
		</item>
				<item>
			<title><![CDATA[안녕하세요.

특정 게시판이 여러 개 일 때는

아래의 코드처럼 해주시면 됩니다.


add_filter('kboard...]]></title>
			<link>https://www.cosmosfarm.com/threads/document/22871</link>
			<description><![CDATA[<p>안녕하세요.</p>

<p>특정 게시판이 여러 개 일 때는</p>

<p>아래의 코드처럼 해주시면 됩니다.</p>

<pre>
<code class="language-php">add_filter('kboard_list_where', 'my_kboard_list_where', 10, 3);
function my_kboard_list_where($where, $board_id, $content_list){
	if(in_array($board_id, array('1', '2', '3'))){
		$where .= "AND (`status`='' OR `status` IS NULL)";
	}
	return $where;
}</code></pre>

<p>in_array에 대한 자세한 내용은 아래의 링크를 참고해보시겠어요?</p>

<p><a href="http://php.net/manual/kr/function.in-array.php" target="_blank">http://php.net/manual/kr/function.in-array.php</a></p>

<p>고맙습니다.</p>]]></description>
			<author>스레드봇</author>
			<pubDate>Wed, 30 May 2018 23:47:29 +0000</pubDate>
			<category>KBoard</category>
		</item>
				<item>
			<title><![CDATA[해결되었습니다.

다만 게시판 2개를 쓰고 있어요

customer(id =1),ocean franchise(id =3) 두개인데

...]]></title>
			<link>https://www.cosmosfarm.com/threads/document/22855</link>
			<description><![CDATA[<p>해결되었습니다.</p>

<p>다만 게시판 2개를 쓰고 있어요</p>

<p>customer(id =1),ocean franchise(id =3) 두개인데</p>

<p>저 코드를 숫자만 바꿔서 두번 넣었더니 error코드 500 이 뜹니다. </p>

<p>그래서 중간에 ($board_id == '1')($board_id == '3') 두개 넣어도 똑같구요.</p>

<p>두 게시판 모두 효과를 보고 싶은데 방법이 있을까요?</p>]]></description>
			<author>Levitt</author>
			<pubDate>Wed, 30 May 2018 08:01:49 +0000</pubDate>
			<category>KBoard</category>
		</item>
				<item>
			<title><![CDATA[안녕하세요.

테마 편집기 페이지에서 functions.php 파일 업데이트 시 오류 메시지가 표시된다면

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

<p>테마 편집기 페이지에서 functions.php 파일 업데이트 시 오류 메시지가 표시된다면</p>

<p>플러그인 충돌 또는 호스팅 문제일 듯합니다.</p>

<p>모든 플러그인을 비활성화하고 다시 코드를 추가해서 확인해보시겠어요?</p>

<p>그래도 오류 메시지가 표시되면 호스팅 문제일 수도 있으니 해당 관리자에게 문의해보셔야 할 듯합니다.</p>

<p>FTP로 접속해서 /wp-content/themes/사용중인테마/functions.php 파일에</p>

<p>코드를 직접 추가하셔도 됩니다.</p>

<p> </p>

<p>실제 게시판 숏코드에서 id가 1이라면</p>

<p>($board_id == '1')로 해주시면 됩니다.</p>

<p>고맙습니다.</p>]]></description>
			<author>스레드봇</author>
			<pubDate>Tue, 29 May 2018 23:55:37 +0000</pubDate>
			<category>KBoard</category>
		</item>
				<item>
			<title><![CDATA[css코드로는 할 수 없는건가요?]]></title>
			<link>https://www.cosmosfarm.com/threads/document/22794</link>
			<description><![CDATA[<p>css코드로는 할 수 없는건가요?</p>]]></description>
			<author>Levitt</author>
			<pubDate>Tue, 29 May 2018 04:53:01 +0000</pubDate>
			<category>KBoard</category>
		</item>
				<item>
			<title><![CDATA[어떠한 글을 써도 저 오류메세지가 뜨네요..]]></title>
			<link>https://www.cosmosfarm.com/threads/document/22793</link>
			<description><![CDATA[<p>어떠한 글을 써도 저 오류메세지가 뜨네요..</p>]]></description>
			<author>Levitt</author>
			<pubDate>Tue, 29 May 2018 04:48:54 +0000</pubDate>
			<category>KBoard</category>
		</item>
				<item>
			<title><![CDATA[실제 게시판 숏코드가

 

[kboard id=1] 이어서 수정할 부분을

($kboard_id =='1') 이렇게 수정했는데...]]></title>
			<link>https://www.cosmosfarm.com/threads/document/22792</link>
			<description><![CDATA[<p>실제 게시판 숏코드가</p>

<p> </p>

<p>[kboard id=1] 이어서 수정할 부분을</p>

<p>($kboard_id =='1') 이렇게 수정했는데 맞는건가요?</p>]]></description>
			<author>Levitt</author>
			<pubDate>Tue, 29 May 2018 04:37:27 +0000</pubDate>
			<category>KBoard</category>
		</item>
				<item>
			<title><![CDATA[치명적인 에러를 점검하기 위해 사이트와 통신할 수 업습니다. 따라서 PHP 변경사항이 원래의 것으로 복...]]></title>
			<link>https://www.cosmosfarm.com/threads/document/22791</link>
			<description><![CDATA[<p>치명적인 에러를 점검하기 위해 사이트와 통신할 수 업습니다. 따라서 PHP 변경사항이 원래의 것으로 복구됐습니다. PHP 파일 변경사항을 SFTP와 같은 다른 수단을 통해 업로드 해야 합니다.</p>

<p> </p>

<p>이렇게 나오네요. ㅠ</p>]]></description>
			<author>Levitt</author>
			<pubDate>Tue, 29 May 2018 04:35:13 +0000</pubDate>
			<category>KBoard</category>
		</item>
				<item>
			<title><![CDATA[안녕하세요~^^

승인 대기 중인 게시글을 목록에서 안 보이게 하시려면

워드프레스 관리자 -&amp;gt; ...]]></title>
			<link>https://www.cosmosfarm.com/threads/document/22773</link>
			<description><![CDATA[<p>안녕하세요~^^</p>

<p>승인 대기 중인 게시글을 목록에서 안 보이게 하시려면</p>

<p>워드프레스 관리자 -&gt; 외모 -&gt; 테마 편집기 페이지에서 functions.php 파일 하단에</p>

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

<pre>
<code class="language-php">add_filter('kboard_list_where', 'my_kboard_list_where', 10, 3);
function my_kboard_list_where($where, $board_id, $content_list){
	if($board_id == '1'){
		$where .= "AND (`status`='' OR `status` IS NULL)";
	}
	return $where;
}</code></pre>

<p>위 코드에서 $board_id == '1' 부분은 실제 게시판 id로 수정하신 후에 적용해보세요.</p>

<p>고맙습니다.</p>]]></description>
			<author>스레드봇</author>
			<pubDate>Tue, 29 May 2018 00:57:37 +0000</pubDate>
			<category>KBoard</category>
		</item>
			</channel>
</rss>