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); add_filter('wptouch_body_classes', 'foundation_add_google_font_classes'); } $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); } } } }
function foundation_pushit_init() { // PushIt CSS wp_register_style('foundation_pushit', foundation_get_base_module_url() . '/pushit/pushit.css'); wp_enqueue_style('foundation_pushit', foundation_get_base_module_url() . '/pushit/pushit.css', '', FOUNDATION_VERSION); // PushIt JS wp_enqueue_script('foundation_pushit', foundation_get_base_module_url() . '/pushit/pushit.js', array('jquery'), FOUNDATION_VERSION, true); }
function foundation_featured_init() { $settings = foundation_get_settings(); if ($settings->featured_enabled) { wp_enqueue_script('foundation_featured', foundation_get_base_module_url() . '/featured/swipe.js', false, FOUNDATION_VERSION, true); wp_enqueue_script('foundation_featured_init', foundation_get_base_module_url() . '/featured/wptouch-swipe.js', 'foundation_featured', FOUNDATION_VERSION, true); } }
function foundation_login_init() { // Load JS if (wptouch_fdn_show_login()) { wp_enqueue_script('foundation_login_jquery', foundation_get_base_module_url() . '/login/wptouch-login.js', array('jquery'), FOUNDATION_VERSION, true); } $fdn_login_strings = array('username_text' => __('Account Username', 'wptouch-pro'), 'password_text' => __('Account Password', 'wptouch-pro')); wp_localize_script('foundation_login_jquery', 'wptouchFdnLogin', $fdn_login_strings); }
function foundation_media_init() { $settings = foundation_get_settings(); if ($settings->new_video_handling) { // Load FitVids wp_enqueue_script('foundation_media_fitvids', foundation_get_base_module_url() . '/media/fitvids.js', array('foundation_base'), md5(FOUNDATION_VERSION), true); wp_enqueue_script('foundation_media_handling', foundation_get_base_module_url() . '/media/media.js', false, md5(FOUNDATION_VERSION), true); } }
function foundation_slideout_init() { // Slideout CSS wp_register_style('foundation_slideout', foundation_get_base_module_url() . '/slideout/slideout.css'); wp_enqueue_style('foundation_slideout', foundation_get_base_module_url() . '/slideout/slideout.css', '', md5(FOUNDATION_VERSION)); // Slideout JS wp_enqueue_script('foundation_slideout', foundation_get_base_module_url() . '/slideout/slideout.js', array('jquery'), md5(FOUNDATION_VERSION), true); // Slideout Helper JS wp_enqueue_script('foundation_slideout_helper', foundation_get_base_module_url() . '/slideout/slideout-helper.js', array('foundation_slideout'), md5(FOUNDATION_VERSION), true); }
function foundation_owlcarousel_init() { // wp_enqueue_style( // 'foundation_owlcarousel_theme', // foundation_get_base_module_url() . '/owlcarousel/assets/owl.theme.default.min.css', // '', // md5( FOUNDATION_VERSION ) // ); wp_enqueue_style('foundation_owlcarousel', foundation_get_base_module_url() . '/owlcarousel/owl.carousel.min.css', '', md5(FOUNDATION_VERSION)); wp_enqueue_script('foundation_owlcarousel', foundation_get_base_module_url() . '/owlcarousel/owl.carousel.min.js', array('jquery'), md5(FOUNDATION_VERSION), true); }
function foundation_hammer_init() { wp_enqueue_script('foundation_hammer', foundation_get_base_module_url() . '/hammer/hammer.min.js', array('jquery'), FOUNDATION_VERSION, true); wp_enqueue_script('foundation_hammer_fake_multitouch', foundation_get_base_module_url() . '/hammer/hammer.fakemultitouch.js', array('foundation_hammer'), FOUNDATION_VERSION, true); // wp_enqueue_script( // 'foundation_hammer_wptouch', // foundation_get_base_module_url() . '/hammer/wptouch.hammer.js', // array( 'foundation_hammer' ), // FOUNDATION_VERSION, // true // ); }
function foundation_menu_init() { /* wp_enqueue_style( 'foundation_menu', foundation_get_base_module_url() . '/menu/menu.css', foundation_menu_get_style_deps(), FOUNDATION_VERSION ); */ wp_enqueue_script('foundation_menu', foundation_get_base_module_url() . '/menu/menu.js', array('jquery'), FOUNDATION_VERSION, true); }
function foundation_media_init() { $settings = foundation_get_settings(); if ($settings->video_handling_type == 'fitvids') { // Load FitVids wp_enqueue_script('foundation_media_fitvids', foundation_get_base_module_url() . '/media/fitvids.js', array('foundation_base'), FOUNDATION_VERSION, true); } elseif ($settings->video_handling_type == 'fluidvids') { // Load Fluid Width Videos wp_enqueue_script('foundation_media_fluidvids', foundation_get_base_module_url() . '/media/fluid-width-videos.js', array('foundation_base'), FOUNDATION_VERSION, true); } if ($settings->video_handling_type != 'none') { wp_enqueue_script('foundation_media_handling', foundation_get_base_module_url() . '/media/media.js', false, FOUNDATION_VERSION, true); } }
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); } }
function foundation_google_fonts_init() { global $google_fonts_enabled; if ($google_fonts_enabled) { $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); add_filter('wptouch_body_classes', 'foundation_add_google_font_classes'); } $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(); // Maintain the module's max of 2 fonts when rendering; we'll let ourselves register more font placements for selection in the advanced type module. if (count($selected_font_info) > 2) { $selected_font_info = array_slice($selected_font_info, 0, 2); } 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', '//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); } } } } }
function foundation_fontello_init() { wp_enqueue_style('foundation_fontello_css', foundation_get_base_module_url() . '/fontello/css/fontello.css', '', FOUNDATION_VERSION, 'screen'); }
function foundation_tappable_init() { wp_enqueue_script('foundation_tappable', foundation_get_base_module_url() . '/tappable/tappable.min.js', array('jquery'), FOUNDATION_VERSION, true); wp_enqueue_script('foundation_tappable_wptouch', foundation_get_base_module_url() . '/tappable/wptouch.tappable.js', array('foundation_tappable'), FOUNDATION_VERSION, true); }
function foundation_hammer_init() { wp_enqueue_script('foundation_hammer', foundation_get_base_module_url() . '/hammer/hammer.min.js', array('jquery'), FOUNDATION_VERSION, true); wp_enqueue_script('foundation_hammer_wptouch', foundation_get_base_module_url() . '/hammer/wptouch.hammer.js', array('foundation_hammer'), FOUNDATION_VERSION, true); }
function foundation_load_more_init() { // Load JS wp_enqueue_script('foundation_load_more', foundation_get_base_module_url() . '/load-more/load-more.js', array('foundation_spinjs_jquery'), FOUNDATION_VERSION, true); wp_enqueue_script('foundation_load_more', foundation_get_base_module_url() . '/load-more/load-more.js', array('foundation_spinjs_jquery'), FOUNDATION_VERSION, true); }
function foundation_featured_init() { wp_enqueue_script('foundation_featured', foundation_get_base_module_url() . '/featured/swipe.js', false, FOUNDATION_VERSION, true); wp_enqueue_script('foundation_featured_init', foundation_get_base_module_url() . '/featured/wptouch-swipe.js', 'foundation_featured', FOUNDATION_VERSION, true); foundation_determine_images(); }
function foundation_spinjs_init() { // Load JS wp_enqueue_script('foundation_spinjs', foundation_get_base_module_url() . '/spinjs/spin.min.js', array('jquery'), md5(FOUNDATION_VERSION), true); wp_enqueue_script('foundation_spinjs_jquery', foundation_get_base_module_url() . '/spinjs/spin-jquery.js', array('foundation_spinjs'), md5(FOUNDATION_VERSION), true); }
function foundation_meny_init() { wp_enqueue_script('foundation_meny', foundation_get_base_module_url() . '/meny/meny.min.js', array('jquery'), FOUNDATION_VERSION, true); wp_enqueue_script('foundation_meny_wptouch', foundation_get_base_module_url() . '/meny/wptouch.meny.js', array('foundation_meny'), FOUNDATION_VERSION, true); }
function foundation_owlcarousel_init() { wp_enqueue_style('foundation_owlcarousel', foundation_get_base_module_url() . '/owlcarousel/assets/owl.carousel.css', '', FOUNDATION_VERSION); wp_enqueue_script('foundation_owlcarousel', foundation_get_base_module_url() . '/owlcarousel/owl.carousel.min.js', array('jquery'), FOUNDATION_VERSION, true); }
function foundation_font_awesome_init() { wp_enqueue_style('foundation_font_awesome_css', foundation_get_base_module_url() . '/font-awesome/font-awesome.min.css', '', FOUNDATION_VERSION, 'screen'); }
function foundation_tablets_init() { wp_enqueue_script('foundation_tablets', foundation_get_base_module_url() . '/tablets/tablets-helper.js', false, FOUNDATION_VERSION, true); }
function foundation_infinite_scroll_init() { // Load JS wp_enqueue_script('foundation_infinite_scroll', foundation_get_base_module_url() . '/infinite-scroll/infinite-scroll.js', array('jquery'), FOUNDATION_VERSION, true); }
function foundation_fastclick_init() { wp_enqueue_script('foundation_fastclick_wptouch', foundation_get_base_module_url() . '/fastclick/wptouch.fastclick.js', array('jquery'), md5(FOUNDATION_VERSION), true); wp_enqueue_script('foundation_fastclick', foundation_get_base_module_url() . '/fastclick/fastclick.min.js', array('foundation_fastclick_wptouch'), md5(FOUNDATION_VERSION), true); }
function foundation_menu_init() { wp_enqueue_script('foundation_menu', foundation_get_base_module_url() . '/menu/menu.js', array('jquery'), md5(FOUNDATION_VERSION), true); }
function foundation_wptouch_icons_init() { wp_enqueue_style('foundation_wptouch_icons_css', foundation_get_base_module_url() . '/wptouch-icons/css/wptouch-icons.css', '', FOUNDATION_VERSION, 'screen'); }
function foundation_animate_init() { // Load JS wp_register_style('foundation_animate_css', foundation_get_base_module_url() . '/animate-css/animate.css', '', FOUNDATION_VERSION, 'screen'); wp_enqueue_style('foundation_animate_css'); }
function foundation_overthrow_init() { wp_enqueue_script('foundation_overthrow', foundation_get_base_module_url() . '/overthrow/overthrow.min.js', array('jquery'), FOUNDATION_VERSION, true); }