<?php

global $rd_data;
// Redefine rd_woocommerce_output_related_products()
function rd_woocommerce_output_related_products()
{
    $args = array(12, 1);
    woocommerce_related_products($args);
    // Display 12 products in rows of 1
}
if (get_option('woo_first_activation') == false) {
    add_option('woo_first_activation', 'hotcake', '', 'no');
}
if (rd_check_woo_status() == true && get_option('woo_first_activation') !== 'activated') {
    add_action('init', 'rd_woocommerce_defaults', 1);
}
/**
 * Define image sizes
 */
function rd_woocommerce_defaults()
{
    $catalog = array('width' => '535', 'height' => '696', 'crop' => 1);
    $single = array('width' => '535', 'height' => '950', 'crop' => 0);
    $thumbnail = array('width' => '165', 'height' => '165', 'crop' => 1);
    // Image sizes
    update_option('shop_catalog_image_size', $catalog);
    // Product category thumbs
    update_option('shop_single_image_size', $single);
    // Single product image
    update_option('shop_thumbnail_image_size', $thumbnail);
    // Image gallery thumbs
Exemple #2
0
        ?>
" class="search" id="ssform"   value="<?php 
        the_search_query();
        ?>
" />
          <input type="submit" id="searchsubmit" value="" />
          <span class="search_button_icon"></span>
        </form>
      </div>
      <div id="searchtop"> <a id="searchtop_img"><i class="fa fa-search"></i></a> </div>
      <?php 
    }
}
?>
      <?php 
if (rd_check_woo_status() == true && $rd_data['rd_header_cart'] == 'yes' && $nav_type !== 'nav_type_15' && $nav_type !== 'nav_type_16' && $nav_type !== 'nav_type_17' && $nav_type !== 'nav_type_18' && $nav_type !== 'nav_type_19' && $nav_type !== 'nav_type_19_f') {
    global $woocommerce;
    ?>
      <ul class="header_current_cart">
        <div class="current_item_number"><?php 
    echo sprintf(_n('%d', '%d', $woocommerce->cart->cart_contents_count, 'woothemes'), $woocommerce->cart->cart_contents_count);
    ?>
</div>
        <li><a class="cart-content" href="<?php 
    echo esc_url($woocommerce->cart->get_cart_url());
    ?>
"> </a>
          <div class="cart-notification"><span class="item-name"></span>&nbsp;<?php 
    echo __(' was successfully added to your cart.', 'thefoxwp');
    ?>
</div>
///////////////////////////////////////////////////////////////////////////////////////
//////                                                                           /////
/////                            ADD TWITTER CAROUSEL                           /////
////                                                                           /////
///////////////////////////////////////////////////////////////////////////////////
add_action('vc_before_init', 'rd_twitter_sc');
function rd_twitter_sc()
{
    vc_map(array("name" => __("Twitter Carousel", 'thefoxwp'), "base" => "twitter_sc", "icon" => get_template_directory_uri() . "/images/vc_icons/vc_twitter_carousel.png", "class" => "", "weight" => "57", "category" => __('Content', 'thefoxwp'), "params" => array(array("type" => "dropdown", "class" => "", "heading" => __("Carousel Style", 'thefoxwp'), "param_name" => "style", "value" => array("Style 1" => "", "Style 2" => "rd_tc_3", "Style 3" => "rd_tc_4", "Style 4" => "rd_tc_2", "Style 5" => "rd_tc_5"), "description" => __("Choose the Twitter Carousel Design", 'thefoxwp')), array("type" => "dropdown", "class" => "", "heading" => __("CSS Animation", 'thefoxwp'), "param_name" => "animation", 'value' => array(__("No", 'thefoxwp') => "", __("Fade In", 'thefoxwp') => "rda_fadeIn", __("Fade Top to Bottom", 'thefoxwp') => "rda_fadeInDown", __("Fade Bottom to Top", 'thefoxwp') => "rda_fadeInUp", __("Fade Left to Right", 'thefoxwp') => "rda_fadeInLeft", __("Fade Right to Left", 'thefoxwp') => "rda_fadeInRight", __("Bounce In", 'thefoxwp') => "rda_bounceIn", __("Bounce Top to Bottom", 'thefoxwp') => "rda_bounceInDown", __("Bounce Bottom to Top", 'thefoxwp') => "rda_bounceInUp", __("Bounce Left to Right", 'thefoxwp') => "rda_bounceInLeft", __("Bounce Right to Left", 'thefoxwp') => "rda_bounceInRight", __("Zoom In", 'thefoxwp') => "rda_zoomIn", __("Flip Vertical", 'thefoxwp') => "rda_flipInX", __("Flip Horizontal", 'thefoxwp') => "rda_flipInY", __("Bounce", 'thefoxwp') => "rda_bounce", __("Flash", 'thefoxwp') => "rda_flash", __("Shake", 'thefoxwp') => "rda_shake", __("Pulse", 'thefoxwp') => "rda_pulse", __("Swing", 'thefoxwp') => "rda_swing", __("Rubber band", 'thefoxwp') => "rda_rubberBand", __("Wobble", 'thefoxwp') => "rda_wobble", __("Tada!", 'thefoxwp') => 'rda_tada'), "description" => __("Select type of animation if you want this element to be animated when it enters into the browsers viewport. Note: Works only in modern browsers.", 'thefoxwp')), array("type" => "dropdown", "class" => "", "heading" => __("Auto Rotate?", 'thefoxwp'), "param_name" => "scroll", 'value' => array(__("No", 'thefoxwp') => "", __("Yes", 'thefoxwp') => "yes"), "description" => __("Select if you want the carousel to rotate automatically.", 'thefoxwp')), array("type" => "textfield", "class" => "", "heading" => __("Rotation speed", 'thefoxwp'), "param_name" => "speed", "value" => "800", "description" => __("Select the rotation speed, example 200 for super fast, 1500 for slow", 'thefoxwp'), 'dependency' => array('element' => 'scroll', 'value' => array('yes'))), array("type" => "textfield", "class" => "", "heading" => __("Twitter id", 'thefoxwp'), "param_name" => "twitter_id", "value" => __("your_id", 'thefoxwp'), "description" => __("Enter a valid Twitter id", 'thefoxwp')), array("type" => "textfield", "class" => "", "heading" => __("Twitter id", 'thefoxwp'), "param_name" => "heading", "value" => __("My Latest Tweet", 'thefoxwp'), "description" => __("Enter an heading for the carousel", 'thefoxwp'), 'dependency' => array('element' => 'style', 'value' => array('rd_tc_2'))), array("type" => "textfield", "class" => "", "heading" => __("Number of Tweet to load", 'thefoxwp'), "param_name" => "count", "value" => __("5", 'thefoxwp'), "description" => __("Number of tweet to load for the carousel", 'thefoxwp')), array("type" => "colorpicker", "class" => "", "heading" => __("Heading color", 'thefoxwp'), "param_name" => "heading_color", "value" => '', "description" => __("Choose heading color (optional)", 'thefoxwp')), array("type" => "colorpicker", "class" => "", "heading" => __("Text color", 'thefoxwp'), "param_name" => "text_color", "value" => '', "description" => __("Choose text color (optional)", 'thefoxwp')), array("type" => "colorpicker", "class" => "", "heading" => __("Highlight color", 'thefoxwp'), "param_name" => "hl_color", "value" => '', "description" => __("Choose high light color (optional)", 'thefoxwp')), array("type" => "colorpicker", "class" => "", "heading" => __("Hover color", 'thefoxwp'), "param_name" => "hover_color", "value" => '', "description" => __("Choose hover color (optional)", 'thefoxwp')), array("type" => "colorpicker", "class" => "", "heading" => __("Border color", 'thefoxwp'), "param_name" => "border_color", "value" => '', "description" => __("Choose Border color", 'thefoxwp'), 'dependency' => array('element' => 'style', 'value' => array('rd_tc_5'))))));
}
///////////////////////////////////////////////////////////////////////////////////////
//////                                                                           /////
/////                            ADD WOOCOMMERCE                                /////
////                                                                           /////
///////////////////////////////////////////////////////////////////////////////////
if (rd_check_woo_status() == true) {
    add_action('vc_before_init', 'rd_woo_sc');
    function rd_woo_sc()
    {
        vc_map(array("name" => __("Woocommerce product", 'thefoxwp'), "base" => "wooc_module", "icon" => get_template_directory_uri() . "/images/vc_icons/vc_woo_product.png", "class" => "", "category" => __('Content', 'thefoxwp'), "params" => array(array("type" => "textfield", "class" => "", "heading" => __("Posts per line", 'thefoxwp'), "param_name" => "per_line", "value" => __("3", 'thefoxwp'), "description" => __("Number of post per line.", 'thefoxwp')), array("type" => "textfield", "class" => "", "heading" => __("Number of Products to load", 'thefoxwp'), "param_name" => "to_show", "value" => __("5", 'thefoxwp'), "description" => __("Number of post to load", 'thefoxwp')), array("type" => "dropdown", "class" => "", "heading" => __("Product type", 'thefoxwp'), "param_name" => "pro_type", "value" => array("Recent products" => "recent", "Featured Products" => 'featured'), "description" => __("Choose the type of product to show", 'thefoxwp')))));
    }
}
///////////////////////////////////////////////////////////////////////////////////////
//////                                                                           /////
/////                            ADD STAFF SHORTCODES                           /////
////                                                                           /////
///////////////////////////////////////////////////////////////////////////////////
add_action('vc_before_init', 'rd_staff_carousel_sc');
function rd_staff_carousel_sc()
{
    $args_staff = array('taxonomy' => 'staffgroups', 'hide_empty' => '0');
">
  <p>
    <?php 
    bloginfo('name');
    ?>
  </p>
  </a></div>
<?php 
}
?>

                
<div id="nav_button_alt"></div>
    </div>          
 <?php 
if (rd_check_woo_status() == true && $rd_data['rd_header_cart'] == 'yes') {
    global $woocommerce;
    ?>
 
<ul class="header_current_cart">
<div class="current_item_number"><?php 
    echo sprintf(_n('%d item', '%d items', $woocommerce->cart->cart_contents_count, 'woothemes'), $woocommerce->cart->cart_contents_count);
    ?>
</div><li><a class="cart-content" href="<?php 
    echo esc_url($woocommerce->cart->get_cart_url());
    ?>
">
</a>
<ul class="header_cart_dropdown cdp_2">
<div class="widget_shopping_cart_content"></div>
</ul>
function rd_scripts()
{
    global $rd_data;
    if (!is_admin()) {
        wp_enqueue_script('jquery');
        wp_enqueue_script('customjs', RD_DIRECTORY . '/js/customjs.js', array('jquery'), false, true);
        wp_enqueue_script('rd_woocommerce', RD_DIRECTORY . '/js/custom_woo_js.js', array('jquery'), false, true);
        wp_localize_script('customjs', 'zilla_likes', array('ajaxurl' => admin_url('admin-ajax.php')));
        if ($rd_data['rd_smooth_scroll'] == true) {
            wp_enqueue_script('smoothscroll', RD_DIRECTORY . '/js/smoothscroll.js', array('jquery'), false, true);
        }
        if (rd_check_woo_status() == true) {
        }
        if (is_single()) {
            wp_enqueue_script('comment-reply', RD_DIRECTORY . '/js/comment-reply.js', array('jquery'), false, true);
        }
    }
}