本文整理汇总了PHP中wptouch_get_settings函数的典型用法代码示例。如果您正苦于以下问题:PHP wptouch_get_settings函数的具体用法?PHP wptouch_get_settings怎么用?PHP wptouch_get_settings使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wptouch_get_settings函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: wptouch_admin_get_root_slug
function wptouch_admin_get_root_slug($network_admin = false)
{
$menu = wptouch_admin_get_predefined_menus();
$settings = wptouch_get_settings();
if (defined('WPTOUCH_IS_FREE')) {
$show_wizard = $settings->show_free_wizard;
} else {
$show_wizard = $settings->show_wizard;
}
$show_network_wizard = $settings->show_network_wizard;
$network_admin = is_network_admin();
if ($network_admin) {
if ($show_network_wizard) {
return $menu[WPTOUCH_PRO_ADMIN_WIZARD]->slug;
} else {
return $menu[WPTOUCH_PRO_ADMIN_GENERAL_SETTINGS]->slug;
}
} else {
if ($show_wizard) {
return $menu[WPTOUCH_PRO_ADMIN_WIZARD]->slug;
} else {
if (defined('WPTOUCH_SHOW_WIZARD')) {
return $menu[WPTOUCH_PRO_ADMIN_WIZARD]->slug;
}
return $menu[WPTOUCH_PRO_ADMIN_GENERAL_SETTINGS]->slug;
}
}
}
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:28,代码来源:admin-menu.php
示例2: foundation_get_page_walker
function foundation_get_page_walker($walker, $menu_name)
{
global $wptouch_pro;
// Don't do anything for WordPress menus
if (is_array($wptouch_pro->theme_menus) && count($wptouch_pro->theme_menus)) {
foreach ($wptouch_pro->theme_menus as $menu_info) {
$settings = wptouch_get_settings($menu_info->settings_domain);
$setting_value = $menu_info->setting_name;
if (isset($settings->{$setting_value})) {
$menu_to_show = $settings->{$setting_value};
if ($menu_name == $menu_to_show) {
// This is the menu that is showing
switch ($menu_info->menu_type) {
case 'dropdown':
// This is already taken care of by the walkel
break;
default:
$walker = apply_filters('wptouch_unhandled_page_walker', $walker, $menu_info->menu_type);
break;
}
}
}
}
}
return $walker;
// $wptouch_pro->theme_menus[] = $menu;
}
开发者ID:sumwander,项目名称:unyil,代码行数:27,代码来源:menu.php
示例3: wptouch_admin_get_predefined_menus
function wptouch_admin_get_predefined_menus($network_only = false)
{
$available_menus = array();
if ($network_only) {
$available_menus = array(WPTOUCH_PRO_ADMIN_TOUCHBOARD => wptouch_admin_create_menu(WPTOUCH_PRO_ADMIN_TOUCHBOARD, __('What\'s New', 'wptouch-pro')));
} else {
$available_menus = array(WPTOUCH_PRO_ADMIN_TOUCHBOARD => wptouch_admin_create_menu(WPTOUCH_PRO_ADMIN_TOUCHBOARD, __('What\'s New', 'wptouch-pro')), WPTOUCH_PRO_ADMIN_GENERAL_SETTINGS => wptouch_admin_create_menu(WPTOUCH_PRO_ADMIN_GENERAL_SETTINGS, __('Core Settings', 'wptouch-pro')), WPTOUCH_PRO_ADMIN_THEMES_AND_ADDONS => wptouch_admin_create_menu(WPTOUCH_PRO_ADMIN_THEMES_AND_ADDONS, __('Themes & Extensions', 'wptouch-pro')), WPTOUCH_PRO_ADMIN_THEME_OPTIONS => wptouch_admin_create_menu(WPTOUCH_PRO_ADMIN_THEME_OPTIONS, __('Theme Settings', 'wptouch-pro'), WPTOUCH_PRO_ADMIN_SETTINGS_PAGE, sprintf(__('%s Settings', 'wptouch-pro'), wptouch_get_bloginfo('active_theme_friendly_name'))));
$settings = wptouch_get_settings();
if (isset($settings->active_addons) && is_array($settings->active_addons) && count($settings->active_addons)) {
$available_menus[WPTOUCH_PRO_ADMIN_ADDON_OPTIONS] = wptouch_admin_create_menu(WPTOUCH_PRO_ADMIN_ADDON_OPTIONS, __('Extension Settings', 'wptouch-pro'));
}
if (wptouch_get_registered_theme_count()) {
// Need to see if a theme has a menu available
$available_menus[WPTOUCH_PRO_ADMIN_MENUS] = wptouch_admin_create_menu(WPTOUCH_PRO_ADMIN_MENUS, __('Menus', 'wptouch-pro'));
} else {
$available_menus[WPTOUCH_PRO_ADMIN_MENUS_DISABLED] = wptouch_admin_create_menu(WPTOUCH_PRO_ADMIN_MENUS_DISABLED, __('Menus', 'wptouch-pro'));
}
}
// Check multisite
if (!defined('WPTOUCH_IS_FREE') && (wptouch_can_show_license_menu() || defined('WPTOUCH_FORCE_SHOW_LICENSE_PANEL'))) {
$available_menus[WPTOUCH_PRO_ADMIN_LICENSE] = wptouch_admin_create_menu(WPTOUCH_PRO_ADMIN_LICENSE, __('License', 'wptouch-pro'), WPTOUCH_PRO_ADMIN_CUSTOM_PAGE);
}
// Check multisite
if (defined('WPTOUCH_IS_FREE')) {
$available_menus[WPTOUCH_PRO_ADMIN_UPGRADE] = wptouch_admin_create_menu(WPTOUCH_PRO_ADMIN_UPGRADE, __('Upgrade to Pro', 'wptouch-pro'), WPTOUCH_PRO_ADMIN_CUSTOM_PAGE);
} elseif (!defined('WPTOUCH_CLIENT_MODE') && wptouch_license_upgrade_available()) {
$available_menus[WPTOUCH_PRO_ADMIN_UPGRADE_LICENSE] = wptouch_admin_create_menu(WPTOUCH_PRO_ADMIN_UPGRADE_LICENSE, __('Upgrade License', 'wptouch-pro'), WPTOUCH_PRO_ADMIN_CUSTOM_PAGE);
}
return apply_filters('wptouch_available_menus', $available_menus);
}
开发者ID:dtekcth,项目名称:datateknologer.se,代码行数:30,代码来源:admin-menu.php
示例4: foundation_google_fonts_init
function foundation_google_fonts_init()
{
$settings = wptouch_get_settings('foundation');
if ($settings->typography_sets != 'default') {
wp_enqueue_script('foundation_google_fonts', foundation_get_base_module_url() . '/google-fonts/google-fonts.js', false, md5(FOUNDATION_VERSION), true);
}
$selected_font_info = foundation_google_fonts_get_selected_info();
if ($selected_font_info) {
$family_string = '';
$inline_style_data = '';
if (is_array($selected_font_info) && count($selected_font_info)) {
$new_families = array();
foreach ($selected_font_info as $font_info) {
$font_string = htmlentities($font_info->name);
if (isset($font_info->variants) && is_array($font_info->variants)) {
$font_string .= ':' . implode(',', $font_info->variants);
}
$new_families[] = $font_string;
$inline_style_data .= "." . $font_info->selector . "-font" . " {\n";
$inline_style_data .= "\tfont-family: '" . $font_info->name . "', " . $font_info->fallback . ";\n";
$inline_style_data .= "}\n";
}
$family_string = implode('|', $new_families);
}
if ($family_string) {
wp_enqueue_style('foundation_google_fonts', 'http://fonts.googleapis.com/css?family=' . $family_string, false, FOUNDATION_VERSION, false);
if ($inline_style_data) {
wp_add_inline_style('foundation_google_fonts', $inline_style_data);
}
}
}
}
开发者ID:sydneyDAD,项目名称:cardguys.com,代码行数:32,代码来源:google-fonts.php
示例5: wptouch_geolocation_enqueue_scripts
function wptouch_geolocation_enqueue_scripts()
{
$settings = wptouch_get_settings('foundation');
if ($settings->geolocation_enabled) {
wp_enqueue_script('geolocation-js', WPTOUCH_URL . '/pro/modules/geolocation/geolocation.js', false, FOUNDATION_VERSION, true);
}
}
开发者ID:jamesfacts,项目名称:gissler_wp_touch,代码行数:7,代码来源:geolocation.php
示例6: wptouch_show_menu
function wptouch_show_menu($menu_slug = false, $nav_menu_walker = false, $page_menu_walker = false)
{
$menu_html = false;
$wptouch_menu_items = array();
$settings = wptouch_get_settings();
$parent_link_class = 'parent-links';
if (defined('WPTOUCH_MENU_LINK_PARENT_ITEMS') && WPTOUCH_MENU_LINK_PARENT_ITEMS == false) {
$parent_link_class = 'no-parent-links';
}
if (!$settings->enable_parent_items) {
$parent_link_class = 'no-parent-links';
}
if ($nav_menu_walker == false) {
$nav_menu_walker = new WPtouchProMainNavMenuWalker($settings->enable_menu_icons);
}
if ($page_menu_walker == false) {
$page_menu_walker = new WPtouchProMainPageMenuWalker($settings->enable_menu_icons);
}
// Render the menu
echo apply_filters('wptouch_menu_start_html', '<ul class="menu-tree' . ' ' . $parent_link_class . '">');
$menu_slugs_to_show = apply_filters('wptouch_menu_slugs_to_show', array($menu_slug));
global $wptouch_pro;
// Loop through all menus
foreach ($menu_slugs_to_show as $key => $menu_slug) {
foreach ($wptouch_pro->theme_menus as $menu_info) {
if ($menu_info->setting_name == $menu_slug) {
$can_be_disabled = $menu_info->can_be_disabled;
}
}
_wptouch_show_menu($menu_slug, $nav_menu_walker, $page_menu_walker, $can_be_disabled);
}
echo apply_filters('wptouch_menu_end_html', '</ul>');
}
开发者ID:sumwander,项目名称:unyil,代码行数:33,代码来源:menu.php
示例7: wptouch_backup_settings
function wptouch_backup_settings()
{
global $wptouch_pro;
$backup_domains = $wptouch_pro->get_active_setting_domains();
if (is_array($backup_domains) && count($backup_domains)) {
$settings_to_save = array();
foreach ($backup_domains as $domain) {
$settings_notused = wptouch_get_settings($domain);
$settings = $wptouch_pro->settings_objects[$domain];
if (isset($settings->domain)) {
unset($settings->domain);
}
$settings_to_save[$domain] = apply_filters('wptouch_backup_settings', $settings, $domain);
}
ksort($settings_to_save);
$backup_string = base64_encode(gzcompress(serialize($settings_to_save), 9));
$backup_base_name = 'wptouch-backup-' . date('Ymd-His') . '.txt';
$backup_file_name = WPTOUCH_BACKUP_DIRECTORY . '/' . $backup_base_name;
$backup_file = fopen($backup_file_name, 'w+t');
if ($backup_file) {
fwrite($backup_file, $backup_string);
fclose($backup_file);
}
}
wptouch_prune_backup_files();
return $backup_base_name;
}
开发者ID:patrickmetzger,项目名称:adthrive-touch,代码行数:27,代码来源:admin-backup-restore.php
示例8: wptouch_admin_is_list_option_selected
function wptouch_admin_is_list_option_selected()
{
global $_primed_setting;
$settings = wptouch_get_settings($_primed_setting->domain, false);
$setting_name = $_primed_setting->name;
return isset($settings->{$setting_name}) && wptouch_admin_get_list_option_key() == $settings->{$setting_name};
}
开发者ID:patrickmetzger,项目名称:adthrive-touch,代码行数:7,代码来源:list.php
示例9: wptouch_admin_get_setting_value
function wptouch_admin_get_setting_value()
{
global $_primed_setting;
$settings = wptouch_get_settings($_primed_setting->domain, false);
$setting_name = $_primed_setting->name;
if (isset($settings->{$setting_name})) {
return $settings->{$setting_name};
}
}
开发者ID:liangwei1988,项目名称:wordpress,代码行数:9,代码来源:text.php
示例10: wptouch_fdn_show_login
function wptouch_fdn_show_login()
{
$settings = wptouch_get_settings();
if ($settings->show_login_box) {
return true;
} else {
return false;
}
}
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:9,代码来源:login.php
示例11: wptouch_theme_custom_templates
function wptouch_theme_custom_templates($templates)
{
$settings = wptouch_get_settings();
if ($settings->wptouch_theme_show_archives) {
$templates[__('Archives', 'wptouch-pro')] = array('wptouch-archives');
}
if ($settings->wptouch_theme_show_links) {
$templates[__('Links', 'wptouch-pro')] = array('wptouch-links');
}
return $templates;
}
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:11,代码来源:root-functions.php
示例12: wptouch_should_load_rtl
function wptouch_should_load_rtl()
{
global $wptouch_pro;
if (is_admin()) {
$settings = wptouch_get_settings();
if (!$settings->translate_admin) {
return false;
}
}
return is_rtl() || $wptouch_pro->locale == 'ar' || $wptouch_pro->locale == 'he_IL';
}
开发者ID:hkarriche,项目名称:wordpress,代码行数:11,代码来源:rtl.php
示例13: wptouch_get_desktop_switch_link
function wptouch_get_desktop_switch_link()
{
$settings = wptouch_get_settings();
if ($settings->show_switch_link) {
if ($settings->home_page_redirect_address == 'same') {
return apply_filters('wptouch_desktop_switch_link', get_bloginfo('url') . '?wptouch_switch=mobile&redirect=' . urlencode($_SERVER['REQUEST_URI']));
} else {
return apply_filters('wptouch_desktop_switch_link', get_bloginfo('url') . '?wptouch_switch=mobile&redirect=' . get_bloginfo('url'));
}
}
}
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:11,代码来源:globals.php
示例14: wptouch_admin_is_setting_checked
function wptouch_admin_is_setting_checked()
{
global $_primed_setting;
$settings = wptouch_get_settings($_primed_setting->domain);
if ($settings) {
$name = $_primed_setting->name;
if (isset($settings->{$name})) {
return $settings->{$name} == 1;
}
}
return false;
}
开发者ID:StefanBonilla,项目名称:CoupSoup,代码行数:12,代码来源:checkbox.php
示例15: wptouch_admin_split_setting_newline
function wptouch_admin_split_setting_newline()
{
global $_primed_setting;
$settings = wptouch_get_settings($_primed_setting->domain, false);
$setting_name = $_primed_setting->name;
if ($settings->{$setting_name} != '') {
$setting_data = explode("\r\n", $settings->{$setting_name});
} else {
$setting_data = array();
}
return $setting_data;
}
开发者ID:sumwander,项目名称:unyil,代码行数:12,代码来源:multiline-newline.php
示例16: wptouch_wordpress_menu_has_children
function wptouch_wordpress_menu_has_children($parent)
{
global $wpdb;
$settings = wptouch_get_settings();
$sql = $wpdb->prepare("SELECT count(*) as c FROM {$wpdb->prefix}posts WHERE ID IN (SELECT object_id FROM {$wpdb->prefix}term_relationships WHERE term_taxonomy_id = %d) AND ID IN (SELECT post_id FROM {$wpdb->prefix}postmeta WHERE meta_key = '_menu_item_menu_item_parent' AND meta_value = '%d') ORDER BY menu_order", $settings->custom_menu_name, $parent);
// echo $sql . "<br/>";
$menu_items = $wpdb->get_row($sql);
if ($menu_items && $menu_items->c) {
return true;
}
return false;
}
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:12,代码来源:wordpress-menu.php
示例17: wptouch_admin_build_menu
function wptouch_admin_build_menu($network_only = false)
{
wptouch_admin_check_api();
$settings = wptouch_get_settings();
$available_menus = wptouch_admin_get_predefined_menus($network_only);
// Add the main plugin menu for WPtouch Pro
add_menu_page(WPTOUCH_PRODUCT_NAME, WPTOUCH_PRODUCT_NAME, 'manage_options', wptouch_admin_get_root_slug(), '', WPTOUCH_ADMIN_URL . '/images/wptouch-admin-icon.png');
// Iterate through available menus
foreach ($available_menus as $id => $menu) {
add_submenu_page($available_menus[wptouch_admin_get_root_slug()]->slug, $menu->friendly_name, $menu->friendly_name, 'manage_options', $menu->slug, 'wptouch_admin_render_menu');
}
}
开发者ID:StefanBonilla,项目名称:CoupSoup,代码行数:12,代码来源:admin-load.php
示例18: foundation_webapp_init
function foundation_webapp_init()
{
$settings = foundation_get_settings();
if (isset($_REQUEST['wptouch_app_manifest'])) {
echo json_encode(array('short_name' => $settings->homescreen_icon_title, 'icons' => array(array('src' => $settings->iphone_icon_retina, 'sizes' => '192x192'), array('src' => $settings->android_others_icon, 'sizes' => '57x57')), 'start_url' => site_url() . '?wptouch_webapp_start=manifest', 'display' => 'standalone', 'orientation' => 'portrait'));
die;
}
// Do redirect in webapp mode
if ($settings->webapp_enable_persistence && wptouch_fdn_is_web_app_mode()) {
if (isset($_COOKIE[WPTOUCH_WEBAPP_PERSIST_COOKIE . '-' . foundation_webapp_get_persistence_salt()])) {
$current_url = rtrim($_SERVER['HTTP_HOST'] . strtolower($_SERVER['REQUEST_URI']), '/');
$stored_url = str_replace(array('https://', 'http://'), array('', ''), rtrim(strtolower($_COOKIE[WPTOUCH_WEBAPP_PERSIST_COOKIE . '-' . foundation_webapp_get_persistence_salt()]), '/'));
if (!strpos($stored_url, '/logout/') && !strpos($stored_url, '?action=logout') && $current_url != $stored_url && !isset($_COOKIE[WPTOUCH_WEBAPP_COOKIE . '-' . foundation_webapp_get_persistence_salt()]) && empty($_SERVER['HTTP_X_REQUESTED_WITH'])) {
$cookie = $_COOKIE[WPTOUCH_WEBAPP_PERSIST_COOKIE . '-' . foundation_webapp_get_persistence_salt()];
header('Location: ' . $cookie);
die;
}
}
}
if (foundation_webapp_mode_enabled() && $settings->webapp_show_notice == true && !wptouch_fdn_is_web_app_mode()) {
wp_enqueue_script('foundation_add2home', WPTOUCH_URL . '/pro/modules/webapp/add2home.js', false, FOUNDATION_VERSION, true);
wp_enqueue_script('foundation_add2home_config', WPTOUCH_URL . '/pro/modules/webapp/add2home-config.js', array('foundation_add2home'), FOUNDATION_VERSION, true);
$add_to_home_strings = array('bubbleMessage' => str_replace(array('[icon]', '[device]'), array('%icon', 'home screen'), $settings->webapp_notice_message), 'bubbleExpiryInDays' => $settings->webapp_notice_expiry_days * 60 * 24);
wp_localize_script('foundation_add2home_config', 'wptouchFdnAddToHome', $add_to_home_strings);
}
if (foundation_webapp_mode_enabled()) {
wp_enqueue_script('foundation_webapp', WPTOUCH_URL . '/pro/modules/webapp/webapp.js', array('jquery'), FOUNDATION_VERSION, true);
$webapp_strings = array();
if ($settings->webapp_ignore_urls) {
$ignored_wa_urls = explode("\n", $settings->webapp_ignore_urls);
$trimmed_wa_urls = array();
foreach ($ignored_wa_urls as $wa_url) {
$trimmed_wa_urls[] = strtolower(trim($wa_url));
}
$webapp_strings['ignoredWebAppURLs'] = $trimmed_wa_urls;
}
$admin_settings = wptouch_get_settings();
if ($admin_settings->filtered_urls && $admin_settings->url_filter_behaviour == 'exclude_urls') {
$ignored_urls = explode("\n", $admin_settings->filtered_urls);
$trimmed_urls = array();
foreach ($ignored_urls as $url) {
$trimmed_urls[] = strtolower(trim($url));
}
$webapp_strings['ignoredURLs'] = $trimmed_urls;
}
$webapp_strings['externalLinkText'] = __('External link— open it in the browser?', 'wptouch-pro');
$webapp_strings['externalFileText'] = __('File link— Do you want to open it in the browser?', 'wptouch-pro');
$webapp_strings['persistence'] = $settings->webapp_enable_persistence ? '1' : '0';
$webapp_strings['persistenceSalt'] = foundation_webapp_get_persistence_salt();
wp_localize_script('foundation_webapp', 'wptouchWebApp', $webapp_strings);
}
}
开发者ID:satoshishimazaki,项目名称:mknowhere,代码行数:52,代码来源:webapp.php
示例19: wptouch_should_load_rtl
function wptouch_should_load_rtl()
{
global $wptouch_pro;
if (is_admin()) {
$settings = wptouch_get_settings();
if (defined('WPTOUCH_ADMIN_IGNORE_LOCALIZATION')) {
return false;
}
if (!$settings->translate_admin) {
return false;
}
}
return is_rtl() || $wptouch_pro->locale == 'ar' || $wptouch_pro->locale == 'he_IL';
}
开发者ID:sumwander,项目名称:unyil,代码行数:14,代码来源:rtl.php
示例20: wptouch_render_general_page
function wptouch_render_general_page($page_options)
{
$settings = wptouch_get_settings();
wptouch_add_sub_page(WPTOUCH_ADMIN_SETUP_GENERAL, 'setup-general-general', $page_options);
wptouch_add_sub_page(WPTOUCH_ADMIN_SETUP_COMPAT, 'setup-general-compat', $page_options);
$these_settings = array(wptouch_add_setting('text', 'site_title', wptouchize_it(__('WPtouch Pro site title', 'wptouch-pro')), __('If the title of your site is long, you can shorten it for display within WPtouch Pro themes.', 'wptouch-pro'), WPTOUCH_SETTING_BASIC, '3.0'), wptouch_add_setting('checkbox', 'show_wptouch_in_footer', wptouchize_it(sprintf(__('Display %sPowered by WPtouch Pro%s in footer', 'wptouch-pro'), '"', '"')), '', WPTOUCH_SETTING_BASIC, 3.0));
wptouch_add_page_section(WPTOUCH_ADMIN_SETUP_GENERAL, __('Site Title & Byline', 'wptouch-pro'), 'setup-title-byline', $these_settings, $page_options);
// Build admin panel page here
wptouch_add_page_section(WPTOUCH_ADMIN_SETUP_GENERAL, __('Regionalization', 'wptouch-pro'), 'setup-regionalization', array(wptouch_add_setting('list', 'force_locale', __('Language', 'wptouch-pro'), wptouchize_it(__('The WPtouch Pro admin panel & supported themes will be shown in this locale.', 'wptouch-pro')), WPTOUCH_SETTING_BASIC, '3.0', wptouch_admin_get_languages())), $page_options);
wptouch_add_page_section(WPTOUCH_ADMIN_SETUP_GENERAL, __('Display Mode', 'wptouch-pro'), 'setup-display-mode', array(wptouch_add_setting('radiolist', 'display_mode', __('Mobile theme is visible to', 'wptouch-pro'), '', WPTOUCH_SETTING_BASIC, '3.1', array('normal' => __('All Visitors', 'wptouch-pro'), 'preview' => __('Site administrators', 'wptouch-pro'), 'disabled' => wptouchize_it(__('Nobody (disable WPtouch Pro)', 'wptouch-pro'))))), $page_options);
wptouch_add_page_section(WPTOUCH_ADMIN_SETUP_GENERAL, __('Landing Page', 'wptouch-pro'), 'setup-landing-page', array(wptouch_add_setting('radiolist', 'homepage_landing', wptouchize_it(__('WPtouch Pro landing page', 'wptouch-pro')), '', WPTOUCH_SETTING_BASIC, '3.0', array('none' => __('Default (same as desktop visitors)', 'wptouch-pro'), 'select' => __('Redirect to a page', 'wptouch-pro'), 'custom' => _x('Redirect to a custom URL', 'Refers to a custom landing page', 'wptouch-pro'))), wptouch_add_setting('redirect', 'homepage_redirect_wp_target', '', '', WPTOUCH_SETTING_BASIC, '3.0'), wptouch_add_setting('text', 'homepage_redirect_custom_target', __('Custom Slug or URL', 'wptouch-pro'), __('Enter a Slug (i.e. "/home") or a full URL path', 'wptouch-pro'), WPTOUCH_SETTING_BASIC, '3.0')), $page_options);
wptouch_add_page_section(WPTOUCH_ADMIN_SETUP_GENERAL, __('Desktop / Mobile Switching', 'wptouch-pro'), 'setup-general', array(wptouch_add_setting('checkbox', 'show_switch_link', __('Show switch link in mobile view', 'wptouch-pro'), __('Will show toggle buttons in the theme\'s footer allowing users to switch to your desktop theme. Is not shown in Web-App Mode.', 'wptouch-pro'), WPTOUCH_SETTING_ADVANCED, '3.0'), wptouch_add_pro_setting('radiolist', 'switch_link_method', __('Desktop theme switch buttons', 'wptouch-pro'), __('Allows visitors to switch from your desktop theme to your mobile theme. You can also customize the placement of Switch buttons by placing the wptouch_desktop_switch_link() template tag somewhere in your desktop theme.', 'wptouch-pro'), WPTOUCH_SETTING_ADVANCED, '3.0', array('automatic' => __('Automatically inserted inline', 'wptouch-pro'), 'ajax' => __('Automatically inserted with AJAX (better for caching)', 'wptouch-pro'), 'template_tag' => __('Template tag', 'wptouch-pro')))), $page_options);
wptouch_add_page_section(WPTOUCH_ADMIN_SETUP_GENERAL, __('Custom Code', 'wptouch-pro'), 'setup-custom-code', array(wptouch_add_setting('textarea', 'custom_stats_code', __('HTML, JavaScript, statistics or custom code', 'wptouch-pro'), __('Enter any custom code here to be output in the theme footer.', 'wptouch-pro'), WPTOUCH_SETTING_BASIC, '3.0')), $page_options);
if ($settings->custom_css_file != '') {
wptouch_add_page_section(WPTOUCH_ADMIN_SETUP_GENERAL, __('Custom Stylesheet', 'wptouch-pro'), 'setup-custom-styles', array(wptouch_add_pro_setting('text', 'custom_css_file', __('URL to a custom CSS file to load', 'wptouch-pro'), __('Useful if you have specific compatibility CSS you need to add.', 'wptouch-pro'), WPTOUCH_SETTING_ADVANCED, '3.0')), $page_options);
}
wptouch_add_page_section(WPTOUCH_ADMIN_SETUP_COMPAT, __('Shortcodes', 'wptouch-pro'), 'shortcodes-compatibility', array(wptouch_add_pro_setting('checkbox', 'enable_shortcode_compatibility', wptouchize_it(__('Enable shortcode handling', 'wptouch-pro')), __('For shortcodes registered by your desktop theme', 'wptouch-pro'), WPTOUCH_SETTING_BASIC, '3.7'), wptouch_add_pro_setting('radiolist', 'shortcode_compatibility_method', __('Shortcode handling', 'wptouch-pro'), '', WPTOUCH_SETTING_BASIC, '3.7', array('load_content_by_ajax' => wptouchize_it(__('Load content as output by desktop theme (you may need to load CSS/JavaScript)', 'wptouch-pro')), 'remove_shortcodes' => wptouchize_it(__('Remove selected shortcodes from content', 'wptouch-pro')))), wptouch_add_pro_setting('text', 'remove_shortcodes', wptouchize_it(__('Remove these shortcodes when WPtouch Pro is active', 'wptouch-pro')), __('Enter a comma separated list of shortcodes to remove.', 'wptouch-pro'), WPTOUCH_SETTING_BASIC, '3.0')), $page_options);
wptouch_add_page_section(WPTOUCH_ADMIN_SETUP_COMPAT, __('Filter URLs', 'wptouch-pro'), 'filtered-urls-compatibility', array(wptouch_add_setting('radiolist', 'url_filter_behaviour', wptouchize_it(__('Load WPtouch Pro for', 'wptouch-pro')), '', WPTOUCH_SETTING_BASIC, '3.5.3', array('disabled' => wptouchize_it(__('All URLs on my site', 'wptouch-pro')), 'exclude_urls' => wptouchize_it(__('All URLs/pages except these', 'wptouch-pro')), 'exclusive_urls' => wptouchize_it(__('Only these URLs/pages', 'wptouch-pro')))), wptouch_add_setting('textarea', 'filtered_urls', wptouchize_it(__('Apply filter to these URLs/Pages', 'wptouch-pro')), __('Each permalink URL fragment should be on its own line and relative, e.g. "/about" or "/products/store"', 'wptouch-pro'), WPTOUCH_SETTING_BASIC, '3.5.3')), $page_options);
if ($settings->include_functions_from_desktop_theme) {
wptouch_add_page_section(WPTOUCH_ADMIN_SETUP_COMPAT, __('Desktop Theme', 'wptouch-pro'), 'desktop-theme-compatibility', array(wptouch_add_pro_setting('checkbox', 'include_functions_from_desktop_theme', __('Try to include desktop theme functions.php file', 'wptouch-pro'), wptouchize_it(__('This may be required for desktop themes with unique features that are not showing when WPtouch Pro is active.', 'wptouch-pro')), WPTOUCH_SETTING_ADVANCED, '3.0'), wptouch_add_setting('radiolist', 'functions_php_loading_method', __('Method to load file', 'wptouch-pro'), '', WPTOUCH_SETTING_ADVANCED, '3.0', array('direct' => __('Include file directly', 'wptouch-pro'), 'translate' => __('Translate and create new files', 'wptouch-pro')))), $page_options);
}
wptouch_add_page_section(WPTOUCH_ADMIN_SETUP_COMPAT, __('Custom User-Agents', 'wptouch-pro'), 'custom-user-agents', array(wptouch_add_setting('textarea', 'custom_user_agents', __('User-agents (line separated)', 'wptouch-pro'), wptouchize_it(__('Adding additional user-agents will force WPtouch Pro to be active for matching browsers.', 'wptouch-pro')), WPTOUCH_SETTING_BASIC, '3.0'), wptouch_add_setting('user-agent-list', '')), $page_options);
wptouch_add_page_section(WPTOUCH_ADMIN_SETUP_GENERAL, __('JavaScript', 'wptouch-pro'), 'setup-javascript', array(wptouch_add_setting('checkbox', 'use_jquery_2', __('Replace jQuery 1.x with jQuery 2.x in mobile themes (faster for mobile devices)', 'wptouch-pro'), __('jQuery 2.x is significantly smaller and faster than previous jQuery versions - may cause problems with other plugins, use carefully.', 'wptouch-pro'), WPTOUCH_SETTING_ADVANCED, '3.0')), $page_options);
wptouch_add_page_section(WPTOUCH_ADMIN_SETUP_GENERAL, __('Backup & Import', 'wptouch-pro'), 'setup-backup', array(wptouch_add_pro_setting('checkbox', 'automatically_backup_settings', sprintf(__('Automatically backup settings to the %s folder', 'wptouch-pro'), '<em>/wptouch-data/backups</em>'), wptouchize_it(__('WPtouch Pro backups your settings each time they are saved.', 'wptouch-pro')), WPTOUCH_SETTING_BASIC, '3.0'), wptouch_add_pro_setting('custom', 'backup')), $page_options);
$page_options = apply_filters('wptouch_settings_compat', $page_options);
wptouch_add_page_section(WPTOUCH_ADMIN_SETUP_COMPAT, __('WordPress Plugins', 'wptouch-pro'), 'setup-general-plugin-compat', array(wptouch_add_pro_setting('custom', 'plugin-compat')), $page_options);
/* TODO: Deprecated
wptouch_add_page_section(
WPTOUCH_ADMIN_SETUP_GENERAL,
__( 'Admin Mode', 'wptouch-pro' ),
'admin-mode',
array(
wptouch_add_setting(
'radiolist',
'settings_mode',
__( 'Admin panel settings shown', 'wptouch-pro' ),
'',
WPTOUCH_SETTING_BASIC,
'3.0',
array(
'0' => __( 'Default', 'wptouch-pro' ),
'1' => __( 'Advanced', 'wptouch-pro' )
)
)
),
$page_options
);
*/
return $page_options;
}
开发者ID:dtekcth,项目名称:datateknologer.se,代码行数:50,代码来源:wptouch-admin-general-settings.php
注:本文中的wptouch_get_settings函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论