本文整理汇总了PHP中wptouch_capture_include_file函数的典型用法代码示例。如果您正苦于以下问题:PHP wptouch_capture_include_file函数的具体用法?PHP wptouch_capture_include_file怎么用?PHP wptouch_capture_include_file使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wptouch_capture_include_file函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: foundation_add_login_form
function foundation_add_login_form()
{
if (wptouch_fdn_show_login()) {
$content = wptouch_capture_include_file(dirname(__FILE__) . '/login-html.php');
echo $content;
}
}
开发者ID:sb-xs,项目名称:que-pour-elle,代码行数:7,代码来源:login.php
示例2: foundation_sharing_content
function foundation_sharing_content()
{
$settings = foundation_get_settings();
$content = '';
if ($settings->share_on_pages == true) {
$is_page = is_page();
} else {
$is_page = '';
}
if ($settings->show_share && (is_single() || $is_page)) {
$content = wptouch_capture_include_file(dirname(__FILE__) . '/sharing-html.php');
}
return $content;
}
开发者ID:dtekcth,项目名称:datateknologer.se,代码行数:14,代码来源:sharing.php
示例3: wptouch_show_desktop_switch_link
function wptouch_show_desktop_switch_link()
{
$switch_html = wptouch_capture_include_file(WPTOUCH_DIR . '/include/html/desktop-switch.php');
echo apply_filters('wptouch_desktop_switch_html', $switch_html);
}
开发者ID:sumwander,项目名称:unyil,代码行数:5,代码来源:globals.php
示例4: 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 '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-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;
}
}
if ($changed) {
$compat_settings->save();
}
}
echo wptouch_capture_include_file(WPTOUCH_DIR . '/admin/settings/html/plugin-compat-ajax.php');
break;
case 'prep-settings-download':
require_once WPTOUCH_DIR . '/core/admin-backup-restore.php';
$backup_file = wptouch_backup_settings();
echo $backup_file;
break;
case 'load-upgrade-area':
$content = wp_remote_get('http://wptouch-pro-4.s3.amazonaws.com/free-upgrade-area/page.xhtml');
if (!is_wp_error($content)) {
echo $content['body'];
}
break;
case 'download-icon-set':
global $wptouch_pro;
require_once WPTOUCH_DIR . '/core/icon-set-installer.php';
$icon_set_installer = new WPtouchIconSetInstaller();
$icon_set_installer->install($wptouch_pro->post['base'], $wptouch_pro->post['url']);
if (file_exists(WPTOUCH_BASE_CONTENT_DIR . '/icons/' . $wptouch_pro->post['base'])) {
echo '1';
} else {
echo '0';
}
break;
case 'get-icon-set-info':
require_once WPTOUCH_DIR . '/core/admin-icons.php';
echo wptouch_capture_include_file(WPTOUCH_DIR . '/admin/settings/html/installed_icon_sets_ajax.php');
break;
case 'admin-change-log':
if (!defined('WPTOUCH_IS_FREE')) {
$change_log = wp_remote_get(WPTOUCH_PRO_README_FILE);
} else {
$change_log = wp_remote_get('http://plugins.svn.wordpress.org/wptouch/trunk/readme.txt');
}
if (!is_wp_error($change_log)) {
$content = $change_log['body'];
$result = preg_match_all("#= Version (.*) =(.*)\n=#iUs", $content, $matches);
if ($result) {
$entries = count($matches[0]);
for ($i = 0; $i < $entries; $i++) {
echo '<h4 style="font-family: Helvetica, sans-serif">' . sprintf(__('Version %s', 'wptouch-pro'), $matches[1][$i]) . '</h4><ul style="font-family: Helvetica, sans-serif; font-size: 13px">';
echo str_replace('* ', '<li style="padding-top:3px;padding-bottom:3px;">', str_replace("\n", "</li>\n", $matches[2][$i]));
echo '</ul>';
}
}
} else {
echo __('There is a temporary issue retrieving the change-log. Please try again later.', 'wptouch-pro');
}
break;
case 'load-addon-browser':
require_once WPTOUCH_DIR . '/admin/settings/html/extension-browser-ajax.php';
break;
case 'repair-active-theme':
$result = wptouch_repair_active_theme_from_cloud($errors);
if (wptouch_migration_is_theme_broken()) {
echo '0';
//.........这里部分代码省略.........
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:101,代码来源:admin-ajax.php
示例5: foundation_base_add_preview_code
function foundation_base_add_preview_code()
{
if (wptouch_in_preview_window()) {
echo wptouch_capture_include_file(dirname(__FILE__) . '/preview-bar.php');
}
}
开发者ID:liangwei1988,项目名称:wordpress,代码行数:6,代码来源:base.php
示例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;
}
}
//.........这里部分代码省略.........
开发者ID:patrickmetzger,项目名称:adthrive-touch,代码行数:101,代码来源:admin-ajax.php
示例7: handle_footer
function handle_footer()
{
$settings = wptouch_get_settings();
if ($settings->show_wptouch_in_footer) {
echo wptouch_capture_include_file(WPTOUCH_DIR . '/include/html/footer.php');
}
if ($settings->show_footer_load_times) {
echo apply_filters('wptouch_footer_load_time', wptouch_capture_include_file(WPTOUCH_DIR . '/include/html/load-times.php'));
}
if ($settings->custom_stats_code) {
echo apply_filters('wptouch_custom_stats_code', $settings->custom_stats_code);
}
}
开发者ID:sydneyDAD,项目名称:cardguys.com,代码行数:13,代码来源:class-wptouch-pro.php
示例8: handle_footer
function handle_footer()
{
$settings = wptouch_get_settings();
if ($settings->show_wptouch_in_footer) {
global $footer_settings;
$footer_settings = $settings;
echo wptouch_capture_include_file(WPTOUCH_DIR . '/include/html/footer.php');
}
switch ($settings->analytics_embed_method) {
case 'simple':
if ($settings->analytics_google_id) {
$analytics_code = "\n\t\t\t\t\t<script>\n\t\t\t\t\t\t!function(W,P,t,o,u,c,h){W.GoogleAnalyticsObject=t;W[t]||(W[t]=function(){\n\t\t\t\t\t\t(W[t].q=W[t].q||[]).push(arguments)});W[t].l=+new Date;c=P.createElement(o);\n\t\t\t\t\t\th=P.getElementsByTagName(o)[0];c.src=u;h.parentNode.insertBefore(c,h)}\n\t\t\t\t\t\t(window,document,'ga','script','//www.google-analytics.com/analytics.js');\n\t\t\t\t\t\tga('create','" . $settings->analytics_google_id . "', 'auto');\n\t\t\t\t\t\tga('send', 'pageview');\n\t\t\t\t\t</script>";
echo $analytics_code;
}
break;
case 'custom':
if ($settings->custom_stats_code) {
echo apply_filters('wptouch_custom_stats_code', $settings->custom_stats_code);
}
break;
}
}
开发者ID:sumwander,项目名称:unyil,代码行数:22,代码来源:class-wptouch-pro.php
注:本文中的wptouch_capture_include_file函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论