本文整理汇总了PHP中bnc_wptouch_get_settings函数的典型用法代码示例。如果您正苦于以下问题:PHP bnc_wptouch_get_settings函数的具体用法?PHP bnc_wptouch_get_settings怎么用?PHP bnc_wptouch_get_settings使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bnc_wptouch_get_settings函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isset
<?php
global $is_ajax;
$is_ajax = isset($_SERVER['HTTP_X_REQUESTED_WITH']);
if (!$is_ajax) {
get_header();
}
$wptouch_settings = bnc_wptouch_get_settings();
?>
<?php
if (have_posts()) {
while (have_posts()) {
the_post();
?>
<div class="post content" id="post-<?php
the_ID();
?>
">
<div class="page">
<div class="page-title-icon">
<?php
$mypages = bnc_wp_touch_get_pages();
if (isset($mypages[get_the_ID()])) {
$icon_name = $mypages[get_the_ID()]['icon'];
if (file_exists(compat_get_plugin_dir('wptouch') . '/images/icon-pool/' . $icon_name)) {
$image = compat_get_plugin_url('wptouch') . '/images/icon-pool/' . $icon_name;
} else {
$image = compat_get_upload_url() . '/wptouch/custom-icons/' . $icon_name;
}
echo '<img class="pageicon" src="' . $image . '" alt="icon" />';
} else {
示例2: wptouch_core_body_background
function wptouch_core_body_background()
{
$wptouch_settings = bnc_wptouch_get_settings();
echo $wptouch_settings['style-background'];
}
示例3: bnc_filter_iphone
function bnc_filter_iphone()
{
$key = 'wptouch_switch_cookie';
if (isset($_GET['theme_view'])) {
if ($_GET['theme_view'] == 'mobile') {
setcookie($key, 'mobile', 0);
} elseif ($_GET['theme_view'] == 'normal') {
setcookie($key, 'normal', 0);
}
$redirect_location = get_bloginfo('siteurl');
// fix by cybrstudd
if (isset($_GET['wptouch_redirect'])) {
$protocol = $_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://';
$redirect_location = $protocol . $_GET['wptouch_redirect'];
}
header('Location: ' . $redirect_location);
die;
}
$settings = bnc_wptouch_get_settings();
if (isset($_COOKIE[$key])) {
$this->desired_view = $_COOKIE[$key];
} else {
if ($settings['enable-regular-default']) {
$this->desired_view = 'normal';
} else {
$this->desired_view = 'mobile';
}
}
}
示例4: bnc_filter_iphone
function bnc_filter_iphone()
{
$key = 'wptouch_switch_toggle';
$time = time() + 60 * 60 * 24 * 365;
// one year
$url_path = '/';
if (isset($_GET['wptouch_view'])) {
if ($_GET['wptouch_view'] == 'mobile') {
setcookie($key, 'mobile', $time, $url_path);
} elseif ($_GET['wptouch_view'] == 'normal') {
setcookie($key, 'normal', $time, $url_path);
}
}
$settings = bnc_wptouch_get_settings();
if (isset($_COOKIE[$key])) {
$this->desired_view = $_COOKIE[$key];
} else {
if ($settings['enable-regular-default'] || defined('XMLRPC_REQUEST') || defined('APP_REQUEST')) {
$this->desired_view = 'normal';
} else {
$this->desired_view = 'mobile';
}
}
if (isset($settings['enable-twenty-eleven-footer']) && $settings['enable-twenty-eleven-footer']) {
if (function_exists('twentyeleven_setup')) {
add_action('twentyeleven_credits', array(&$this, 'handle_footer'));
} else {
if (function_exists('twentyten_setup')) {
add_action('twentyten_credits', array(&$this, 'handle_footer'));
}
}
}
}
示例5: bnc_filter_iphone
function bnc_filter_iphone()
{
$key = 'wptouch_switch_cookie';
if (isset($_GET['theme_view'])) {
if ($_GET['theme_view'] == 'mobile') {
setcookie($key, 'mobile', 0);
} elseif ($_GET['theme_view'] == 'normal') {
setcookie($key, 'normal', 0);
}
header('Location: ' . get_bloginfo('siteurl'));
die;
}
$settings = bnc_wptouch_get_settings();
if (isset($_COOKIE[$key])) {
$this->desired_view = $_COOKIE[$key];
} else {
if ($settings['enable-regular-default']) {
$this->desired_view = 'normal';
} else {
$this->desired_view = 'mobile';
}
}
}
示例6: bnc_filter_iphone
function bnc_filter_iphone()
{
$key = 'wptouch_switch_cookie';
$time = time() + 60 * 60 * 24 * 365;
$url_path = str_replace(array('http://' . $_SERVER['SERVER_NAME'] . '', 'https://' . $_SERVER['SERVER_NAME'] . ''), '', get_bloginfo('url') . '/');
if (isset($_GET['theme_view'])) {
if ($_GET['theme_view'] == 'mobile') {
setcookie($key, 'mobile', $time, $url_path);
} elseif ($_GET['theme_view'] == 'normal') {
setcookie($key, 'normal', $time, $url_path);
}
$redirect_location = get_bloginfo('url');
// fix by cybrstudd
if (isset($_GET['wptouch_redirect'])) {
$protocol = $_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://';
$redirect_location = $protocol . $_GET['wptouch_redirect'];
}
header('Location: ' . $redirect_location);
die;
}
$settings = bnc_wptouch_get_settings();
if (isset($_COOKIE[$key])) {
$this->desired_view = $_COOKIE[$key];
} else {
if ($settings['enable-regular-default']) {
$this->desired_view = 'normal';
} else {
$this->desired_view = 'mobile';
}
}
}