Пример #1
0
function foundation_base_init()
{
    wp_enqueue_script('foundation_base', foundation_get_base_module_url() . '/base/base.js', foundation_base_get_script_deps(), FOUNDATION_VERSION, true);
    wp_enqueue_script('foundation__public_base', foundation_get_base_module_url() . '/base/base-public.js', foundation_base_get_script_deps(), FOUNDATION_VERSION, true);
    // Only load preview script when we are in a preview window
    if (wptouch_in_preview_window()) {
        wp_enqueue_script('foundation-preview', foundation_get_base_module_url() . '/base/wptouch-preview.js', array('foundation_base'), FOUNDATION_VERSION, true);
    }
    // Themes can add their own localization, but Foundation-aware modules can use this hook
    $foundation_strings = array('ajaxLoading' => __('Loading', 'wptouch-pro') . '…', 'isRTL' => wptouch_should_load_rtl() ? '1' : '0');
    $foundation_localized_strings = apply_filters('foundation_localized_strings', $foundation_strings);
    if (count($foundation_localized_strings)) {
        wp_localize_script('foundation_base', 'wptouchFdn', $foundation_localized_strings);
    }
}
Пример #2
0
function foundation_body_classes($classes)
{
    global $wptouch_pro;
    $global_settings = $wptouch_pro->get_settings();
    $settings = foundation_get_settings();
    if ($settings->video_handling_type != 'none') {
        $classes[] = 'css-videos';
    }
    if ($settings->typography_sets != 'default') {
        $classes[] = 'body-font';
    }
    if (isset($_COOKIE['wptouch-device-type'])) {
        if ($_COOKIE['wptouch-device-type'] == 'smartphone') {
            $classes[] = 'smartphone';
        } else {
            if ($_COOKIE['wptouch-device-type'] == 'tablet') {
                $classes[] = 'tablet';
            }
        }
    }
    if (isset($_COOKIE['wptouch-device-orientation'])) {
        if ($_COOKIE['wptouch-device-orientation'] == 'portrait') {
            $classes[] = 'portrait';
        } else {
            if ($_COOKIE['wptouch-device-orientation'] == 'landscape') {
                $classes[] = 'landscape';
            }
        }
    }
    // iOS Device
    if (strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone') || strpos($_SERVER['HTTP_USER_AGENT'], 'iPod') || strpos($_SERVER['HTTP_USER_AGENT'], 'iPad')) {
        $classes[] = 'ios';
    }
    // Android Device
    if (strpos($_SERVER['HTTP_USER_AGENT'], 'Android')) {
        $classes[] = 'android';
    }
    if (wptouch_should_load_rtl()) {
        $classes[] = 'rtl';
    }
    if (wptouch_fdn_iOS_7() || wptouch_fdn_iOS_8()) {
        $classes[] = 'ios7';
    }
    $classes[] = 'theme-' . $global_settings->current_theme_name;
    return $classes;
}
Пример #3
0
        _e('by', 'wptouch-pro');
        ?>
 <?php 
        the_author();
        ?>
		 	<?php 
    }
    ?>
		 </span>
	 <?php 
}
?>

	<h2 class="post-title heading-font"><?php 
the_title();
?>
</h2>

	<?php 
if (wptouch_should_load_rtl()) {
    ?>
		<i class="arrow icon-angle-left"></i>
	<?php 
} else {
    ?>
		<i class="arrow icon-angle-right"></i>
	<?php 
}
?>
	<span class="bottom-border"><!--css border--></span>
</a>
Пример #4
0
 function setup_theme_styles()
 {
     $settings = $this->get_settings();
     // Add the default stylesheet to the end, use min if available
     $dependencies = array();
     if ($this->has_parent_theme()) {
         $dependencies = array('wptouch-parent');
         $parent_info = $this->get_parent_theme_info();
         $css_file = $this->check_and_use_css_file($parent_info->location . '/' . $this->get_active_device_class() . '/style.css', WP_CONTENT_DIR, WP_CONTENT_URL);
         wp_enqueue_style('wptouch-parent', wptouch_check_url_ssl($css_file), false, WPTOUCH_VERSION);
         do_action('wptouch_parent_style_queued');
         // Load parent RTL css file
         if (wptouch_should_load_rtl() && file_exists(WP_CONTENT_DIR . '/' . $parent_info->location . '/' . $this->get_active_device_class() . '/' . $parent_info->location . '-rtl.css')) {
             wp_enqueue_style('wptouch-parent-rtl', wptouch_check_url_ssl($this->check_and_use_css_file($parent_info->location . '/' . $this->get_active_device_class() . '/' . $parent_info->location . '-rtl.css', WP_CONTENT_DIR, WP_CONTENT_URL)), array('wptouch-parent'), WPTOUCH_VERSION);
         }
     }
     $css_file = $this->check_and_use_css_file($settings->current_theme_location . '/' . $settings->current_theme_name . '/' . $this->get_active_device_class() . '/style.css', WP_CONTENT_DIR, WP_CONTENT_URL);
     wp_enqueue_style('wptouch', wptouch_check_url_ssl($css_file), $dependencies, WPTOUCH_VERSION);
     // Load child RTL css file
     if (wptouch_should_load_rtl() && file_exists(WP_CONTENT_DIR . '/' . $settings->current_theme_location . '/' . $settings->current_theme_name . '/' . $this->get_active_device_class() . '/' . $settings->current_theme_name . '-rtl.css')) {
         wp_enqueue_style('wptouch-rtl', wptouch_check_url_ssl($this->check_and_use_css_file($settings->current_theme_location . '/' . $settings->current_theme_name . '/' . $this->get_active_device_class() . '/' . $settings->current_theme_name . '-rtl.css', WP_CONTENT_DIR, WP_CONTENT_URL)), array('wptouch'), WPTOUCH_VERSION);
     }
 }
 function setup_admin_stylesheets()
 {
     if ($this->admin_is_wptouch_page()) {
         wp_enqueue_style('wptouch-admin-styles', $this->check_and_use_css_file('/admin/css/wptouch-admin-3.css'), false, WPTOUCH_VERSION);
         wp_enqueue_style('wptouch-admin-icons', $this->check_and_use_css_file('/themes/foundation/modules/wptouch-icons/css/wptouch-icons.css'), false, WPTOUCH_VERSION);
         if (wptouch_should_load_rtl() && file_exists(WPTOUCH_DIR . '/admin/css/rtl.css')) {
             WPTOUCH_DEBUG(WPTOUCH_INFO, 'Loading RTL stylesheet');
             wp_enqueue_style('wptouch-admin-rtl', wptouch_check_url_ssl($this->check_and_use_css_file('/admin/css/rtl.css', WPTOUCH_DIR, WPTOUCH_URL)), array('wptouch-admin-styles', 'wptouch-admin-css-bootstrap'), WPTOUCH_VERSION);
         }
     }
 }
Пример #6
0
 function setup_admin_stylesheets()
 {
     if ($this->admin_is_wptouch_page()) {
         // 4.0 - Lato'ing it up
         wp_enqueue_style('wptouch-admin-google-fonts', '//fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic', false, md5(WPTOUCH_VERSION));
         // 4.0 - Loading Fontello
         wp_enqueue_style('wptouch-admin-fontello', $this->check_and_use_css_file('/admin/fontello/css/fontello-embedded.css'), false, md5(WPTOUCH_VERSION));
         if (strpos($_SERVER['REQUEST_URI'], 'wptouch-admin-wizard') !== false) {
             wp_enqueue_style('wptouch-admin-wizard-styles', $this->check_and_use_css_file('/admin/css/wptouch-admin-4-wizard.css'), false, md5(WPTOUCH_VERSION));
         } else {
             wp_enqueue_style('wptouch-admin-styles', $this->check_and_use_css_file('/admin/css/wptouch-admin-4.css'), false, md5(WPTOUCH_VERSION));
         }
         if (wptouch_should_load_rtl() && file_exists(WPTOUCH_DIR . '/admin/css/wptouch-admin-rtl.css')) {
             WPTOUCH_DEBUG(WPTOUCH_INFO, 'Loading RTL stylesheet');
             wp_enqueue_style('wptouch-admin-rtl', wptouch_check_url_ssl($this->check_and_use_css_file('/admin/css/wptouch-admin-rtl.css', WPTOUCH_DIR, WPTOUCH_URL)), array('wptouch-admin-styles'), md5(WPTOUCH_VERSION));
         }
     }
     if ($this->admin_is_menu_page()) {
         $settings = $this->get_settings();
         wp_enqueue_script('wptouch-menu', $this->check_and_use_js_file('/admin/js/wptouch-menu.js'), array('jquery'), md5(WPTOUCH_VERSION), true);
         wp_enqueue_style('wptouch-menu', $this->check_and_use_css_file('/admin/css/wptouch-menu.css'), false, md5(WPTOUCH_VERSION));
         $localize_params = array('default_icon' => wptouch_get_site_default_icon());
         wp_localize_script('wptouch-menu', 'wptouchMenu', $localize_params);
     }
 }