function wp_emoji2_ks_shortcode($attr = array()) { global $Ktai_Style, $wp_filter; extract($attr); if (!$code) { return; } $emoji = sprintf('<img localsrc="%1$s" alt="%2$s" />', $code, $alt); $emoji = apply_filters("ktai_raw_content", $emoji); if (!is_ktai()) { $emoji = call_user_func_array(array('KtaiServices', 'convert_pict'), array("emoji" => $emoji)); } return $emoji; }
/** * add_filter the_content. */ function wp_social_bookmarking_light_the_content($content) { if (is_feed() || is_404() || is_robots() || is_comments_popup() || function_exists('is_ktai') && is_ktai()) { return $content; } $options = wp_social_bookmarking_light_options(); if ($options['single_page'] && !is_singular()) { return $content; } if (!$options['is_page'] && is_page()) { return $content; } $out = wp_social_bookmarking_light_output($options['services'], get_permalink(), get_the_title()); if ($out == '') { return $content; } if ($options['position'] == 'top') { return "{$out}{$content}"; } else { if ($options['position'] == 'bottom') { return "{$content}{$out}"; } else { if ($options['position'] == 'both') { return "{$out}{$content}{$out}"; } } } return $content; }
function is_mobilePhone() { if (is_ktai() || is_iphone() || is_android() || is_firefox_os() || is_windows_phone() || is_blackberry()) { return true; } else { return false; } }
$sjk_link = 'http://www.sjk.co.jp/c/w.exe?y=' . rawurlencode(preg_replace('|^http://|', '', ks_redir_get('full_url'))); $google_link = 'http://www.google.com/gwt/n?_gwt_noimg=1&u=' . rawurlencode(preg_replace('|^http://|', '', ks_redir_get('full_url'))); ?> </p> <p><?php _e('You can translate the PC site to view suitable for mobile using services below.', 'ktai_style'); ?> <br /><?php ks_ordered_link($accesskey++, 10, $sjk_link, __('Tsuukin(commuting)-browser', 'ktai_style')); ?> <br /><?php ks_ordered_link($accesskey++, 10, $google_link, __('Google Wireless Transcoder', 'ktai_style')); if (is_ktai() == 'KDDI' && is_ktai('type') == 'WAP2.0') { echo '<br />'; ks_ordered_link(0, 10, 'device:pcsiteviewer?url=' . esc_url(ks_redir_get('full_url')), __('PC Site Viewer on your phone.', 'ktai_style')); } elseif (is_ktai() == 'DoCoMo' && is_ktai('type') == 'FOMA') { echo '<br />' . ks_pict_number(0) . sprintf(__('<a %s>Full Browser on your phone.</a>', 'ktai_style'), 'href="' . esc_url(ks_redir_get('full_url')) . '" ifb="' . esc_url(ks_redir_get('full_url')) . '" accesskey="0"'); } ?> </p> <?php if (!ks_redir_get('mobile_url') || ks_redir_get('mobile_url') != ks_redir_get('full_url')) { ?> <p><?php _e('If you know that the site is suitable for mobile at the same URL, it is good to jump directly.', 'ktai_style'); ?> <br />#.<a href="<?php echo esc_url(ks_redir_get('full_url')); ?> "><?php echo htmlspecialchars(ks_redir_get('full_url'), ENT_QUOTES);
ks_mimetype(); ?> ; charset=<?php ks_charset(); ?> " /> <title><?php ks_title(); ?> </title> <?php $h1_style = ' style="width:186px;background:url(' . ks_theme_url(KTAI_NOT_ECHO) . 'frame.gif) repeat-y;margin:0 auto;padding:0 23px;text-align:center;"'; // $h1_style = ' style="margin:0;text-align:center;"'; // style for bugle, lip title // $logo_ext = '-bugle'; // $logo_ext = '-lip'; if (is_ktai() == 'DoCoMo' && ks_cookie_available()) { } ks_wp_head(KTAI_NONE_PC_HEAD); ?> </head> <body bgcolor="#fff0e0" link="purple" vlink="fuchsia"> <?php global $ks_settings; $ks_settings = array(); // erase array for security $ks_settings['h2_style'] = ' style="color:white;background-color:#ff1493;font-size:smaller;text-align:center;"'; $ks_settings['hr_color'] = '#ff69b4'; $ks_settings['list_pages'] = 'sort_column=menu_order,post_title'; $ks_settings['title_style'] = 'color:white;background-color:#ff69b4;'; $ks_settings['date_color'] = '#3366cc'; $ks_settings['comment_color'] = ks_option('ks_comment_type_color');
function isKtai() { return function_exists('is_mobile') && is_mobile() || function_exists('is_ktai') && is_ktai(); }
public function output() { $charset = $this->base->ktai->get('charset'); $title = __('Confirm connecting to external sites', 'ktai_style'); $html = '<p>'; if (!$this->mobile_url) { $html .= __('You are about to visit a website for PC:', 'ktai_style') . '<br /><a href="' . esc_url($this->url) . '">' . esc_url($this->full_url) . '</a>'; } else { if ($this->mobile_url === $this->full_url) { $html .= __('A mobile view is provided with the same URL at the visiting site:', 'ktai_style'); } else { $html .= '<p>' . __('A mobile site found for the visiting site:', 'ktai_style'); } $html .= '<br /><a href="' . esc_url($this->mobile_url) . '">' . esc_url($this->mobile_url) . '</a>'; if (!$this->same_host) { $html .= '<br /><font color="red">' . __('The host is diffrent from the origial. Make sure the valid mobile site.', 'ktai_style') . '</font>'; } if ($this->mobile_url != $this->full_url) { $html .= '</p><p>' . __('The original URL of the site:', 'ktai_style') . '<br /><a href="' . esc_url($this->url) . '">' . esc_url($this->full_url) . '</a>'; } } if (is_ktai() == 'KDDI' && is_ktai('type') == 'WAP2.0') { $html .= '<br />' . sprintf(__('(<a %s>View the site by PC Site Viewer.</a>)', 'ktai_style'), ' href="device:pcsiteviewer?url=' . esc_url($this->full_url) . '"'); } elseif (is_ktai() == 'DoCoMo' && is_ktai('type') == 'FOMA') { $html .= '<br />' . sprintf(__('(<a %s>View the site by Full Browser.</a>)', 'ktai_style'), 'href="' . esc_url($this->url) . '" ifb="' . esc_url($this->full_url) . '"'); } $html .= "</p>\n<p>" . __("If you are sure, follow above link. If not, go to the previous page with browser's back button.", 'ktai_style') . '</p>'; $html .= '<form action=""><div>' . __('To copy the URL, use below text field:', 'ktai_style') . '<br /><input type="text" name="url" size="80" maxlength="255" value="' . esc_url($this->full_url) . '" /></div></form>'; $this->base->ks_die($html, $title, false); }
return isset($Ktai_Style->ktai) ? $Ktai_Style->ktai->get('flat_rate') : false; case 'search_engine': return isset($Ktai_Style->ktai) ? $Ktai_Style->ktai->is_search_engine() : KtaiStyle::is_search_engine(); default: return isset($Ktai_Style->ktai) ? $Ktai_Style->is_ktai() : false; } } /* ================================================== * @param string $name * @return mix $value */ function ks_option($name) { return KtaiStyle::get_option($name); } // ================================================== global $Ktai_Style; $Ktai_Style = new KtaiStyle(); require dirname(__FILE__) . '/operators/base.php'; $Ktai_Style->ktai = KtaiServices::factory(); if (is_ktai()) { require dirname(__FILE__) . '/' . KtaiStyle::PATCHES_DIR . '/mobile.php'; $Ktai_Style->init_mobile(); do_action('ktai_init_mobile'); do_action('init_mobile/ktai_style.php'); } else { require dirname(__FILE__) . '/' . KtaiStyle::PATCHES_DIR . '/pc.php'; $Ktai_Style->init_pc(); do_action('ktai_init_pc'); do_action('init_pc/ktai_style.php'); }
/** * true if can be displayed, false if not * * @return bool */ function wp_social_bookmarking_light_is_enabled() { if (is_feed() || is_404() || is_robots() || is_comments_popup() || function_exists('is_ktai') && is_ktai()) { return false; } $options = wp_social_bookmarking_light_options(); if ($options['single_page'] && !is_singular()) { return false; } if (!$options['is_page'] && is_page()) { return false; } global $wp_current_filter; if (in_array('get_the_excerpt', (array) $wp_current_filter)) { return false; } return true; }
function ks_comments_post_url($id = 0) { $address = get_permalink($id); $address .= (strpos($address, '?') === false ? '?' : '&') . 'view=co_post'; if (isset($_GET['replytocom'])) { $address = add_query_arg('replytocom', absint($_GET['replytocom'], $address)); } if (!ks_is_loggedin() && ks_option('ks_require_term_id') && is_ktai() == 'DoCoMo') { $address .= '&guid=ON'; } return $address; }
function is_xpress_mobile() { //ktai_style if (function_exists('is_ktai')) { if (is_ktai()) { // $file_path = $GLOBALS['xoopsModuleConfig']["ktai_style_tmpdir"] . '/comments.php'; return true; } } //mobg if (function_exists('is_mobile')) { if (is_mobile()) { return true; } } if (preg_match("/DoCoMo/", $_SERVER['HTTP_USER_AGENT']) || preg_match("/softbank/", $_SERVER['HTTP_USER_AGENT']) || preg_match("/vodafone/", $_SERVER['HTTP_USER_AGENT']) || preg_match("/J-PHONE/", $_SERVER['HTTP_USER_AGENT']) || preg_match("/UP\\.Browser/", $_SERVER['HTTP_USER_AGENT']) || preg_match("/ASTEL/", $_SERVER['HTTP_USER_AGENT']) || preg_match("/PDXGW/", $_SERVER['HTTP_USER_AGENT'])) { return true; } else { return false; } }