예제 #1
0
파일: Font.php 프로젝트: simonsays88/costa
    /**
     * Load Google Fonts stylesheets
     *
     * @return void
     * @since 1.0.0
     */
    public function load_options_font() {
        $theme_options_fonts = yit_get_option_by( 'type', 'typography' );
        $google_fonts = yit_get_google_fonts();
        $google_fonts = array_map( 'stripslashes', ( array ) $google_fonts->items );

        foreach( $theme_options_fonts as $option ) {
            $option_value = yit_get_option( $option['id'] );


            if ( ! array_key_exists( 'family', $option_value ) ) {
                continue;
            }

            if( $option_value['family'] != $option['std']['family'] ) {
                $family = $option_value['family'];
            } else {
                $family = $option['std']['family'];
            }

            if( in_array( $family, $google_fonts ) ) {
                //yit_enqueue_style( 600, 'font-' . sanitize_title( preg_replace( '/:(.*)?/', '', $option['std']['family'] ) ), yit_ssl_url( '//fonts.googleapis.com/css?family=' . $option['std']['family'] ) );
                yit_add_google_font( $family );
            }
        }
    }
예제 #2
0
    function widget( $args, $instance ) {
        extract( $args );   
        
        /* Impostazioni di default del widget */
        $defaults = array( 
            'title' => __( 'Categories', 'yit' ),
            'show_count' => 1
        );
        
        $instance = wp_parse_args( (array) $instance, $defaults ); 

        $title = apply_filters('widget_title', $instance['title'] );
        
        echo $before_widget;
        echo $before_title . $title . $after_title;
        
        echo '<ul id="almost_all_categories_widget">';
            $cat_params = Array(
                    'hide_empty'    =>  FALSE,
                    'title_li'      =>  '',
                    'show_count'    =>  $instance['show_count']
                );                                                  
            $exclude = maybe_unserialize( yit_get_option( 'blog-cats-exclude' ) );
            if( ! empty( $exclude[2] ) ){
                $cat_params['exclude'] = array_map('trim', $exclude[2] );
            }
            wp_list_categories( $cat_params );
        echo '</ul>';
        echo $after_widget;
    }                     
예제 #3
0
	/**
	 * Load and print the correspondent field type.
	 * 
	 * @param @field
	 * @return string
	 */
	public static function display( $value, $dep ) {            
		ob_start(); ?>
			<div id="<?php echo $value['id_container'] ?>" <?php if($dep): ?>data-field="<?php echo $dep['field'] ?>" data-dep="<?php echo $dep['dep'] ?>" data-value="<?php echo $dep['value'] ?>" <?php endif ?>class="yit_options rm_option rm_input rm_text rm_connectedlist">
                <div class="option">
                    <label for="<?php echo $value['id'] ?>"><?php echo $value['name'] ?></label>

					<?php $yit_option = json_decode( stripslashes( yit_get_option( $value['id'] ) ), true ); ?>
					<?php $value['lists'] = is_array($yit_option) ? $yit_option : $value['lists']; ?>

					<?php foreach( $value['lists'] as $list=>$options ): ?>
					<div class="list_container">
						<h4><?php echo $value['heads'][$list] ?></h4>
						<ul id="list_<?php echo $list ?>" class="connectedSortable" data-list="<?php echo $list ?>">
							<?php foreach( $options as $option=>$label ): ?>
	                    		<li data-option="<?php echo $option ?>" class="ui-state-default"><?php echo $label ?></li>
	                    	<?php endforeach ?>
	                    </ul>
                    </div>
					<?php endforeach ?>
					<input type="hidden" name="<?php yit_field_name( $value['id'] ) ?>" id="<?php echo $value['id'] ?>" value='<?php echo yit_get_option( $value['id'] ) ?>' />
                </div>
                <div class="description">
                    <?php echo $value['desc'] ?>
                </div>
                <div class="clear"></div>
            </div>
        <?php
		return ob_get_clean();
	}
예제 #4
0
        function widget($args, $instance)
        {
            extract($args);
            echo $before_widget;
            $search_type = yit_get_option('search_type');
            if (!is_shop_installed() && $search_type == 'product') {
                $search_type = 'post';
            }
            ?>

		<form action="<?php 
            echo home_url('/');
            ?>
" method="get" class="search_mini">
			<input type="text" name="s" id="search_mini" value="<?php 
            the_search_query();
            ?>
" placeholder="<?php 
            if (is_shop_installed()) {
                _e('search for products', 'yit');
            } else {
                _e('search for...', 'yit');
            }
            ?>
" />
			<input type="hidden" name="post_type" value="<?php 
            echo $search_type;
            ?>
" />
			<input type="submit" value="Search" id="mini-search-submit" />
		</form>

<?php 
            echo $after_widget;
        }
예제 #5
0
 /**
  * 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));
         }
     }
 }
예제 #6
0
 /**
  * Print the html for mobile devices favicons.
  *
  * @return string
  * @author Andrea Frascaspata    <*****@*****.**>
  * @since 1.0.0
  */
 function yit_print_mobile_favicons()
 {
     // 144: For iPad3 with retina display:
     // 114: for first- and second-generation iPad
     //  72: For first- and second-generation iPad
     //  57: For non-Retina iPhone, iPod Touch, and Android 2.1+ devices
     $size_list = array(144, 114, 72, 57);
     $favicon_base_url = yit_get_option('general-favicon-touch');
     //yit default favicons
     if ($favicon_base_url === false || empty($favicon_base_url) || $favicon_base_url == get_template_directory_uri() . '/apple-touch-icon-144x.png') {
         foreach ($size_list as $size) {
             $favicon_url = get_template_directory_uri() . '/apple-touch-icon-' . $size . 'x.png';
             if (is_ssl()) {
                 $favicon_url = str_replace('http://', 'https://', $favicon_url);
             }
             echo '<link rel="apple-touch-icon-precomposed" sizes="' . $size . 'x' . $size . '" href="' . $favicon_url . '" />';
         }
     } else {
         foreach ($size_list as $size) {
             $size_name = 'favicon_' . $size;
             add_image_size($size_name, $size, $size, true);
             $args['src'] = $favicon_base_url;
             $args['output'] = 'url';
             $args['size'] = $size_name;
             $url = yit_image($args, false);
             echo '<link rel="apple-touch-icon-precomposed" sizes="' . $size . 'x' . $size . '" href="' . $url . '" />';
         }
     }
 }
예제 #7
0
 /**
  * Create the theme menu in admin area
  *
  * In order to load new submenu pages just add a new class within
  * the panel/ folder in core or theme.
  *
  * @since  Version 2.0.0
  * @return void
  * @author Simone D'Amico <*****@*****.**>
  */
 public function add_menu_page()
 {
     $logo = YIT_CORE_PLUGIN_URL . '/assets/images/yithemes-icon.png';
     $admin_logo = yit_get_option("admin-logo-menu");
     if (isset($admin_logo) && !empty($admin_logo) && $admin_logo != "") {
         $logo = $admin_logo;
     }
     //create menu page
     add_menu_page($this->theme->Name, $this->theme->Name, 'manage_options', 'yit_panel', NULL, $logo, 61);
     //load new sub menu pages
     $submenuPaths = apply_filters('yit_panel_submenu_paths', array(YIT_THEME_PATH . '/yit/panel', YIT_CORE_PATH . '/yit/panel'));
     foreach ($submenuPaths as $path) {
         $path .= '/*.php';
         foreach ((array) glob($path) as $submenu) {
             if (!$submenu) {
                 continue;
             }
             $class = 'YIT_Panel_' . basename($submenu, '.php');
             if (!class_exists($class)) {
                 include_once $submenu;
                 $class = new $class();
                 $this->_submenuPages[$class->priority] = $class;
             }
         }
     }
 }
예제 #8
0
    /**
     * Load and print the correspondent field type.
     * 
     * @param @field
     * @return string
     */
    public static function display($value, $dep)
    {
        ob_start();
        ?>
			<div id="<?php 
        echo $value['id_container'];
        ?>
" <?php 
        if ($dep) {
            ?>
data-field="<?php 
            echo $dep['field'];
            ?>
" data-dep="<?php 
            echo $dep['dep'];
            ?>
" data-value="<?php 
            echo $dep['value'];
            ?>
" <?php 
        }
        ?>
class="yit_options rm_option rm_input rm_text">
                <div class="option">
                <label for="<?php 
        echo $value['id'];
        ?>
"><?php 
        echo $value['name'];
        ?>
</label>
                <input type="text" name="<?php 
        yit_field_name($value['id']);
        ?>
" id="<?php 
        echo $value['id'];
        ?>
" value="<?php 
        echo yit_get_option($value['id']);
        ?>
" />
                <input type="submit" value="<?php 
        echo $value['submit'];
        ?>
" id="<?php 
        echo $value['id'];
        ?>
-button" class="input_button button" />
                </div>
                <div class="description">
                    <?php 
        echo $value['desc'];
        ?>
                </div>
                <div class="clear"></div>
            </div>
        <?php 
        return ob_get_clean();
    }
예제 #9
0
    /**
     * widget function.
     *
     * @see WP_Widget
     * @access public
     * @param array $args
     * @param array $instance
     * @return void
     */
    function widget($args, $instance)
    {
        global $woocommerce;
        extract($args);
        if (!is_shop_installed() || yit_get_option('shop-enable') == 'no') {
            return;
        }
        ?>
        <div class="yit_cart_widget widget_shopping_cart">
    		<div class="cart_label">
                <?php 
        list($cart_items, $cart_subtotal, $cart_icon, $cart_currency) = yit_get_current_cart_info();
        ?>
                <a href="<?php 
        echo WC()->cart->get_cart_url();
        ?>
" class="cart-items" style="background: url(<?php 
        echo $cart_icon;
        ?>
) no-repeat center">
                    <span class="yit-mini-cart-icon">
                        <span class="cart-items-number"><?php 
        echo $cart_items;
        ?>
</span>
                    </span>
                </a>
            </div>

            <div class="cart_wrapper" style="display:none">

                <div class="widget_shopping_cart_content group">
                    <ul class="cart_list product_list_widget">
                        <li class="empty"><?php 
        _e('No products in the cart.', 'yit');
        ?>
</li>
                    </ul>
                </div>
            </div>

            <script type="text/javascript">
            jQuery(document).ready(function($){
				"use strict";

                $(document).on('mouseover', '.cart_label', function(){
                    $(this).next('.cart_wrapper').fadeIn(300);
                }).on('mouseleave', '.cart_label', function(){
                    $(this).next('.cart_wrapper').fadeOut(300);
                });

                $(document)
                    .on('mouseenter', '.cart_wrapper', function(){ $(this).stop(true,true).show() })
                    .on('mouseleave', '.cart_wrapper',  function(){ $(this).fadeOut(300) });
            });
            </script>
        </div>
		<?php 
    }
예제 #10
0
파일: Skin.php 프로젝트: jayeshnair/ctp
 /**
  * Include the skin css for custom style of each skin
  */
 public function add_skin_css()
 {
     $skin = yit_get_option('skin');
     if (empty($skin)) {
         return;
     }
     yit_enqueue_style(5000, 'skin-' . $skin, YIT_THEME_CSS_URL . '/skins/' . $skin . '.css', false, array(), false, 'all', true);
 }
예제 #11
0
파일: Checkbox.php 프로젝트: jayeshnair/ctp
    /**
     * Load and print the correspondent field type.
     * 
     * @param @field
     * @return string
     */
    public static function display($value, $dep)
    {
        ob_start();
        ?>
			<div id="<?php 
        echo $value['id_container'];
        ?>
" <?php 
        if ($dep) {
            ?>
data-field="<?php 
            echo $dep['field'];
            ?>
" data-dep="<?php 
            echo $dep['dep'];
            ?>
" data-value="<?php 
            echo $dep['value'];
            ?>
" <?php 
        }
        ?>
class="yit_options rm_option rm_input rm_checkbox">
                <div class="option">
                    <label for="<?php 
        echo $value['id'];
        ?>
"><?php 
        echo $value['name'];
        ?>
</label>
                    <input type="checkbox" class="checkbox-inline" name="<?php 
        yit_field_name($value['id']);
        ?>
" id="<?php 
        echo $value['id'];
        ?>
" value="1" <?php 
        checked(yit_get_option($value['id']), true);
        ?>
 /> <label for="<?php 
        echo $value['id'];
        ?>
"><?php 
        echo $value['name'];
        ?>
</label>
                </div>
                <div class="description">
                    <?php 
        echo $value['desc'];
        ?>
                </div>
                <div class="clear"></div>
            </div>
        <?php 
        return ob_get_clean();
    }
예제 #12
0
파일: Skins.php 프로젝트: jayeshnair/ctp
    /**
     * Display tab html code
     * 
     * @return string
     * @since 1.0.0
     */
    public function display_page()
    {
        $skins = yit_get_model('skin')->skins;
        ?>
			<div id="skins_skins" class="yit_options rm_option rm_input rm_text">
                <div class="option">
                	<?php 
        if (!empty($skins)) {
            ?>
                    <label for="skin"><?php 
            _e('Choose a skin to use', 'yit');
            ?>
</label>
	                <div class="select_wrapper">
	                    <select name="skin" id="skin">
							<?php 
            foreach ($skins as $id => $name) {
                ?>
							<option value="<?php 
                echo $id;
                ?>
"<?php 
                selected($id, yit_get_option('skin'));
                ?>
><?php 
                echo $name;
                ?>
</option>
							<?php 
            }
            ?>
	                    </select>
	                </div>                    
					<input type="submit" value="<?php 
            _e('Apply', 'yit');
            ?>
" class="button" name="apply-skin" id="apply-skin" />
					<?php 
        } else {
            ?>
					<?php 
            _e('No skin to select.', 'yit');
            ?>
					<?php 
        }
        ?>
                </div>
                <div class="description">
					<?php 
        _e('Apply skin you want to use. This will replace some options in the theme options.', 'yit');
        ?>
                </div>
                <div class="clear"></div>
            </div>
<?php 
    }
예제 #13
0
 public function send_email()
 {
     if (!wp_verify_nonce($_REQUEST['_nonce'], 'yit-contact-popup-nonce')) {
         die('You are not authorized!');
     }
     //yit_get_model('contact_form')->send_email();
     $contact = yit_get_option('contact-popup');
     echo do_shortcode('[contact_form name="' . $contact . '" ]');
     die;
 }
 /**
  * Add Setting SubPage
  *
  * add Setting SubPage to wordpress administrator
  *
  * @return array validate input fields
  * @since    1.0
  * @author   Emanuela Castorina <*****@*****.**>
  */
 public function add_setting_page()
 {
     $logo = YIT_CORE_PLUGIN_URL . '/assets/images/yithemes-icon.png';
     $admin_logo = function_exists('yit_get_option') ? yit_get_option('admin-logo-menu') : '';
     if (isset($admin_logo) && !empty($admin_logo) && $admin_logo != '' && $admin_logo) {
         $logo = $admin_logo;
     }
     add_menu_page('yit_plugin_panel', __('YIT Plugins', 'yit'), 'nosuchcapability', 'yit_plugin_panel', NULL, $logo, 62);
     add_submenu_page('yit_plugin_panel', $this->settings['label'], $this->settings['label'], 'manage_options', $this->settings['page'], array($this, 'yit_panel'));
     remove_submenu_page('yit_plugin_panel', 'yit_plugin_panel');
 }
예제 #15
0
    function widget($args, $instance)
    {
        extract($args);
        $title = apply_filters('widget_title', $instance['title']);
        $project_post_types = isset($instance['project_post_type']) ? $instance['project_post_type'] : 0;
        echo $before_widget . '<div class="border">';
        echo $before_title . $title . $after_title;
        ?>
		<!--<p><a href="#all" data-option-value="*" class="all active"><?php 
        _e('View all', 'yit');
        ?>
</a> <?php 
        _e('or filter by:', 'yit');
        ?>
</p>-->
		<p><?php 
        _e('filter by:', 'yit');
        ?>
</p>
		<?php 
        $faq = new WP_Query("post_type=faq");
        $cat_args = "taxonomy=category-faq&title_li=";
        if (!empty($instance['include'])) {
            $cat_args .= '&include=' . $instance['include'];
        }
        $cat = get_categories($cat_args);
        $allicon = yit_get_option('faq-allcategories-url');
        if (!$faq->have_posts()) {
            return false;
        }
        ?>
			<ul>
				<li><img src="<?php 
        echo $allicon ? $allicon : YIT_IMAGES_URL . '/faq/all.png';
        ?>
" /><a href="#all" data-option-value="*" class="active"><?php 
        echo apply_filters('yit_faq_filters_categories_all', __('All', 'yit'));
        ?>
</a></li>
				<?php 
        foreach ($cat as $c) {
            $thumbnail_id = get_metadata('faq_term', $c->term_id, 'thumbnail_id', true);
            $image = wp_get_attachment_url($thumbnail_id);
            echo '<li>';
            if (!empty($image)) {
                echo '<img src="' . $image . '" />';
            }
            echo '<a href="#' . urldecode(sanitize_title($c->slug)) . '" data-option-value=".' . urldecode(sanitize_title($c->slug)) . '">' . $c->name . '</a></li>';
        }
        ?>
			</ul>
		<?php 
        echo '</div>' . $after_widget;
    }
예제 #16
0
 /**
  * Retrieve the URL of the favicon.
  *
  * @return string
  * @since 1.0.0
  */
 function yit_get_favicon()
 {
     $url = yit_get_option('general-favicon');
     if (empty($url)) {
         $url = get_template_directory_uri() . '/favicon.ico';
     }
     if (is_ssl()) {
         $url = str_replace('http://', 'https://', $url);
     }
     return $url;
 }
예제 #17
0
 /**
  * Init function
  *
  * Add metabox action and filters if
  *
  * @return void
  * @since  1.0
  * @author Emanuela Castorina <*****@*****.**>
  */
 public function init()
 {
     if (!defined('YIT') || function_exists('yit_get_option') && yit_get_option('seo-active') == 'no') {
         return false;
     }
     add_action('admin_init', array($this, 'add_metabox'));
     $this->add_layout_panel();
     //add_action( 'after_setup_theme', array( $this, 'add_layout_panel') );
     add_filter('wp_title', array($this, 'get_seo_title'), 11, 2);
     add_filter('yit_og_description', array($this, 'get_og_description'), 11, 2);
     add_action('wp_head', array($this, 'add_seo'), 1);
 }
예제 #18
0
파일: Textarea.php 프로젝트: zgomotos/Bazar
    /**
     * Load and print the correspondent field type.
     * 
     * @param @field
     * @return string
     */
    public static function display($value, $dep)
    {
        ob_start();
        ?>
			<div id="<?php 
        echo $value['id_container'];
        ?>
" <?php 
        if ($dep) {
            ?>
data-field="<?php 
            echo $dep['field'];
            ?>
" data-dep="<?php 
            echo $dep['dep'];
            ?>
" data-value="<?php 
            echo $dep['value'];
            ?>
" <?php 
        }
        ?>
class="yit_options rm_option rm_input rm_text">
                <div class="option">
                <label for="<?php 
        echo $value['id'];
        ?>
"><?php 
        echo $value['name'];
        ?>
</label>
                <textarea name="<?php 
        yit_field_name($value['id']);
        ?>
" id="<?php 
        echo $value['id'];
        ?>
" cols="" rows=""><?php 
        echo yit_get_option($value['id']);
        ?>
</textarea>
                </div>
                <div class="description">
				<?php 
        echo $value['desc'];
        ?>
                </div>
                <div class="clear"></div>
            </div>
        <?php 
        return ob_get_clean();
    }
예제 #19
0
        function widget($args, $instance)
        {
            extract($args);
            echo $before_widget;
            $search_type = yit_get_option('search_type');
            if (!is_shop_installed() && $search_type == 'product') {
                $search_type = 'post';
            }
            ?>

        <a href="#" class="search_mini_button"></a>
        <div class="search_mini_content">
            <span class="dropdown_arrow"></span>

            <?php 
            if (defined('YITH_WCAS')) {
                ?>
                <?php 
                echo do_shortcode('[yith_woocommerce_ajax_search]');
                ?>
            <?php 
            } else {
                ?>
                <form action="<?php 
                echo home_url('/');
                ?>
" method="get" class="search_mini">
                    <input type="text" name="s" id="search_mini" value="<?php 
                the_search_query();
                ?>
" placeholder="<?php 
                if (is_shop_installed()) {
                    _e('search for products', 'yit');
                } else {
                    _e('search for...', 'yit');
                }
                ?>
" /><input type="submit" value="" id="mini-search-submit" />
                    <input type="hidden" name="post_type" value="<?php 
                echo $search_type;
                ?>
" />
                </form>
            <?php 
            }
            ?>
        </div>
<?php 
            echo $after_widget;
        }
예제 #20
0
 /**
  * Add Setting SubPage
  *
  * add Setting SubPage to wordpress administrator
  *
  * @return array validate input fields
  * @since    1.0
  * @author   Emanuela Castorina <*****@*****.**>
  */
 public function add_setting_page()
 {
     global $admin_page_hooks;
     $logo = YIT_CORE_PLUGIN_URL . '/assets/images/yithemes-icon.png';
     $admin_logo = function_exists('yit_get_option') ? yit_get_option('admin-logo-menu') : '';
     if (isset($admin_logo) && !empty($admin_logo) && $admin_logo != '' && $admin_logo) {
         $logo = $admin_logo;
     }
     if (!isset($admin_page_hooks['yit_plugin_panel'])) {
         $position = apply_filters('yit_plugins_menu_item_position', '62.32');
         add_menu_page('yit_plugin_panel', __('YIT Plugins', 'yith-plugin-fw'), 'nosuchcapability', 'yit_plugin_panel', NULL, $logo, $position);
     }
     add_submenu_page('yit_plugin_panel', $this->settings['label'], $this->settings['label'], 'manage_options', $this->settings['page'], array($this, 'yit_panel'));
     remove_submenu_page('yit_plugin_panel', 'yit_plugin_panel');
 }
예제 #21
0
	/**
	 * widget function.
	 *
	 * @see WP_Widget
	 * @access public
	 * @param array $args
	 * @param array $instance
	 * @return void
	 */
	function widget( $args, $instance ) {
		global $woocommerce;

		extract( $args );

        $active = (bool) !( empty( $_REQUEST['add-to-cart'] ) || ! is_numeric( $_REQUEST['add-to-cart'] ) );

        /* fix yith catalog mode */
        $ywctm_hide_cart_page = false;
        global $YITH_WC_Catalog_Mode;
        if ( isset( $YITH_WC_Catalog_Mode ) ) {
            $ywctm_hide_cart_page = method_exists( $YITH_WC_Catalog_Mode, 'check_hide_cart_checkout_pages' ) && $YITH_WC_Catalog_Mode->check_hide_cart_checkout_pages();
        }

        if( !is_shop_installed() || yit_get_option('shop-enable' ) == 'no' || ! function_exists('yit_get_current_cart_info') || $ywctm_hide_cart_page) return;
        ?>
        <div class="yit_cart_widget widget_shopping_cart">
    		<div class="cart_label">
                <?php list( $cart_items, $cart_icon, $cart_icon_dark ) = yit_get_current_cart_info(); ?>
                <a href="<?php echo WC()->cart->get_cart_url(); ?>" class="cart-items" >
                    <span class="yit-mini-cart-icon" >
                        <span class="cart-items-number"><?php echo $cart_items ?></span>
                    </span>
                    <span class="yit-mini-cart-background no-dark" style="background-image: url(<?php echo $cart_icon ?>)"></span>
                    <span class="yit-mini-cart-background only-dark" style="background-image: url(<?php echo $cart_icon_dark ?>)"></span>
                </a>
            </div>

            <div class="cart_wrapper <?php echo $active ? ' active' : ''; ?>" style="display:<?php echo $active ? 'block' : 'none'; ?>">

                <div class="widget_shopping_cart_content group">
                    <?php if ( $active ) : ?>
                        <div class="blockUI blockOverlay" style="z-index: 1000; border: none; margin: 0px; padding: 0px; width: 100%; height: 100%; top: 0px; left: 0px; cursor: none; position: absolute; opacity: 1; background: url(<?php echo YIT_THEME_ASSETS_URL ?>/images/search.gif) 50% 50% no-repeat rgb(255, 255, 255);"></div>
                        <div class="blockUI blockMsg blockElement" style="z-index: 1011; display: none; position: absolute; left: 129px; top: 239px;"></div>

                    <?php else : ?>
                        <ul class="cart_list product_list_widget">
                            <li class="empty"><?php _e( 'No products in the cart.', 'yit' ); ?></li>
                        </ul>

                    <?php endif; ?>
                </div>

            </div>
        </div>
		<?php
	}
예제 #22
0
    /**
     * Load and print the correspondent field type.
     *
     * @param @field
     * @return string
     */
    public static function display($value, $dep)
    {
        $editor_args = array('wpautop' => false, 'media_buttons' => true, 'textarea_name' => yit_get_field_name($value['id']), 'textarea_rows' => 30, 'tabindex' => '', 'editor_css' => '', 'editor_class' => '', 'teeny' => false, 'tinymce' => true, 'quicktags' => true);
        ob_start();
        ?>
			<div id="<?php 
        echo $value['id_container'];
        ?>
" <?php 
        if ($dep) {
            ?>
data-field="<?php 
            echo $dep['field'];
            ?>
" data-dep="<?php 
            echo $dep['dep'];
            ?>
" data-value="<?php 
            echo $dep['value'];
            ?>
" <?php 
        }
        ?>
class="yit_options rm_textareaeditor rm_option rm_input rm_text">
                <div class="option">
                <label for="<?php 
        echo $value['id'];
        ?>
"><?php 
        echo $value['name'];
        ?>
</label>
                <?php 
        wp_editor(yit_get_option($value['id']), $value['id'], $editor_args);
        ?>
                </div>
                <div class="description">
				<?php 
        echo $value['desc'];
        ?>
                </div>
                <div class="clear"></div>
            </div>
        <?php 
        return ob_get_clean();
    }
예제 #23
0
        function widget($args, $instance)
        {
            extract($args);
            echo $before_widget;
            $search_for_product = apply_filters('yit_search_for_prod_label', __('search for products', 'yit'));
            $search_for = apply_filters('yit_searc_for_prod_label', __('search for...', 'yit'));
            $placeholder = is_shop_installed() ? $search_for_product : $search_for;
            if (defined('YITH_WCAS')) {
                ?>
            <?php 
                echo do_shortcode('[yith_woocommerce_ajax_search]');
                ?>
        <?php 
            } else {
                $search_type = yit_get_option('search_type');
                if (!is_shop_installed() && $search_type == 'product') {
                    $search_type = 'post';
                }
                ?>


        <form action="<?php 
                echo home_url('/');
                ?>
" method="get" class="search_mini">
            <input type="text" name="s" id="search_mini" value="<?php 
                the_search_query();
                ?>
" placeholder="<?php 
                echo $placeholder;
                ?>
" />
            <input type="hidden" name="post_type" value="<?php 
                echo $search_type;
                ?>
" />
            <input type="submit" value="<?php 
                _e('Search', 'yit');
                ?>
" id="mini-search-submit" />
        </form>

        <?php 
            }
            echo $after_widget;
        }
예제 #24
0
	/**
	 * Load and print the correspondent field type.
	 * 
	 * @param @field
	 * @return string
	 */
	public static function display( $value, $dep ) {

        $option_value  = yit_get_option( $value['id'] );
        $width  = 160;
        $height = 160;
        $crop   = '';

        if ( is_array( $option_value ) ) {
            if ( isset( $option_value['width'] ) ) {
                $width = $option_value['width'];
            }
            if ( isset( $option_value['height'] ) ) {
                $height = $option_value['height'];
            }
            if ( isset( $option_value['crop'] ) ) {
                if( $option_value['crop'] == '1' || $option_value['crop']==true ) {
                    $crop   = 'value="1" checked';
                }
            }
        }

		ob_start(); ?>
			<div id="<?php echo $value['id_container'] ?>" <?php if($dep): ?>data-field="<?php echo $dep['field'] ?>" data-dep="<?php echo $dep['dep'] ?>" data-value="<?php echo $dep['value'] ?>" <?php endif ?>class="yit_options rm_option rm_image_size">
                <div class="option">
                    <label for="<?php echo $value['id'] ?>"><?php echo $value['name'] ?></label>
                    <input name="<?php yit_field_name( $value['id'] ); ?>[width]" id="<?php yit_field_name( $value['id'] ); ?>-width" type="text" size="3"
                           value="<?php echo $width; ?>" /> &times;
                    <input name="<?php yit_field_name( $value['id'] ); ?>[height]" id="<?php yit_field_name( $value['id'] ); ?>-height" type="text" size="3"
                           value="<?php echo $height; ?>" />px

                    <input name="<?php  yit_field_name( $value['id'] ); ?>[crop]" id="<?php  yit_field_name( $value['id'] ); ?>-crop" type="checkbox"
                            <?php echo $crop; ?> /> <?php _e( 'Hard Crop?', 'yit' ); ?>

                </div>
                <div class="description">
                    <?php echo $value['desc'] ?>
                </div>
                <div class="clear"></div>
            </div>
        <?php
		return ob_get_clean();
	}
 function yit_add_custom_styles()
 {
     if (yit_get_option('responsive-enabled')) {
         yit_enqueue_style(9994, 'responsive', YIT_CORE_ASSETS_URL . '/css/responsive.css', array(), '1.0.0', 'all');
         yit_enqueue_style(9995, 'max-width-1024', get_template_directory_uri() . '/css/max-width-1024.css', array(), '1.0.0', 'screen and (max-width: 1240px)', true);
         yit_enqueue_style(9996, 'max-width-768', get_template_directory_uri() . '/css/max-width-768.css', array('max-width-1024'), '1.0.0', 'screen and (max-width: 987px)', true);
         yit_enqueue_style(9996, 'max-width-480', get_template_directory_uri() . '/css/max-width-480.css', array('max-width-768'), '1.0.0', 'screen and (max-width: 480px)', true);
         yit_enqueue_style(9996, 'max-width-320', get_template_directory_uri() . '/css/max-width-320.css', array('max-width-480'), '1.0.0', 'screen and (max-width: 320px)', true);
     }
     global $wpdb;
     $cache_file = '/custom.css';
     if ($wpdb->blogid != 0) {
         $cache_file = str_replace('.css', '-' . $wpdb->blogid . '.css', $cache_file);
     }
     if (file_exists(YIT_CACHE_DIR . $cache_file)) {
         yit_enqueue_style(9999, 'cache-custom', YIT_CACHE_URL . $cache_file, array(), false, 'all', true);
     }
     $custom_css = locate_template('custom.css');
     $custom_css = str_replace(array(get_stylesheet_directory(), get_template_directory()), array(get_stylesheet_directory_uri(), get_template_directory_uri()), $custom_css);
     yit_enqueue_style(99999, 'custom', $custom_css, array(), false, 'all', true);
 }
예제 #26
0
	/**
	 * Load and print the correspondent field type.
	 * 
	 * @param @field
	 * @return string
	 */
	public static function display( $value, $dep ) {
		$config = YIT_Config::load();
		
		$area = isset($value['area']) ? $value['area'] : 'body';
		
		$bg = yit_get_option( $value['id'] );
		
		ob_start(); ?>
			<div id="<?php echo $value['id_container'] ?>" <?php if($dep): ?>data-field="<?php echo $dep['field'] ?>" data-dep="<?php echo $dep['dep'] ?>" data-value="<?php echo $dep['value'] ?>" <?php endif ?>class="yit_options rm_option rm_input rm_select rm_bg-preview">
                <div class="option">
	                <label for="<?php echo $value['id'] ?>"><?php echo $value['name'] ?></label>
	                
	                <div class="select_wrapper" style="margin-right: 30px">
	                    <select name="<?php yit_field_name( $value['id'] ); ?>[image]" id="<?php echo $value['id'] ?>_image">
                            <option value=""><?php _e( 'Select a background', 'yit' ) ?></option>
	                        <?php foreach ( $config[ $area . '_backgrounds'] as $val => $option ): ?>
	                            <option value="<?php echo $val ?>"<?php selected( $bg['image'], $val ) ?>><?php echo $option; ?></option>
	                        
	                        <?php endforeach; ?>
	                    </select>
	                </div>

	                <div id="<?php echo $value['id'] ?>_color_container" class="colorpicker_container"><div style="background-color: <?php echo $bg['color'] ?>"></div></div>
    	            <input type="text" name="<?php yit_field_name( $value['id'] ) ?>[color]" id="<?php echo $value['id'] ?>_color" style="width:90px" value="<?php echo $bg['color'] ?>" />



	                <div class="clear"></div>
	                <div class="bg-preview" id="<?php echo $value['id'] ?>_preview"><div style="background: <?php echo $bg['color']; if($bg['image'] != 'custom'): ?> url('<?php echo $bg['image'] ?>') 50% 0<?php endif ?>"></div></div>

                </div>
                <div class="description">
				<?php echo $value['desc'] ?> <?php printf( __( '(Default: %s)', 'yit' ), ( !empty( $value['std']['image'] ) ? $value['std']['image'] . ', ' : '' ) . $value['std']['color'] ) ?>
                </div>
                <div class="clear"></div>
            </div>
        <?php
		return ob_get_clean();
	}
예제 #27
0
        ?>
                <?php 
    }
    ?>
            <?php 
} else {
    ?>
            <div class="footer-widgets-area with-<?php 
    echo yit_get_option('footer-layout');
    ?>
">
                <?php 
    dynamic_sidebar('Footer Widgets Area');
    ?>
            </div>
            
            <div class="footer-widgets-sidebar with-<?php 
    echo yit_get_option('footer-layout');
    ?>
">
                <?php 
    dynamic_sidebar('Footer Sidebar');
    ?>
            </div>
            <?php 
}
?>
        </div>
    </div>
</div>
<!-- END FOOTER -->
/**
 * woocommerce_show_product_images hook
 *
 * @hooked woocommerce_show_product_sale_flash - 10
 * @hooked woocommerce_show_product_images - 20
 */
do_action('woocommerce_before_single_product_summary');
?>

        <div class="summary entry-summary">

            <?php 
if (!is_shop_enabled() || !yit_get_option('shop-detail-show-price')) {
    remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_price', 25);
}
if (!is_shop_enabled() || !yit_get_option('shop-detail-add-to-cart')) {
    remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30);
}
remove_action('woocommerce_single_product_summary', '');
// add a separator after title and price
add_action('woocommerce_single_product_summary', create_function('', 'echo do_shortcode("[line]");'));
/**
 * woocommerce_single_product_summary hook
 *
 * @hooked woocommerce_template_single_title - 5
 * @hooked woocommerce_template_single_price - 10
 * @hooked woocommerce_template_single_excerpt - 20
 * @hooked woocommerce_template_single_add_to_cart - 30
 * @hooked woocommerce_template_single_meta - 40
 * @hooked woocommerce_template_single_sharing - 50
 */
예제 #29
0
파일: audio.php 프로젝트: simonsays88/costa
 * 
 * @package WordPress
 * @subpackage Your Inspiration Themes
 * @author Your Inspiration Themes Team <*****@*****.**>
 *
 * 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
 */

yit_get_template( 'blog/big-ribbon/post-formats/standard.php' );

$span = yit_get_sidebar_layout() == 'sidebar-no' ? yit_get_option( 'blog-show-date' ) || yit_get_option( 'blog-show-comments' ) ? 11 : 12 : 8;

if( is_single() || yit_get_option( 'blog-post-formats-list' ) ) : ?>
<div class="soundcloud-frame span<?php echo $span ?>">
    <?php
    $url = yit_get_post_meta( get_the_ID(), '_format_audio' );
    $iframe = ( bool ) yit_get_post_meta( get_the_ID(), '_format_audio_iframe' );
    $show_artwork = ( bool ) yit_get_post_meta( get_the_ID(), '_format_audio_artwork' );
    $show_comments = ( bool ) yit_get_post_meta( get_the_ID(), '_format_audio_comments' );
    $auto_play = ( bool ) yit_get_post_meta( get_the_ID(), '_format_audio_autoplay' );
    $color = yit_get_post_meta( get_the_ID(), '_format_audio_color' );
    
    echo do_shortcode( '[soundcloud iframe="' . $iframe . '" url="' . $url . '" show_artwork="' . $show_artwork . '" show_comments="' . $show_comments . '" auto_play="' . $auto_play . '" color="' . $color . '"]' );
    ?>
</div>

<div class="clear"></div>
<?php endif ?>
예제 #30
0
파일: gallery.php 프로젝트: zgomotos/Bazar
if (yit_get_option('blog-show-date')) {
    ?>
<p class="date"><?php 
    echo yit_get_icon('blog-date-icon', true);
    ?>
<span><?php 
    _e('Date:', 'yit');
    ?>
</span> <?php 
    echo get_the_date();
    ?>
</p><?php 
}
?>
            <?php 
if (yit_get_option('blog-show-comments')) {
    ?>
<p class="comments"><?php 
    echo yit_get_icon('blog-comments-icon', true);
    ?>
<span><?php 
    comments_popup_link(__('<span>Comments:</span> 0', 'yit'), __('<span>Comments:</span> 1', 'yit'), __('<span>Comments:</span> %', 'yit'));
    ?>
</span></p><?php 
}
?>
            
            <?php 
edit_post_link(__('Edit', 'yit'), '<p class="edit-link"><i class="icon-pencil"></i>', '</p>');
?>
        </div>