コード例 #1
0
ファイル: theme-js.php プロジェクト: pedrofalc/mvpcearasteel
function colabs_manage_slider()
{
    if (('big_slider' == get_option('colabs_frontpage_style') || 'scroller' == get_option('colabs_frontpage_style')) && colabs_check_plugin_active('lensa-marketplace/lensa-marketplace.php') || !colabs_check_plugin_active('lensa-marketplace/lensa-marketplace.php')) {
        $sliderdata = array('slideshow' => intval(get_option('colabs_slideshow')), 'autoplay' => intval(get_option('colabs_autoplay')), 'stop_loop' => intval(get_option('colabs_stop_loop')), 'slide_interval' => intval(get_option('colabs_slide_interval')), 'transition' => intval(get_option('colabs_transition')), 'transition_speed' => intval(get_option('colabs_transition_speed')), 'pause_hover' => intval(get_option('colabs_pause_hover')), 'keyboard_nav' => intval(get_option('colabs_keyboard_nav')), 'performance' => intval(get_option('colabs_performance')), 'image_protect' => intval(get_option('colabs_image_protect')));
        echo '<script type="text/javascript">
		/* <![CDATA[ */
		var slider_config = ' . json_encode($sliderdata) . '
		/* ]]> */</script>';
    }
}
コード例 #2
0
 function the_widgets_init()
 {
     if (!function_exists('register_sidebars')) {
         return;
     }
     register_sidebar(array('name' => 'Sidebar', 'id' => 'colabs_right', 'description' => __('This widget will appear in right sidebar area', 'colabsthemes'), 'before_widget' => '<aside id="%1$s" class="%2$s block-background block-inner widget sidebar-right-background">', 'after_widget' => '</aside>', 'before_title' => '<h4 class="widget-title">', 'after_title' => '</h4>'));
     register_sidebar(array('name' => 'Sidebar Shop', 'id' => 'colabs_shop', 'description' => __('This widget will appear in shop sidebar area', 'colabsthemes'), 'before_widget' => '<aside id="%1$s" class="%2$s block-background block-inner widget sidebar-right-background">', 'after_widget' => '</aside>', 'before_title' => '<h4 class="widget-title">', 'after_title' => '</h4>'));
     if ('scroller' == get_option('colabs_frontpage_style') && colabs_check_plugin_active('lensa-marketplace/lensa-marketplace.php')) {
         register_sidebar(array('name' => 'Footer Widget', 'id' => 'footer-widget', 'description' => __('This widget will appear footer area', 'colabsthemes'), 'before_widget' => '<div id="%1$s" class="%2$s widget column col3">', 'after_widget' => '</div>', 'before_title' => '<h4 class="widget-title">', 'after_title' => '</h4>'));
     }
 }
コード例 #3
0
 function colabs_homepage_body_class($classes)
 {
     if (colabs_check_plugin_active('lensa-marketplace/lensa-marketplace.php')) {
         if ('classic' == get_option('colabs_frontpage_style')) {
             $classes[] = 'frontpage-classic-style';
         } elseif ('scroller' == get_option('colabs_frontpage_style')) {
             $classes[] = 'frontpage-scroller-style';
         } elseif ('gallery' == get_option('colabs_frontpage_style')) {
             $classes[] = 'frontpage-gallery-style';
         } else {
             $classes[] = 'frontpage-big-style';
         }
     } else {
         $classes[] = 'frontpage-big-style';
     }
     return apply_filters('colabs_homepage_body_class', $classes);
 }
コード例 #4
0
/**
 * Override template on WooCommerce Page
 */
function colabs_wc_template_loader($template)
{
    global $post;
    if (colabs_check_plugin_active('woocommerce/woocommerce.php')) {
        $myaccount_page_id = wc_get_page_id('myaccount');
        // My Account Page
        if ($post->ID == $myaccount_page_id) {
            $template = locate_template(array('woocommerce/page-myaccount.php'));
        } else {
            if (is_cart()) {
                $template = locate_template(array('woocommerce/page-cart.php'));
            } else {
                if (is_checkout()) {
                    $template = locate_template(array('woocommerce/page-checkout.php'));
                } else {
                    if (is_order_received_page()) {
                        $template = locate_template(array('woocommerce/page-thanks.php'));
                    }
                }
            }
        }
    }
    return $template;
}
コード例 #5
0
<?php

// Cart For WooCommerce
// -------------------------
if (colabs_check_plugin_active('woocommerce/woocommerce.php')) {
    global $woocommerce;
    ?>
    <div class="shopping-cart-wrapper">
    <?php 
    if (sizeof($woocommerce->cart->get_cart()) > 0) {
        echo '<h4 class="shopping-cart-title">' . __('Bag Summary', 'colabsthemes') . "\n";
        echo '<a href="' . $woocommerce->cart->get_cart_url() . '">' . __('Edit', 'colabsthemes') . '</a></h4>' . "\n";
        echo '<ul class="cart_list product_list_widget cart-product-list">';
        foreach ($woocommerce->cart->get_cart() as $cart_item_key => $cart_item) {
            $_product = $cart_item['data'];
            if ($_product->exists() && $cart_item['quantity'] > 0) {
                echo '<li class="cart-product">' . "\n";
                echo $_product->get_image(array(37, 37));
                echo '<div class="product_list_widget_content">' . "\n";
                echo '<a href="' . get_permalink($cart_item['product_id']) . '">' . "\n";
                echo apply_filters('woocommerce_cart_widget_product_title', $_product->get_title(), $_product) . '</a>';
                echo '<span class="amount">' . woocommerce_price($_product->get_price()) . '</span>' . "\n";
                echo '<dl class="variations">' . "\n";
                echo '<dt>' . __('Quantity', 'colabsthemes') . ':</dt><dd>' . $cart_item['quantity'] . '</dd>' . "\n";
                echo '</dl>' . "\n";
                echo '</li>' . "\n";
            }
        }
        if (sizeof($woocommerce->cart->get_cart()) > 0) {
            echo '<li class="total">' . "\n";
            echo '<div class="total-block">' . "\n";
コード例 #6
0
function colabs_add_slideshow_to_head()
{
    if (colabs_check_plugin_active('lensa-marketplace/lensa-marketplace.php')) {
        if ('big_slider' == get_option('colabs_frontpage_style') || 'scroller' == get_option('colabs_frontpage_style')) {
            if (is_home()) {
                colabs_background_slideshow();
            } else {
                if (!is_home() && get_option('colabs_background_slider') != 'true') {
                    colabs_background_slideshow();
                }
            }
        }
    } else {
        if (is_home()) {
            colabs_background_slideshow();
        } else {
            if (!is_home() && get_option('colabs_background_slider') != 'true') {
                colabs_background_slideshow();
            }
        }
    }
}
コード例 #7
0
ファイル: footer.php プロジェクト: pedrofalc/mvpcearasteel
<?php

if ('big_slider' == get_option('colabs_frontpage_style') && colabs_check_plugin_active('lensa-marketplace/lensa-marketplace.php') || !colabs_check_plugin_active('lensa-marketplace/lensa-marketplace.php')) {
    ?>
<!-- Progress bar for supersized -->
<div class="progress-wrapper">
  <div class="progress-bar"></div>
</div>
<?php 
}
?>

<footer class="footer-section container">
  <div class="row">
    <?php 
colabs_social_net("social-links");
?>
    <div class="copyrights"><?php 
colabs_credit();
?>
</div>
  </div>
</footer><!-- .footer-section -->

</div>

<?php 
wp_footer();
?>
</body>
</html>
コード例 #8
0
ファイル: functions.php プロジェクト: pedrofalc/mvpcearasteel
            $image_classes = apply_filters('jigoshop_product_image_classes', array(), $_product);
            array_unshift($image_classes, 'zoom');
            $image_classes = implode(' ', $image_classes);
            echo '<a href="' . wp_get_attachment_url($thumb_id) . '" class="' . $image_classes . '" rel="thumbnails">';
            the_post_thumbnail($large_thumbnail_size);
            echo '</a>';
        } else {
            echo jigoshop_get_image_placeholder('shop_large');
        }
        do_action('jigoshop_product_thumbnails');
        echo '</div>';
    }
}
if (is_admin()) {
    include_once ABSPATH . 'wp-admin/includes/plugin.php';
    if (colabs_check_plugin_active('jigoshop/jigoshop.php')) {
        $data = array();
        foreach (get_option('jigoshop_options') as $k => $v) {
            if ('jigoshop_shop_small_w' == $k || 'jigoshop_shop_small_h' == $k) {
                $data[$k] = '200';
            } elseif ('jigoshop_catalog_columns' == $k) {
                $data[$k] = '4';
            } elseif ('jigoshop_use_wordpress_catalog_crop' == $k) {
                $data[$k] = 'yes';
            } else {
                $data[$k] = $v;
            }
        }
        update_option('jigoshop_options', $data);
        update_option('jigoshop_catalog_columns', '4');
        update_option('jigoshop_use_wordpress_catalog_crop', 'yes');