本文整理汇总了PHP中wptouch_check_url_ssl函数的典型用法代码示例。如果您正苦于以下问题:PHP wptouch_check_url_ssl函数的具体用法?PHP wptouch_check_url_ssl怎么用?PHP wptouch_check_url_ssl使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wptouch_check_url_ssl函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: wptouch_get_menu_icon
function wptouch_get_menu_icon($page_id)
{
global $wptouch_pro;
if ($page_id == false) {
$page_id = wptouch_get_menu_id();
}
$menu_icon = get_post_meta($page_id, '_wptouch_pro_menu_item_icon', true);
if ($menu_icon) {
return wptouch_check_url_ssl(site_url() . $menu_icon);
} else {
return wptouch_get_site_default_icon();
}
}
示例2: wptouch_get_menu_icon
function wptouch_get_menu_icon($page_id)
{
global $wptouch_pro;
if ($page_id == false) {
$page_id = wptouch_get_menu_id();
}
$menu_icon = get_post_meta($page_id, '_wptouch_pro_menu_item_icon', true);
if ($menu_icon) {
$icon = wptouch_check_url_ssl(site_url() . $menu_icon);
if (!defined('WPTOUCH_IS_FREE')) {
$wptouch_free_potential_path = DIRECTORY_SEPARATOR . 'wptouch' . DIRECTORY_SEPARATOR;
if (strpos($icon, $wptouch_free_potential_path) !== false) {
return str_replace($wptouch_free_potential_path, DIRECTORY_SEPARATOR . 'wptouch-pro-3' . DIRECTORY_SEPARATOR, $icon);
}
}
return $icon;
} else {
return wptouch_get_site_default_icon();
}
}
示例3: wptouch_setup_base_content_dir
function wptouch_setup_base_content_dir()
{
global $blog_id;
global $wptouch_pro;
$wptouch_upload_dir = wp_upload_dir();
// Where we want the base content directory to be
$desirable_dir = '/wptouch-data';
if (is_multisite()) {
define('WPTOUCH_BASE_CONTENT_MS_DIR', WP_CONTENT_DIR . $desirable_dir);
define('WPTOUCH_BASE_CONTENT_MS_URL', wptouch_check_url_ssl(WP_CONTENT_URL) . $desirable_dir);
if ($blog_id) {
wptouch_create_directory_if_not_exist(WPTOUCH_BASE_CONTENT_MS_DIR);
$desirable_dir = $desirable_dir . '/' . $blog_id;
}
}
$undesirable_dir = $wptouch_upload_dir['basedir'] . '/wptouch-data';
if (file_exists($undesirable_dir)) {
// Need to migrate here
//define( 'WPTOUCH_BASE_CONTENT_DIR', $wptouch_upload_dir[ 'basedir' ] . '/wptouch-data' );
//define( 'WPTOUCH_BASE_CONTENT_URL', wptouch_check_url_ssl( $wptouch_upload_dir[ 'baseurl' ] . '/wptouch-data' ) );
wptouch_create_directory_if_not_exist(WP_CONTENT_DIR . $desirable_dir);
$migration_paths = array('themes', 'icons', 'lang', 'uploads', 'add-ons', 'backups');
foreach ($migration_paths as $path) {
if (file_exists($undesirable_dir . '/' . $path)) {
if (!file_exists(WP_CONTENT_DIR . $desirable_dir . '/' . $path)) {
// This is a fresh migration, so let's just move it
if (!rename($undesirable_dir . '/' . $path, WP_CONTENT_DIR . $desirable_dir . '/' . $path)) {
define('WPTOUCH_MIGRATION_OLD_ISSUE', 1);
}
}
}
}
}
define('WPTOUCH_BASE_CONTENT_DIR', WP_CONTENT_DIR . $desirable_dir);
define('WPTOUCH_BASE_CONTENT_URL', wptouch_check_url_ssl(WP_CONTENT_URL) . $desirable_dir);
}
示例4: foundation_prepare_uploaded_file_url
function foundation_prepare_uploaded_file_url($uploaded_file)
{
if (!strstr($uploaded_file, 'http') && !strstr($uploaded_file, 'wp-content')) {
$uploaded_file = WPTOUCH_BASE_CONTENT_URL . $uploaded_file;
} else {
$uploaded_file = wptouch_check_url_ssl($uploaded_file);
}
return $uploaded_file;
}
示例5: wptouch_get_theme_preview_url
function wptouch_get_theme_preview_url()
{
global $wptouch_theme_preview_item;
return wptouch_check_url_ssl(wptouch_get_theme_url() . '/preview/' . $wptouch_theme_preview_item);
}
示例6: wptouch_admin_handle_ajax
function wptouch_admin_handle_ajax($wptouch_pro, $ajax_action)
{
switch ($ajax_action) {
case 'dismiss-warning':
$wptouch_pro->check_plugins_for_warnings();
$settings = $wptouch_pro->get_settings();
if ($wptouch_pro->post['plugin']) {
if (!in_array($wptouch_pro->post['plugin'], $settings->dismissed_warnings)) {
$settings->dismissed_warnings[] = $wptouch_pro->post['plugin'];
$settings->save();
}
}
echo wptouch_get_plugin_warning_count();
break;
case 'enable-menu-item':
if (isset($wptouch_pro->post['is_checked']) && isset($wptouch_pro->post['page_id'])) {
$page_id = $wptouch_pro->post['page_id'];
// save the icon state
if ($wptouch_pro->post['is_checked']) {
delete_post_meta($page_id, '_wptouch_pro_menu_item_disabled');
} else {
update_post_meta($page_id, '_wptouch_pro_menu_item_disabled', '1');
}
echo '0';
}
break;
case 'update-page-icon':
if (isset($wptouch_pro->post['page_id']) && isset($wptouch_pro->post['image_file'])) {
$page_id = $wptouch_pro->post['page_id'];
$image_file = str_replace(wptouch_check_url_ssl(site_url()), '', $wptouch_pro->post['image_file']);
// save the icon state
update_post_meta($page_id, '_wptouch_pro_menu_item_icon', $image_file);
echo '0';
}
break;
case 'reset-page-icons-and-state':
$wptouch_pro->reset_icon_states();
echo '0';
break;
case 'set-default-icon':
$settings = wptouch_get_settings();
$settings->default_menu_icon = str_replace(wptouch_check_url_ssl(site_url()), '', $wptouch_pro->post['image_file']);
$settings->save();
echo '0';
break;
case 'reset-page-icon':
if (isset($wptouch_pro->post['page_id'])) {
delete_post_meta($wptouch_pro->post['page_id'], '_wptouch_pro_menu_item_icon');
echo '0';
}
break;
case 'delete-image-upload':
if (isset($wptouch_pro->post['setting_name'])) {
$wptouch_pro->update_encoded_setting($wptouch_pro->post['setting_name'], false);
echo '0';
}
break;
case 'delete-custom-icon':
if (current_user_can('upload_files')) {
if (isset($wptouch_pro->post['icon_name'])) {
$icon_location = WPTOUCH_CUSTOM_ICON_DIRECTORY . '/' . $wptouch_pro->post['icon_name'];
unlink($icon_location);
echo '0';
}
}
break;
case 'load-news':
echo wptouch_capture_include_file(WPTOUCH_DIR . '/admin/html/news.php');
break;
case 'load-notifications':
case 'load-notifications-plugin':
wptouch_notification_setup();
$result = array();
$result['html'] = wptouch_capture_include_file(WPTOUCH_DIR . '/admin/html/notification-content.php');
$result['count'] = wptouch_get_notification_count();
echo json_encode($result);
break;
case 'dismiss-notification':
wptouch_notification_setup();
$settings = wptouch_get_settings();
if (!in_array($wptouch_pro->post['notification_key'], $settings->dismissed_notifications)) {
$settings->dismissed_notifications[] = $wptouch_pro->post['notification_key'];
$settings->save();
}
$result = array();
$result['html'] = wptouch_capture_include_file(WPTOUCH_DIR . '/admin/html/notification-content.php');
$result['count'] = wptouch_get_notification_count();
echo json_encode($result);
break;
case 'load-plugin-compat-list':
$wptouch_pro->generate_plugin_hook_list(true);
$compat_settings = wptouch_get_settings('compat');
if (is_array($compat_settings->plugin_hooks) && count($compat_settings->plugin_hooks)) {
$changed = false;
foreach ($compat_settings->plugin_hooks as $name => $value) {
if (!isset($compat_settings->enabled_plugins[$name])) {
$compat_settings->enabled_plugins[$name] = 1;
$changed = true;
}
}
//.........这里部分代码省略.........
示例7: setup_child_theme_styles
function setup_child_theme_styles()
{
$css_file = $this->check_and_use_css_file($this->get_stylesheet_directory(false) . '/style.css');
wp_enqueue_style('wptouch_child', wptouch_check_url_ssl($css_file), array('wptouch-parent'), WPTOUCH_VERSION);
}
示例8: define
define('WPTOUCH_CUSTOM_SET_DIRECTORY', WPTOUCH_BASE_CONTENT_DIR . '/icons');
define('WPTOUCH_CUSTOM_UPLOAD_DIRECTORY', WPTOUCH_BASE_CONTENT_DIR . '/uploads');
define('WPTOUCH_CUSTOM_ICON_DIRECTORY', WPTOUCH_BASE_CONTENT_DIR . '/icons/custom');
define('WPTOUCH_CUSTOM_THEME_DIRECTORY', WPTOUCH_BASE_CONTENT_DIR . '/themes');
define('WPTOUCH_CUSTOM_ADDON_DIRECTORY', WPTOUCH_BASE_CONTENT_DIR . '/extensions');
define('WPTOUCH_CUSTOM_LANG_DIRECTORY', WPTOUCH_BASE_CONTENT_DIR . '/lang');
define('WPTOUCH_DEBUG_DIRECTORY', WPTOUCH_BASE_CONTENT_DIR . '/debug');
define('WPTOUCH_DEBUG_URL', WPTOUCH_BASE_CONTENT_URL . '/debug');
define('WPTOUCH_CACHE_DIRECTORY', WPTOUCH_BASE_CONTENT_DIR . '/cache');
define('WPTOUCH_BACKUP_DIRECTORY', WPTOUCH_BASE_CONTENT_DIR . '/backups');
define('WPTOUCH_CACHE_URL', WPTOUCH_BASE_CONTENT_URL . '/cache');
define('WPTOUCH_CUSTOM_ICON_URL', WPTOUCH_BASE_CONTENT_URL . '/icons/custom');
// Separates the two types of settings in terms of usability
define('WPTOUCH_SETTING_BASIC', 0);
define('WPTOUCH_SETTING_ADVANCED', 1);
define('WPTOUCH_DEFAULT_MENU_ICON', str_replace(wptouch_check_url_ssl(site_url()), '', plugins_url(WPTOUCH_ROOT_NAME) . '/resources/icons/elegant/Paper.png'));
define('WPTOUCH_DEFAULT_HOMESCREEN_ICON', WPTOUCH_URL . '/admin/images/default-bookmark.png');
define('WPTOUCH_SECS_IN_DAY', 60 * 60 * 24);
define('WPTOUCH_MULTISITE_LICENSED', 'wptouch_pro_licensed');
define('WPTOUCH_THUMBNAIL_SIZE', 144);
define('WPTOUCH_FEATURED_SIZE', 900);
define('WPTOUCH_EXCERPT_LENGTH', 24);
define('WPTOUCH_PRO_README_FILE', 'http://www.wptouch.com/wptouch-pro-3/readme.txt');
define('ADDON_SETTING_DOMAIN', 'addons');
define('WPTOUCH_API_GENERAL_CACHE_TIME', 1800);
define('WPTOUCH_THEME_ADDON_TRANSIENT_TIME', 600);
if (defined('WPTOUCH_IS_FREE')) {
define('WPTOUCH_API_CHECK_INTERVAL', 43200);
} else {
define('WPTOUCH_API_CHECK_INTERVAL', 1500);
}
示例9: https_for_ssl
function https_for_ssl($content)
{
return wptouch_check_url_ssl($content);
}
示例10: wptouch_save_menu_icon
function wptouch_save_menu_icon($menu_id, $menu_item_db_id, $args)
{
if (isset($_POST['menu-item-icon']) && isset($_POST['menu-item-icon'][$menu_item_db_id])) {
$image_file = str_replace(wptouch_check_url_ssl(site_url()), '', $_POST['menu-item-icon'][$menu_item_db_id]);
if (substr($image_file, 0, 2) == '//') {
// Fix for sites that implement protocol-relative media URLs, e.g. with Cloudflare plugin
$image_file = substr($image_file, 2);
$image_file = substr($image_file, strpos($image_file, '/'));
}
update_post_meta($menu_item_db_id, '_wptouch_pro_menu_item_icon', $image_file);
}
}
示例11: wptouch_save_menu_icon
function wptouch_save_menu_icon($menu_id, $menu_item_db_id, $args)
{
if (isset($_POST['menu-item-icon']) && isset($_POST['menu-item-icon'][$menu_item_db_id])) {
$image_file = str_replace(wptouch_check_url_ssl(site_url()), '', $_POST['menu-item-icon'][$menu_item_db_id]);
update_post_meta($menu_item_db_id, '_wptouch_pro_menu_item_icon', $image_file);
}
}
示例12: wptouch_the_theme_buy_url
<a class="button buynow" href="<?php
wptouch_the_theme_buy_url();
?>
">
<?php
_e('Add to License', 'wptouch-pro');
?>
</a>
<?php
}
?>
<?php
} elseif (!wptouch_is_theme_active() && !is_network_admin() || wptouch_is_theme_in_cloud()) {
?>
<a class="button activate" href="<?php
echo wptouch_check_url_ssl(wptouch_get_theme_activate_link_url());
?>
">
<?php
echo $activate_label;
?>
</a>
<?php
if (!wptouch_can_cloud_install() && wptouch_is_theme_in_cloud() && wptouch_get_theme_download_url() && !wptouch_get_theme_buy_url() && (!wptouch_is_controlled_network() || is_network_admin())) {
?>
<a class="button download theme" href="<?php
wptouch_the_theme_download_url();
?>
">
<?php
示例13: wptouch_get_activation_label
<?php
echo wptouch_get_activation_label();
?>
</a>
<?php
}
?>
<?php
}
?>
<?php
if (!wptouch_can_cloud_install()) {
?>
<a class="button activate" href="<?php
echo wptouch_check_url_ssl(wptouch_get_addon_activate_link_url());
?>
">
<?php
}
?>
<?php
}
?>
<?php
} else {
?>
<!-- Plugin is active -->
<?php
if (!wptouch_is_multisite_extension()) {
?>