run_replace get_config() 채택완료
Big1
5년 전
조회 4,095
domain.com 은 basic 테마를 사용하고
sub.domain.com 은 sub 테마를 사용하려고
extend 폴더 안에 draft.theme.php 파일을 만들었습니다.
</p>
<p>add_replace('get_config', 'get_draft_theme', 10, 5);
function get_draft_theme($cache)
{
//print_r($cache);
preg_match('/^([^\.]+).*/i', $_SERVER['HTTP_HOST'], $matches);
if ($matches[1] && file_exists(G5_PATH.'/'.G5_THEME_DIR.'/'.$matches[1].'/theme.config.php')) {
$cache['cf_theme'] = $matches[1];
}
return $cache;
}</p>
<p>
G5_THEME_PATH 상수 정의가
common.php 파일
$config = get_config(); 구문 다음에 있어서
get_config() 함수에서 바꿔야 할 것 같은데
run_replace 가 작동을 안해서요...
common.php get_config() 함수 호출전에 add_replace를 해야되나요?
댓글을 작성하려면 로그인이 필요합니다.
답변 1개
답변을 작성하려면 로그인이 필요합니다.
로그인
어떻게 할까 하다
dbconfig.php 에 넣어버렸어요~ ㅋ