function cruxstore_register_sidebars() { register_sidebar(array('name' => esc_html__('Primary Widget Area', 'cruxstore'), 'id' => 'primary-widget-area', 'description' => esc_html__('The primary widget area', 'cruxstore'), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3 class="widget-title"><span>', 'after_title' => '</span></h3>')); register_sidebar(array('name' => esc_html__('Shop Widget Area', 'cruxstore'), 'id' => 'shop-widget-area', 'description' => esc_html__('The shop widget area', 'cruxstore'), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3 class="widget-title"><span>', 'after_title' => '</span></h3>')); register_sidebar(array('name' => esc_html__('Shop filter Area', 'cruxstore'), 'id' => 'shop-filter-area', 'description' => esc_html__('The shop filter area', 'cruxstore'), 'before_widget' => '<div id="%1$s" class="widget col-lg-3 col-md-3 %2$s"><div class="widget-content">', 'after_widget' => '</div></div>', 'before_title' => '<h3 class="widget-title"><span>', 'after_title' => '</span></h3>')); register_sidebar(array('name' => esc_html__('Blog Widget Area', 'cruxstore'), 'id' => 'blog-widget-area', 'description' => esc_html__('The blog widget area', 'cruxstore'), 'before_widget' => '<section id="%1$s" class="widget %2$s">', 'after_widget' => '</section>', 'before_title' => '<h3 class="widget-title"><span>', 'after_title' => '</span></h3>')); $count = 5; for ($i = 1; $i <= $count; $i++) { register_sidebar(array('name' => sprintf(esc_html__('Sidebar %s', 'cruxstore'), $i), 'id' => 'sidebar-column-' . $i, 'description' => sprintf(esc_html__('The sidebar column %s widget area', 'cruxstore'), $i), 'before_widget' => '<section class="widget %2$s">', 'after_widget' => '</section>', 'before_title' => '<h3 class="widget-title"><span>', 'after_title' => '</span></h3>')); } register_sidebar(array('name' => esc_html__('Footer top', 'cruxstore'), 'id' => 'footer-top', 'description' => esc_html__('The footer top widget area', 'cruxstore'), 'before_widget' => '<section id="%1$s" class="widget %2$s">', 'after_widget' => '</section>', 'before_title' => '<h4 class="widget-title"><span>', 'after_title' => '</span></h4>')); register_sidebar(array('name' => esc_html__('Instagram Footer', 'cruxstore'), 'id' => 'instagram-footer', 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3 class="widget-title"><span>', 'after_title' => '</span></h3>', 'description' => esc_html__('Use the Instagram widget here. IMPORTANT: For best result select "Small" under "Photo Size" and set number of photos to 5.', 'cruxstore'))); $count = 4; for ($i = 1; $i <= $count; $i++) { register_sidebar(array('name' => sprintf(esc_html__('Footer column %s', 'cruxstore'), $i), 'id' => 'footer-column-' . $i, 'description' => sprintf(esc_html__('The footer column %s widget area', 'cruxstore'), $i), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3 class="widget-title"><span>', 'after_title' => '</span></h3>')); } register_sidebar(array('name' => esc_html__('Footer bottom column 1', 'cruxstore'), 'id' => 'footer-bottom-1', 'description' => esc_html__('The footer bottom widget area', 'cruxstore'), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3 class="widget-title"><span>', 'after_title' => '</span></h3>')); register_sidebar(array('name' => esc_html__('Footer bottom column 2', 'cruxstore'), 'id' => 'footer-bottom-2', 'description' => esc_html__('The footer bottom widget area', 'cruxstore'), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3 class="widget-title"><span>', 'after_title' => '</span></h3>')); register_sidebar(array('name' => esc_html__('Footer bottom column 3', 'cruxstore'), 'id' => 'footer-bottom-3', 'description' => esc_html__('The footer bottom widget area', 'cruxstore'), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3 class="widget-title"><span>', 'after_title' => '</span></h3>')); $sidebars = cruxstore_option('custom_sidebars'); if (!empty($sidebars) && is_array($sidebars)) { foreach ($sidebars as $sidebar) { $sidebar = wp_parse_args($sidebar, array('title' => '', 'description' => '')); if ($sidebar['title'] != '') { $id = sanitize_title($sidebar['title']); register_sidebar(array('name' => $sidebar['title'], 'id' => $id, 'description' => $sidebar['description'], 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3 class="widget-title"><span>', 'after_title' => '</span></h3>')); } } } }
<?php $social = cruxstore_option('header_socials', 'facebook,twitter,instagram,linkedin'); $socials_arr = array('facebook' => array('title' => esc_html__('Facebook', 'cruxstore'), 'icon' => 'fa fa-facebook', 'link' => '%s'), 'twitter' => array('title' => esc_html__('Twitter', 'cruxstore'), 'icon' => 'fa fa-twitter', 'link' => 'http://www.twitter.com/%s'), 'dribbble' => array('title' => esc_html__('Dribbble', 'cruxstore'), 'icon' => 'fa fa-dribbble', 'link' => 'http://www.dribbble.com/%s'), 'vimeo' => array('title' => esc_html__('Vimeo', 'cruxstore'), 'icon' => 'fa fa-vimeo-square', 'link' => 'http://www.vimeo.com/%s'), 'tumblr' => array('title' => esc_html__('Tumblr', 'cruxstore'), 'icon' => 'fa fa-tumblr', 'link' => 'http://%s.tumblr.com/'), 'skype' => array('title' => esc_html__('Skype', 'cruxstore'), 'icon' => 'fa fa-skype', 'link' => 'skype:%s'), 'linkedin' => array('title' => esc_html__('LinkedIn', 'cruxstore'), 'icon' => 'fa fa-linkedin', 'link' => '%s'), 'googleplus' => array('title' => esc_html__('Google Plus', 'cruxstore'), 'icon' => 'fa fa-google-plus', 'link' => '%s'), 'youtube' => array('title' => esc_html__('Youtube', 'cruxstore'), 'icon' => 'fa fa-youtube', 'link' => 'http://www.youtube.com/user/%s'), 'pinterest' => array('title' => esc_html__('Pinterest', 'cruxstore'), 'icon' => 'fa fa-pinterest', 'link' => 'http://www.pinterest.com/%s'), 'instagram' => array('title' => esc_html__('Instagram', 'cruxstore'), 'icon' => 'fa fa-instagram', 'link' => 'http://instagram.com/%s')); foreach ($socials_arr as $k => &$v) { $val = cruxstore_option($k); $v['val'] = $val ? $val : ''; } $social_icons = ''; if ($social) { $social_type = explode(',', $social); foreach ($social_type as $id) { $val = $socials_arr[$id]; $social_text = '<i class="' . esc_attr($val['icon']) . '"></i>'; if ($val['val']) { $social_icons .= '<li><a class="' . esc_attr($id) . '" title="' . esc_attr($val['title']) . '" href="' . esc_url(str_replace('%s', $val['val'], $val['link'])) . '" target="_blank">' . $social_text . '</a></li>'; } } } else { foreach ($socials_arr as $key => $val) { $social_text = '<i class="' . esc_attr($val['icon']) . '"></i>'; if ($val['val']) { $social_icons .= '<li><a class="' . esc_attr($key) . '" title="' . esc_attr($val['title']) . '" href="' . esc_url(str_replace('%s', $val['val'], $val['link'])) . '" target="_blank">' . $social_text . '</a></li>'; } } } printf('<ul id="main-nav-socials">%s</ul><!-- #main-nav-socials -->', $social_icons);
* be bumped and the readme will list any important changes. * * @see http://docs.woothemes.com/document/template-structure/ * @author WooThemes * @package WooCommerce/Templates * @version 2.0.0 */ if (!defined('ABSPATH')) { exit; // Exit if accessed directly } global $wp_query; if (!woocommerce_products_will_display()) { return; } $products_per_page = cruxstore_option('products_per_page', 12); $paged = max(1, $wp_query->get('paged')); $per_page = $wp_query->get('posts_per_page'); $total = $wp_query->found_posts; $first = $per_page * $paged - $per_page + 1; $last = min($total, $wp_query->get('posts_per_page') * $paged); ?> <p class="woocommerce-result-count"> <?php if (1 === $total) { _e('Showing the single result', 'woocommerce'); } elseif ($total <= $per_page || -1 === $per_page) { printf(esc_html__('Showing all %d results', 'woocommerce'), $total); } else { printf(_x('Showing %1$d–%2$d of %3$d results', '%1$d = first, %2$d = last, %3$d = total', 'woocommerce'), $first, $last, $total); }
function cruxstore_template_loop_product_actions() { echo "<div class='product-actions'>"; if (!cruxstore_option('catalog_mode', 0)) { if (class_exists('YITH_WCWL_UI')) { echo do_shortcode('[yith_wcwl_add_to_wishlist]'); } if (defined('YITH_WOOCOMPARE')) { printf('<div data-toggle="tooltip" title="%s" >%s</div>', esc_html__('Compare', 'cruxstore'), do_shortcode('[yith_compare_button container="no" type="link"] [/yith_compare_button]')); } } if (cruxstore_option('loop_shop_quickview', 1)) { printf('<div data-toggle="tooltip" data-placement="top" title="' . esc_html__('Quick View', 'cruxstore') . '"><a href="#" class="product-quick-view" data-id="%s">%s</a></div>', get_the_ID(), '<i class="fa fa-search"></i>'); } if (!cruxstore_option('catalog_mode', 0)) { woocommerce_template_loop_add_to_cart(); } echo "</div>"; }
<?php /** * Single variation cart button * * @see http://docs.woothemes.com/document/template-structure/ * @author WooThemes * @package WooCommerce/Templates * @version 2.5.0 */ if (!defined('ABSPATH')) { exit; } if (cruxstore_option('catalog_mode', 0)) { return; } global $product; ?> <div class="woocommerce-variation-add-to-cart variations_button"> <?php if (!$product->is_sold_individually()) { ?> <?php woocommerce_quantity_input(array('input_value' => isset($_POST['quantity']) ? wc_stock_amount($_POST['quantity']) : 1)); ?> <?php } ?> <button type="submit" class="single_add_to_cart_button btn btn-addtocart"><i class="icon_bag_alt"></i><?php echo esc_html($product->single_add_to_cart_text()); ?>
* This template can be overridden by copying it to yourtheme/woocommerce/loop/no-products-found.php. * * HOWEVER, on occasion WooCommerce will need to update template files and you (the theme developer). * will need to copy the new files to your theme to maintain compatibility. We try to do this. * as little as possible, but it does happen. When this occurs the version of the template file will. * be bumped and the readme will list any important changes. * * @see http://docs.woothemes.com/document/template-structure/ * @author WooThemes * @package WooCommerce/Templates * @version 2.0.0 */ if (!defined('ABSPATH')) { exit; // Exit if accessed directly } $filters = cruxstore_option('shop_header_filters', 1); if ($filters) { echo '<div id="cruxstore-shop-filters" class="row multi-columns-row"><div id="cruxstore-shop-filters-content">'; dynamic_sidebar('shop-filter-area'); echo '</div></div>'; } ?> <p class="woocommerce-info woocommerce-row"><?php esc_html_e('No products were found matching your selection.', 'woocommerce'); ?> </p> <div class="wc-pagination-outer"></div>
} // Store column count for displaying the grid if (empty($woocommerce_loop['columns'])) { $woocommerce_loop['columns'] = apply_filters('loop_shop_columns', 4); } // Ensure visibility if (!$product || !$product->is_visible()) { return; } // Increase loop count $woocommerce_loop['loop']++; if (empty($woocommerce_loop['type'])) { $woocommerce_loop['type'] = 'classic'; } if ($woocommerce_loop['type'] == 'classic') { $default = cruxstore_option('shop_products_effect', '1'); if (empty($woocommerce_loop['effect'])) { $woocommerce_loop['effect'] = $default; } elseif ($woocommerce_loop['effect'] == 'default') { $woocommerce_loop['effect'] = $default; } } else { $woocommerce_loop['effect'] = ''; } // Extra post classes $classes = array('product', 'product-type-' . $woocommerce_loop['type']); if ($woocommerce_loop['effect']) { $classes[] = 'product-effect-' . $woocommerce_loop['effect']; } if (0 === ($woocommerce_loop['loop'] - 1) % $woocommerce_loop['columns'] || 1 === $woocommerce_loop['columns']) { $classes[] = 'first';
<?php // Exit if accessed directly if (!defined('ABSPATH')) { exit; } if ($copyright = cruxstore_option('footer_copyright_text', '© 2016 CruxStore')) { printf('<div class="footer-copyright">%s</div>', do_shortcode($copyright)); }
<?php if (cruxstore_is_wc() && !cruxstore_option('catalog_mode', 0)) { $text = is_user_logged_in() ? esc_html__('My Account', 'cruxstore') : esc_html__('Login', 'cruxstore'); printf('<li class="%s"><a href="%s" title="%s">%s</a>', 'header-wc-myaccount', get_permalink(get_option('woocommerce_myaccount_page_id')), $text, '<i class="fa fa-user" aria-hidden="true"></i>'); }
<?php // Exit if accessed directly if (!defined('ABSPATH')) { exit; } $footer_socials = cruxstore_option('footer_socials', 'facebook,twitter,instagram,linkedin'); $footer_socials_style = cruxstore_option('footer_socials_style'); $footer_socials_background = cruxstore_option('footer_socials_background'); $footer_socials_size = cruxstore_option('footer_socials_size'); $footer_socials_space_between_item = cruxstore_option('footer_socials_space_between_item'); $footer_custom_color = cruxstore_option('custom_color_social'); echo do_shortcode('[socials social="' . $footer_socials . '" space_between_item="' . $footer_socials_space_between_item . '" size="' . $footer_socials_size . '" style="' . $footer_socials_style . '" custom_color="' . $footer_custom_color . '" background_style="' . $footer_socials_background . '"]');
$currency_html .= sprintf('<li class="%s"><a href="#" data-currency="%s" title="%s"><span></span>%s</a>', $selected, esc_attr($currency['name']), esc_attr($currency['description']), $currency['name']); } $items_wrap .= sprintf('<li class="menu-item menu-item-currency"><a href="#">%s</a><ul class="sub-menu-dropdown">%s</ul></li>', esc_html__('Currency', 'cruxstore') . ': ' . $currency_active, $currency_html); } if (!cruxstore_option('catalog_mode', 0)) { $text = is_user_logged_in() ? esc_html__('My Account', 'cruxstore') : esc_html__('Login', 'cruxstore'); $items_wrap .= sprintf('<li class="menu-item menu-item-myaccount"><a href="%s">call %s</a>', get_permalink(get_option('woocommerce_myaccount_page_id')), $text); if (defined('YITH_WCWL')) { global $yith_wcwl; $wishlist = sprintf('<a href="%s">%s</a>', esc_url($yith_wcwl->get_wishlist_url()), esc_html__('wishlist', 'cruxstore')); $items_wrap .= sprintf('<li class="menu-item menu-item-wishlist">%s</li>', $wishlist); } } } if (cruxstore_option('header_search', 1)) { $header_search_type = cruxstore_option('header_search_type', 'all'); if ($header_search_type == 'product' && cruxstore_is_wc()) { $search = get_product_search_form(false); } else { $search = get_search_form(false); } $items_wrap .= sprintf('<li class="menu-item menu-item-search-form">%s</li>', $search); } $primary = cruxstore_get_mainmenu(); if (!$primary['custom']) { if (has_nav_menu($primary['menu'])) { wp_nav_menu(array('theme_location' => $primary['menu'], 'container' => 'nav', 'container_class' => 'main-nav-mobile', 'container_id' => 'main-nav-mobile', 'menu_class' => 'menu navigation-mobile', 'link_before' => '<span>', 'link_after' => '</span>', 'walker' => new KTMegaWalker(), 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s' . $items_wrap . '</ul>')); } else { printf('<nav id="main-nav-mobile" class="main-nav-mobile"><ul class="menu navigation-mobile"><li><a href="%s">%s</a></li>%s</ul></nav>', admin_url('nav-menus.php'), esc_html__("Define your site main menu!", 'cruxstore'), $items_wrap); } } else {
<?php if (cruxstore_is_wc() && cruxstore_option('header_wishlist', 1) && defined('YITH_WCWL') && !cruxstore_option('catalog_mode', 0)) { ?> <li class="shopping-bag shopping-bag-wishlist"> <?php cruxstore_woocommerce_get_wishlist(); ?> </li> <?php }
<?php /** * The template for displaying error 404 * * This is the template that displays all pages by default. * Please note that this is the WordPress construct of pages and that * other "pages" on your WordPress site will use a different template. * */ $type = cruxstore_option('notfound_page_type', 'default'); /* Redirect Home */ if ($type == 'home') { wp_redirect(home_url()); exit; } get_header(); ?> <div class="wrapper-404"> <div id="error404"> <h1><?php esc_html_e('404', 'cruxstore'); ?> </h1> <h4><?php esc_html_e('Oops, page not found.', 'cruxstore'); ?> </h4> <p><?php echo wp_kses(__('It looks like nothing was found at this location. <br>Click the link below to return home.', 'cruxstore'), array('br' => array()));
function cruxstore_related_article($post_id = null, $type = 'categories') { global $post; if (!$post_id) { $post_id = $post->ID; } $posts_per_page = cruxstore_option('blog_related_sidebar', 5); $excerpt_length = 15; $args = array('posts_per_page' => $posts_per_page, 'post__not_in' => array($post_id)); if ($type == 'tags') { $tags = wp_get_post_tags($post_id); if (!$tags) { return false; } $tag_ids = array(); foreach ($tags as $tag) { $tag_ids[] = $tag->term_id; } $args['tag__in'] = $tag_ids; } elseif ($type == 'author') { $args['author'] = get_the_author(); } else { $categories = get_the_category($post_id); if (!$categories) { return false; } $category_ids = array(); foreach ($categories as $category) { $category_ids[] = $category->term_id; } $args['category__in'] = $category_ids; } $args = apply_filters('cruxstore_related_article_args', $args); $exl_function = create_function('$n', 'return ' . $excerpt_length . ';'); add_filter('excerpt_length', $exl_function, 999); $query = new WP_Query($args); if ($query->have_posts()) { ?> <div id="related-article"> <h3 class="post-single-heading"><?php esc_html_e('Related Article', 'cruxstore'); ?> </h3> <div class="blog-posts blog-posts-carousel no-readmore"> <?php ob_start(); $carousel_html = ''; while ($query->have_posts()) { $query->the_post(); echo '<div class="blog-post-wrap col-lg-6 col-md-6 col-sm-6">'; get_template_part('templates/blog/grid/content-relate', get_post_format()); echo '</div>'; } $carousel_html .= ob_get_clean(); if ($carousel_html) { $atts = array('desktop' => 2, 'navigation_position' => 'heading', 'navigation_always_on' => true); $carousel_ouput = cruxstore_render_carousel(apply_filters('cruxstore_render_args', $atts), '', 'cruxstore-owl-carousel'); echo str_replace('%carousel_html%', $carousel_html, $carousel_ouput); } ?> </div> </div><!-- #related-article --> <?php } remove_filter('excerpt_length', $exl_function, 999); wp_reset_postdata(); }
the_content(); ?> <?php if (!post_password_required()) { wp_link_pages(array('before' => '<div class="page-links"><span class="page-links-title">' . esc_html__('Pages:', 'cruxstore') . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>', 'pagelink' => '<span class="screen-reader-text">' . esc_html__('Page', 'cruxstore') . ' </span>%', 'separator' => '<span class="screen-reader-text">, </span>')); } ?> </div><!-- .entry-content --> </div> <footer class="entry-footer"> <?php cruxstore_post_meta_tags(); if (cruxstore_post_option(null, '_cruxstore_social_sharing', 'single_share_box', 1)) { cruxstore_share_box(null, 'square', 'share-it', true); } ?> </footer><!-- .entry-footer --> </article><!-- #post-## --> <?php if (cruxstore_post_option(null, '_cruxstore_author_info', 'single_author', 1)) { // Author bio. get_template_part('templates/author-bio'); } if (cruxstore_post_option(null, '_cruxstore_prev_next', 'single_next_prev', 0)) { cruxstore_post_nav(); } if (cruxstore_post_option(null, '_cruxstore_related_acticles', 'single_related', 0)) { cruxstore_related_article(null, cruxstore_option('single_related_type', 'categories')); }
<?php if (!cruxstore_option('header_search', 1)) { return; } ?> <li class="search-action"> <a href="#search-fullwidth" class="search-item"><i class="fa fa-search" aria-hidden="true"></i></a> </li>
<?php if ($phone = cruxstore_option('header_phone')) { printf('<li class="%s">%s</li>', 'header-phone', '<i class="fa fa-user" aria-hidden="true"></i> ' . $phone); }
<?php // Exit if accessed directly if (!defined('ABSPATH')) { exit; } $footer_fullwidth = cruxstore_option('footer_fullwidth', true); ?> <footer id="footer-area"> <?php if ($footer_fullwidth) { echo '<div class="container">'; } ?> <div class="row"> <div class="col-lg-8 col-md-12 col-sm-12 col-xs-12"> <div class="row"> <div class="col-md-3 col-sm-3 col-xs-12"> <?php dynamic_sidebar('footer-column-1'); ?> </div> <div class="col-md-3 col-sm-3 col-xs-12"> <?php dynamic_sidebar('footer-column-2'); ?> </div> <div class="col-md-6 col-sm-6 col-xs-12"> <?php dynamic_sidebar('footer-column-3'); ?>
/** * Get Footer top show or hidden. */ function cruxstore_footer_widgets() { $footer_widgets = ''; if (is_page()) { $footer_widgets = cruxstore_meta('_cruxstore_footer_widgets'); } if ($footer_widgets == 'on') { $footer_widgets = true; } elseif ($footer_widgets == 'off') { $footer_widgets = false; } else { $footer_widgets = cruxstore_option('footer_widgets', true); } $layouts = explode('-', cruxstore_option('footer_widgets_layout', '4-4-4')); $sidebar_widgets = false; foreach ($layouts as $i => $layout) { if (is_active_sidebar('footer-column-' . ($i + 1))) { $sidebar_widgets = true; break; } } if (!$sidebar_widgets) { $footer_widgets = false; } return $footer_widgets; }
" /> <?php } ?> </a> </p><!-- .site-logo --> </div><!-- .site-branding --> <div class="header-mobile-tools"> <a title="Menu" href="#" id="hamburger-icon" class=""> <span class="hamburger-icon-inner"> <span class="line line-1"></span> <span class="line line-2"></span> <span class="line line-3"></span> </span> </a> <?php if (cruxstore_is_wc() && cruxstore_option('header_cart', 1) && !cruxstore_option('catalog_mode', 0)) { ?> <?php cruxstore_cart_link('cart-mobile', '<i class="cruxstore-icon-Shopping-Cart"></i>'); ?> <?php } ?> </div> </div> </div>
/** * Back To Top Function * */ function cruxstore_backtotop() { if (cruxstore_option('backtotop', true)) { echo '<div id="back-to-top"><i class="fa fa-angle-up"></i></div>'; } }
?> <?php do_action('cruxstore_page_before'); ?> <?php get_template_part('templates/content', 'page'); ?> <?php do_action('cruxstore_page_after'); ?> <?php if (cruxstore_option('show_page_comment', 1)) { if (comments_open() || get_comments_number()) { comments_template(); } } ?> <?php } // end of the loop. ?> <?php echo '</div><!-- .site-main -->'; ?> <?php if ($sidebar['sidebar']) { ?>
<?php // Exit if accessed directly if (!defined('ABSPATH')) { exit; } $footer_left = cruxstore_option('footer_copyright_left'); $footer_right = cruxstore_option('footer_copyright_right', 'copyright'); if (!$footer_left && !$footer_right) { return; } ?> <div class="footer-centered"> <?php get_template_part('templates/footers/footer', $footer_left); ?> <?php get_template_part('templates/footers/footer', $footer_right); ?> </div>
protected function content($atts, $content = null) { extract(shortcode_atts(array("social" => '', "size" => 'standard', "style" => 'accent', 'custom_color' => '', 'align' => '', 'tooltip' => 'top', 'background_style' => 'empty', 'space_between_item' => 3, 'css_animation' => '', 'animation_delay' => '', 'el_class' => '', 'css' => ''), $atts)); $output = $social_icons = ''; $socials_arr = array('facebook' => array('title' => esc_html__('Facebook', 'cruxstore'), 'icon' => 'fa fa-facebook', 'link' => '%s'), 'twitter' => array('title' => esc_html__('Twitter', 'cruxstore'), 'icon' => 'fa fa-twitter', 'link' => 'http://www.twitter.com/%s'), 'dribbble' => array('title' => esc_html__('Dribbble', 'cruxstore'), 'icon' => 'fa fa-dribbble', 'link' => 'http://www.dribbble.com/%s'), 'vimeo' => array('title' => esc_html__('Vimeo', 'cruxstore'), 'icon' => 'fa fa-vimeo-square', 'link' => 'http://www.vimeo.com/%s'), 'tumblr' => array('title' => esc_html__('Tumblr', 'cruxstore'), 'icon' => 'fa fa-tumblr', 'link' => 'http://%s.tumblr.com/'), 'skype' => array('title' => esc_html__('Skype', 'cruxstore'), 'icon' => 'fa fa-skype', 'link' => 'skype:%s'), 'linkedin' => array('title' => esc_html__('LinkedIn', 'cruxstore'), 'icon' => 'fa fa-linkedin', 'link' => '%s'), 'googleplus' => array('title' => esc_html__('Google Plus', 'cruxstore'), 'icon' => 'fa fa-google-plus', 'link' => '%s'), 'youtube' => array('title' => esc_html__('Youtube', 'cruxstore'), 'icon' => 'fa fa-youtube', 'link' => 'http://www.youtube.com/user/%s'), 'pinterest' => array('title' => esc_html__('Pinterest', 'cruxstore'), 'icon' => 'fa fa-pinterest', 'link' => 'http://www.pinterest.com/%s'), 'instagram' => array('title' => esc_html__('Instagram', 'cruxstore'), 'icon' => 'fa fa-instagram', 'link' => 'http://instagram.com/%s'), 'behance' => array('title' => esc_html__('Behance', 'cruxstore'), 'icon' => 'fa fa-behance', 'link' => 'https://www.behance.net/%s')); foreach ($socials_arr as $k => &$v) { $val = cruxstore_option($k); $v['val'] = $val ? $val : ''; } $tooltiphtml = ''; if ($tooltip) { $tooltiphtml .= ' data-toggle="tooltip" data-placement="' . esc_attr($tooltip) . '" '; } $margin = $space_between_item > 0 ? 'style="padding-left:' . $space_between_item . 'px;padding-right:' . $space_between_item . 'px;"' : ''; if ($social) { $social_type = explode(',', $social); foreach ($social_type as $id) { $val = $socials_arr[$id]; if ($val['val']) { $social_text = '<i class="' . esc_attr($val['icon']) . '"></i>'; $social_icons .= '<li ' . $margin . '><a class="' . esc_attr($id) . '" title="' . esc_attr($val['title']) . '" ' . $tooltiphtml . ' href="' . esc_url(str_replace('%s', $val['val'], $val['link'])) . '" target="_blank">' . $social_text . '</a></li>' . "\n"; } } } else { foreach ($socials_arr as $key => $val) { if ($val['val']) { $social_text = '<i class="' . esc_attr($val['icon']) . '"></i>'; $social_icons .= '<li ' . $margin . '><a class="' . esc_attr($key) . '" ' . $tooltiphtml . ' title="' . esc_attr($val['title']) . '" href="' . esc_url(str_replace('%s', $val['val'], $val['link'])) . '" target="_blank">' . $social_text . '</a></li>' . "\n"; } } } $elementClass = array('base' => apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'socials-icon-wrapper', $this->settings['base'], $atts), 'extra' => $this->getExtraClass($el_class), 'shortcode_custom' => vc_shortcode_custom_css_class($css, ' '), 'style' => 'social-style-' . $style, 'size' => 'social-icons-' . $size, 'shape' => 'social-background-' . $background_style, 'clearfix' => 'clearfix', 'css_animation' => cruxstore_getCSSAnimation($css_animation)); if ($background_style == 'empty') { $elementClass[] = 'social-background-empty'; } elseif (strpos($background_style, 'outline') !== false) { $elementClass[] = 'social-background-outline'; } else { $elementClass[] = 'social-background-fill'; } $custom_css = ''; $rand = 'cruxstore_social_' . rand(); if ($style == 'custom') { $custom_css .= '#' . $rand . '.social-style-custom.social-background-fill a{ color:#fff!important; background:' . $custom_color . '!important; }'; $custom_css .= '#' . $rand . '.social-style-custom.social-background-outline a{ color:' . $custom_color . '!important; border-color:' . $custom_color . '!important; background: none !important; }'; $custom_css .= '#' . $rand . '.social-style-custom.social-background-empty a{ color:' . $custom_color . '!important; background:none!important; border:!important; }'; } if ($custom_css) { $custom_css = '<div class="cruxstore_custom_css" data-css="' . esc_attr($custom_css) . '"></div>'; } if ($align) { $elementClass['align'] = 'social-icons-' . $align; } if ($animation_delay) { $animation_delay = sprintf(' data-wow-delay="%sms"', $animation_delay); } $elementClass = preg_replace(array('/\\s+/', '/^\\s|\\s$/'), array(' ', ''), implode(' ', $elementClass)); $output .= '<div id="' . $rand . '" class="' . esc_attr($elementClass) . '"' . $animation_delay . '><ul style="margin-left: -' . $space_between_item . 'px;margin-right: -' . $space_between_item . 'px;" class="social-nav clearfix">'; $output .= $social_icons; $output .= '</ul>' . $custom_css . '</div>'; return $output; }
<?php if ($footer_widgets = cruxstore_footer_widgets()) { $widgets_layout = cruxstore_option('footer_widgets_layout', 'featured'); $layout = $widgets_layout == 'featured' ? 'widgets-featured' : 'widgets'; get_template_part('templates/footers/footer', $layout); } if (cruxstore_option('footer_bottom', false)) { get_template_part('templates/footers/footer', 'bottom'); } ?> <?php if (cruxstore_option('footer_copyright', true)) { ?> <?php $copyright_layout = cruxstore_option('footer_copyright_layout', 'centered'); ?> <footer id="footer-copyright" class="footer-copy-<?php echo esc_attr($copyright_layout); ?> "> <?php if ($footer_fullwidth) { echo '<div class="container">'; } get_template_part('templates/footers/footer', $copyright_layout); if ($footer_fullwidth) { echo '</div>'; } ?> </footer><!-- #footer-copyright -->