コード例 #1
0
/**
 * Make IE behave like a standards-compliant browser
 */
function themify_base_ie_standards_compliant()
{
    echo '
	<!--[if lt IE 9]>
	<script src="' . themify_base_https_esc('http://s3.amazonaws.com/nwapi/nwmatcher/nwmatcher-1.2.5-min.js') . '"></script>
	<script type="text/javascript" src="' . themify_base_https_esc('http://cdnjs.cloudflare.com/ajax/libs/selectivizr/1.0.2/selectivizr-min.js') . '"></script>
	<![endif]-->
	';
}
コード例 #2
0
ファイル: functions.php プロジェクト: sirebbat/wordpress
/**
 * Enqueue Stylesheets and Scripts
 */
function themify_base_theme_enqueue_scripts()
{
    // Google Web Fonts embedding
    wp_enqueue_style('themify-google-fonts', themify_base_https_esc('http://fonts.googleapis.com/css') . '?family=Montserrat:400,700|Open+Sans:400,300&subset=latin,latin-ext');
    // Themify base styling
    wp_enqueue_style('themify-style', get_stylesheet_uri(), array(), wp_get_theme()->display('Version'));
    // Themify Media Queries CSS
    wp_enqueue_style('themify-media-queries', THEME_URI . '/media-queries.css');
    // Skin stylesheet
    $skin = themify_base_get('skin');
    if ($skin && 'default' != $skin) {
        wp_enqueue_style('themify-skin', THEME_URI . '/skins/' . $skin . '/style.css', array('themify-style'));
    }
    // Fontello Icon Fonts
    wp_enqueue_style('themify-fontello', THEME_URI . '/fontello/css/fontello.css');
    ///////////////////
    // Enqueue scripts
    ///////////////////
    // Themify internal scripts
    wp_enqueue_script('theme-script', THEME_URI . '/js/themify.script.js', array('jquery'), false, true);
    // Inject variable values in gallery script
    wp_localize_script('theme-script', 'themifyScript', apply_filters('themify_script_vars', array('lightbox' => themify_base_lightbox_vars_init(), 'lightboxContext' => apply_filters('themify_lightbox_context', '#pagewrap'), 'isTouch' => themify_is_touch() ? 'true' : 'false', 'html5placeholder' => 'yes')));
    // WordPress internal script to move the comment box to the right place when replying to a user
    if (is_single() || is_page()) {
        wp_enqueue_script('comment-reply');
    }
}
コード例 #3
0
 /**
  * Enqueues Google Fonts
  * 
  * @since 2.2.6
  * @since 2.2.7 Fonts are enqueued in a single call.
  */
 function enqueue_fonts()
 {
     $this->generate_css(true);
     // Call only to enqueue fonts.
     if (!empty($this->customizer_fonts)) {
         $subsets = 'latin';
         $user_subsets = implode(',', themify_base_get('setting-subsets', array()));
         if (!empty($user_subsets)) {
             $subsets .= ",{$user_subsets}";
         }
         $this->customizer_fonts = str_replace(' ', '+', implode('|', $this->customizer_fonts));
         wp_enqueue_style('customizer-google-fonts' . md5($this->customizer_fonts . $subsets), themify_base_https_esc('http://fonts.googleapis.com/css') . '?family=' . $this->customizer_fonts . '&subset=' . $subsets);
     }
 }