本文整理汇总了PHP中yit_ie_version函数的典型用法代码示例。如果您正苦于以下问题:PHP yit_ie_version函数的具体用法?PHP yit_ie_version怎么用?PHP yit_ie_version使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了yit_ie_version函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: enqueue
/**
* Enqueue stylesheets with wp_enqueue_style
*
* @return void
* @since 1.0.0
*/
public function enqueue()
{
$subsets = yit_get_option('google_fonts_subsets');
$subsets = $subsets ? 'subset=' . implode(',', $subsets) . '&' : '';
$base_url = '//fonts.googleapis.com/css?' . $subsets . 'family=';
$i = 0;
$srcs = array($base_url);
if (yit_ie_version() > 8 || yit_ie_version() == -1) {
foreach ($this->fonts as $font) {
if (strlen($srcs[$i] . $font) > 1024) {
$i++;
$srcs[$i] = $base_url;
}
$srcs[$i] .= $font . '|';
}
foreach ($srcs as $k => $src) {
$index = count($srcs) > 1 ? '-' . ($k + 1) : '';
wp_enqueue_style('google-fonts' . $index, rtrim(str_replace(' ', '+', $src), '|'));
}
} else {
foreach ($this->fonts as $font) {
wp_enqueue_style($font . '-font', $base_url . str_replace(' ', '+', $font));
}
}
}
开发者ID:jayeshnair,项目名称:ctp,代码行数:31,代码来源:Google_font.php
示例2:
/**
* Your Inspiration Themes
*
* @package WordPress
* @subpackage Your Inspiration Themes
* @author Your Inspiration Themes Team <[email protected]>
*
* This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://www.gnu.org/licenses/gpl-3.0.txt
*/
//Add body classes
$body_classes = 'no_js';
if (yit_get_option('responsive-enabled') && !$GLOBALS['is_IE'] || yit_get_option('responsive-enabled') && yit_ie_version() >= 9) {
$body_classes .= ' responsive';
}
$body_classes .= ' ' . yit_get_option('layout-type');
global $woocommerce;
// get cart quantity
$qty = $woocommerce->cart->get_cart_contents_count();
// get cart total
$total = $woocommerce->cart->get_cart_total();
// get cart url
$cart_url = $woocommerce->cart->get_cart_url();
// if multiple products in cart
if ($qty > 1) {
echo '<a href="' . $cart_url . '">' . $qty . ' products | ' . $total . '</a>';
}
// if single product in cart
开发者ID:gloomyghost,项目名称:Tip-Top-Art,代码行数:30,代码来源:header.php
示例3: apply_filters
// }
$woocommerce_loop['columns'] = apply_filters( 'loop_shop_columns', $woocommerce_loop['columns'] );
// first and last
if ( $woocommerce_loop['loop'] % $woocommerce_loop['columns'] == 0 ) $woocommerce_loop['li_class'][] = 'last';
elseif ( ( $woocommerce_loop['loop'] - 1 ) % $woocommerce_loop['columns'] == 0 ) $woocommerce_loop['li_class'][] = 'first';
// title classes
$title_class = array();
if ( !yit_get_option('shop-view-show-title') ) $title_class[] = 'hide';
if ( yit_get_option('shop-title-uppercase') ) $title_class[] = 'upper';
$title_class = empty( $title_class ) ? '' : ' class="' . implode( ' ', $title_class ) . '"';
// if css3
if ( yit_ie_version() == -1 || yit_ie_version() > 9 ) $woocommerce_loop['li_class'][] = 'css3';
// configuration
if ( ! yit_get_option('shop-view-show-price') ) remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price' );
// force open hover
if ( yit_get_option( 'shop-open-hover' ) ) $woocommerce_loop['li_class'][] = 'force-open-hover';
// open the hover on mobile
if ( yit_get_option( 'responsive-open-hover' ) ) $woocommerce_loop['li_class'][] = 'open-on-mobile';
// open the hover on mobile
if ( yit_get_option( 'responsive-force-classic' ) && $woocommerce_loop['layout'] == 'with-hover' ) $woocommerce_loop['li_class'][] = 'force-classic-on-mobile';
?>
<li class="<?php echo implode( ' ', $woocommerce_loop['li_class'] ) ?>">
开发者ID:simonsays88,项目名称:costa,代码行数:30,代码来源:content-product.php
示例4: yit_ie_version
*/
/**
* Template file for Social Shortcode
*
* @package Yithemes
* @author Antonio La Rocca <[email protected]>
* @since 1.0.0
*/
if (!defined('ABSPATH')) {
exit;
}
// Exit if accessed directly
//IE8 and IE9 Fix
global $is_IE;
if ($is_IE) {
$ie_version = yit_ie_version();
$is_old_ie = $ie_version < 10 && $ie_version != -1 ? true : false;
} else {
$is_old_ie = false;
}
if (is_null($title)) {
$title = "";
}
$target = isset($target) && $target != '' ? 'target="' . $target . '"' : '';
/* Code snipped from icon shortcode */
$circle = $circle == 'no' ? false : true;
$style_color = $color == '' ? '' : 'color:' . $color . ';';
$color_hover = $color_hover == '' ? '#000000' : $color_hover;
$style_border_color = $color == '' ? '' : 'border-color:' . $color . ';';
$style_border_size = "border-width:0px;";
if ($circle) {
开发者ID:NgocSon2412,项目名称:website_banhang,代码行数:31,代码来源:social.php
示例5: bloginfo
<!-- MAIN THEME STYLESHEET -->
<link rel="stylesheet" type="text/css" media="all" href="<?php
bloginfo('stylesheet_url');
?>
" />
<!-- PINGBACK & WP STANDARDS -->
<link rel="pingback" href="<?php
bloginfo('pingback_url');
?>
" />
<?php
global $is_IE;
yit_enqueue_style(10, 'font-awesome', YIT_CORE_ASSETS_URL . '/css/font-awesome.css', false, '2.0', 'all');
if (yit_ie_version() == 7) {
yit_enqueue_style(10, 'font-awesome-ie7', YIT_CORE_ASSETS_URL . '/css/font-awesome-ie7.css', false, '2.0', 'all');
}
// colorbox - easing - flexslider - images loaded - tiptip
//wp_enqueue_script( 'jquery-colorbox', get_template_directory_uri() .'/theme/assets/js/jquery.colorbox-min.js', array('jquery'), '1.0', true);
//wp_enqueue_script( 'jquery-easing', get_template_directory_uri() .'/theme/assets/js/jquery.easing.js', array('jquery'), '1.3', true);
//wp_enqueue_script( 'jquery-flexslider', get_template_directory_uri() .'/theme/assets/js/jquery.flexslider-min.js', array('jquery'), '', true);
//wp_enqueue_script( 'jquery-imagesLoaded', get_template_directory_uri() .'/theme/assets/js/jquery.imagesLoaded.js' );
//wp_register_script( 'jquery-tipTip', get_template_directory_uri() .'/theme/assets/js/jquery.tipTip.minified.js', array('jquery'), '1.0', true);
//wp_enqueue_script( 'jquery-tipTip' );
wp_enqueue_script('jquery-colorbox-easing-flexslider-imagesloaded-tiptip', get_template_directory_uri() . '/theme/assets/js/jquery.commonlibraries.js', array('jquery'), '1.1', true);
//place holder
if ($is_IE) {
wp_enqueue_script('jquery-placeholder-plugin', YIT_CORE_ASSETS_URL . '/js/jquery.placeholder.js', array('jquery'), '1.0', true);
}
// masonry
开发者ID:zgomotos,项目名称:Bazar,代码行数:31,代码来源:head.php
示例6: define
* @package Wordpress
* @subpackage Kassyopea
* @since 1.1
*/
if (!defined('IFRAME_REQUEST')) {
define('IFRAME_REQUEST', true);
}
require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/safe-wp-load.php';
#if ( isset( $_POST['ajax'] ) && $_POST['ajax'] ) {
# yiw_fields_shortcode( $_POST['shortcode_id'] );
# die;
#}
@header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
?>
<html <?php
if (yit_ie_version() < 9 && yit_ie_version() > 0) {
echo 'class="ie8"';
}
?>
xmlns="http://www.w3.org/1999/xhtml" <?php
do_action('admin_xml_ns');
?>
<?php
language_attributes();
?>
>
<head>
<meta http-equiv="Content-Type" content="<?php
bloginfo('html_type');
?>
; charset=<?php
开发者ID:zgomotos,项目名称:Bazar,代码行数:31,代码来源:lightbox.php
示例7: elseif
if ($woocommerce_loop['loop'] % $woocommerce_loop['columns'] == 0) {
$woocommerce_loop['li_class'][] = 'last';
} elseif (($woocommerce_loop['loop'] - 1) % $woocommerce_loop['columns'] == 0) {
$woocommerce_loop['li_class'][] = 'first';
}
// title classes
$title_class = array();
if (!yit_get_option('shop-view-show-title')) {
$title_class[] = 'hide';
}
if (yit_get_option('shop-title-uppercase')) {
$title_class[] = 'upper';
}
$title_class = empty($title_class) ? '' : ' class="' . implode(' ', $title_class) . '"';
// if css3
if (yit_ie_version() == -1 || yit_ie_version() > 9) {
$woocommerce_loop['li_class'][] = 'css3';
}
// configuration
if (!yit_get_option('shop-view-show-price')) {
remove_action('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price');
}
// force open hover
if (yit_get_option('shop-open-hover')) {
$woocommerce_loop['li_class'][] = 'force-open-hover';
}
// open the hover on mobile
if (yit_get_option('responsive-open-hover')) {
$woocommerce_loop['li_class'][] = 'open-on-mobile';
}
// open the hover on mobile
开发者ID:zgomotos,项目名称:Bazar,代码行数:31,代码来源:content-product.php
示例8: enqueue
/**
* Enqueue stylesheets with wp_enqueue_style
*
* @return void
* @access public
* @since 1.0.0
* @author Andrea Grillo <[email protected]>
* @author Antonino Scarfi <[email protected]>
*/
public function enqueue()
{
$subsets = yit_get_option('google_fonts_subsets', '');
$subsets = !empty($subsets) ? 'subset=' . implode(',', array_shift($subsets)) . '&' : '';
$base_url = '//fonts.googleapis.com/css?' . $subsets . 'family=';
$i = 0;
$srcs = array($base_url);
$font_variations = '';
$variations = '';
$this->fonts = $this->getModel('font')->load_options_font();
if (yit_ie_version() > 8 || yit_ie_version() == -1) {
//IE9 or greater and other browser
foreach ($this->fonts as $font => $style) {
$variations = '';
foreach ($style as $key => $variation) {
$variations .= $variation . ',';
}
$variations = substr($variations, 0, strlen($variations) - 1);
if (strlen($srcs[$i] . $font . ':' . $variations) > 1024) {
$i++;
$srcs[$i] = $base_url;
}
if (!empty($font) && !empty($variations)) {
$srcs[$i] .= $font . ':' . $variations . '|';
}
}
foreach ($srcs as $k => $src) {
if ($src == $base_url) {
continue;
}
$index = count($srcs) > 1 ? '-' . ($k + 1) : '';
$args = array('src' => rtrim(str_replace(' ', '+', $src), '|'), 'enqueue' => true);
YIT_Asset()->set('style', 'google-fonts' . $index, $args);
}
} else {
//IE8 Support
foreach ($this->fonts as $font => $style) {
$font_variations = '';
$variations = '';
foreach ($style as $key => $variation) {
$variations .= $variation . ',';
}
$variations = substr($variations, 0, strlen($variations) - 1);
$font_variations .= $font . ':' . $variations;
$args = array('src' => $base_url . str_replace(' ', '+', $font_variations), 'enqueue' => true);
YIT_Asset()->set('style', sanitize_title($font), $args);
}
}
}
开发者ID:lieison,项目名称:IndustriasFenix,代码行数:58,代码来源:Google_fonts.php
示例9: custom_stylesheet_javascript
/**
* Load custom stylesheets files in admin area
*
*/
public function custom_stylesheet_javascript()
{
global $pagenow;
wp_enqueue_style('yit-panel', YIT_CORE_ASSETS_URL . '/css/panel.css');
wp_enqueue_style('yit-metaboxes', YIT_CORE_ASSETS_URL . '/css/metaboxes.css');
if ($pagenow != 'index.php') {
//page != dashboard
wp_enqueue_script('yit-panel', YIT_CORE_ASSETS_URL . '/js/panel.js');
wp_enqueue_script('yit-metaboxes', YIT_CORE_ASSETS_URL . '/js/metaboxes.js');
wp_enqueue_script('yit-panel-typography', YIT_CORE_ASSETS_URL . '/js/yit/panel/jquery.yit_panel_typography.js');
wp_enqueue_script('yit-types', YIT_CORE_ASSETS_URL . '/js/types.js');
}
if ($pagenow != 'widgets.php') {
//jquery ui
wp_enqueue_style('jquery-ui-overcast', YIT_CORE_ASSETS_URL . '/css/overcast/jquery-ui-1.8.9.custom.css', false, '1.8.8', 'all');
}
if ($pagenow == 'widgets.php') {
wp_enqueue_script('yit-widgets', YIT_CORE_ASSETS_URL . '/js/widgets.js');
}
//thickbox
wp_enqueue_script('thickbox');
wp_enqueue_style('thickbox');
if (!strstr($_SERVER['REQUEST_URI'], 'layerslider') && $pagenow != 'nav-menus.php') {
wp_enqueue_script('jquery-ui');
wp_enqueue_script('jquery-ui-core');
wp_enqueue_script('jquery-ui-mouse');
wp_enqueue_script('jquery-ui-button');
wp_enqueue_script('jquery-ui-dialog');
wp_enqueue_script('jquery-ui-slider');
wp_enqueue_script('jquery-ui-widget');
wp_enqueue_script('jquery-ui-sortable');
}
//color picker
wp_enqueue_style('color-picker', YIT_CORE_ASSETS_URL . '/css/colorpicker.css', false, '1.0', 'all');
wp_enqueue_script('color-picker', YIT_CORE_ASSETS_URL . '/js/colorpicker.js', '1', true);
//font-awesome
wp_enqueue_style('font-awesome', YIT_CORE_ASSETS_URL . '/css/font-awesome.css', false, '2.0', 'all');
if (yit_ie_version() == 7) {
wp_enqueue_style('font-awesome-ie7', YIT_CORE_ASSETS_URL . '/css/font-awesome-ie7.css', false, '2.0', 'all');
}
//number
if (!strstr($_SERVER['REQUEST_URI'], 'layerslider')) {
wp_enqueue_script('spinner', YIT_CORE_ASSETS_URL . '/js/jquery.spinner.js', '1', true);
}
}
开发者ID:zgomotos,项目名称:Bazar,代码行数:49,代码来源:Panel.php
示例10: get_option
<?php
/**
* Add new field for contact customize panel.
*
* Page for adding new field to contact module.
*
* @package Wordpress
* @subpackage Kassyopea
* @since 1.1
*/
@header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
?>
<html <?php if( yit_ie_version() < 9 && yit_ie_version() > 0 ) { echo 'class="ie8"'; } ?>xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>>
<head>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
<title><?php _e("Add shortcode", 'yit') ?></title>
<?php if( isset($sitepress) ) : ?>
<script type="text/javascript">
var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>';
</script>
<?php endif; ?>
<?php
wp_admin_css( 'wp-admin', true );
wp_enqueue_style( 'yit_tinymce', YIT_CORE_URL . '/assets/css/tinymce.css' );
wp_print_styles( 'colors-admin' );
wp_print_styles( 'yiw-tinymce-insert-tool' );
wp_print_scripts( 'jquery' );
wp_print_scripts( 'thickbox' );
开发者ID:simonsays88,项目名称:costa,代码行数:31,代码来源:lightbox.php
示例11: enqueue_scripts
/**
* Enqueue frontend scripts
*
* @return void
* @since 1.0.0
* @author Antonio La Rocca <[email protected]>
*/
public function enqueue_scripts() {
global $is_IE;
if ( ! wp_is_mobile() ) {
wp_register_script( 'yit-waypoint', $this->plugin_assets_url . '/js/waypoints.min.js', array( 'jquery' ), '', true );
wp_register_script( 'yit-shortcode-randomnumbers', $this->plugin_assets_url . '/js/random-number.min.js', array( 'jquery', 'yit-waypoint' ), '', true );
wp_register_script( 'yit-shortcode-easypiechart', $this->plugin_assets_url . '/js/jquery.easypiechart.min.js', array( 'jquery' ), '', true );
}
wp_register_script( 'yit-shortcodes', $this->plugin_assets_url . '/js/yit-shortcodes.min.js', array( 'jquery', 'yit-shortcode-easypiechart'), '', true );
wp_register_script( 'yit-shortcodes-twitter', $this->plugin_assets_url . '/js/twitter.min.js', array( 'jquery'), '', true );
wp_register_script( 'yit-shortcodes-twitter-text', $this->plugin_assets_url . '/js/twitter-text.min.js', array( 'jquery', 'yit-shortcodes-twitter'), '', true );
if( $is_IE && yit_ie_version() < 10 && yit_ie_version() != -1 ){
wp_register_script( 'yit-shortcodes-social', $this->plugin_assets_url . '/js/yit-social-shortcodes.js', array( 'jquery' ), '', true );
}
}
开发者ID:jabue,项目名称:wordpress,代码行数:23,代码来源:yit-shortcodes.php
注:本文中的yit_ie_version函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论