only admin access category

Hint V2 function admin_category( $template ) { $allow = true; $post = get_post(); if (!empty( $post )) { $adminManual = get_post_meta($post->ID, "adminManual", true); if ($adminManual=="1") { $allow = check_admin(); return $allow ? $template : get_template_directory() . '/404.php'; } } if ( ! is_main_query() ) return $template; $private_categories = array('%ea%b4%80%eb%a6%ac%ec%9e%90-%eb%a7%a4%eb%89%b4%ec%96%bc', '관리자 매뉴얼', 'Admin Manual'); if ( […]

Read More

tele phone number formatter

jquery.formatter.js $(selector).formatter(opts) $('#credit-input').formatter({ 'pattern': '{{999}}-{{999}}-{{999}}-{{9999}}', 'persistent': true }); Opts pattern (required): String representing the pattern of your formatted input. User input areas begin with {{ and end with }}. For example, a phone number may be represented: ({{999}}) {{999}}-{{999}}. You can specify numbers, letters, or numbers and letters. 9: [0-9] a: [A-Za-z] *: [A-Za-z0-9] persistent: […]

Read More

facebook all : login error debug

페이스북에서 받아온 아이디가 한글일 경우, sanitize_user()함수를 처리할 때, 공백으로 필터링되기 때문에 회원디비에 등록할 때 오류가 발생한다. $user_login = sanitize_user($username, true); //owl if ($user_login=="") { $user_emailname = explode('@', $fbdata['email']); $username = $user_emailname[0]; $user_login = $username; } 디버깅 사례

Read More