function hippo_body_classes($classes) { // Adds a class of group-blog to blogs with more than 1 published author. if (is_multi_author()) { $classes[] = 'group-blog'; } $classes[] = apply_filters('hippo_preset', hippo_option('preset', FALSE, 'preset1')); //$classes[ ] = hippo_option('layout-type', FALSE, 'full-width'); return $classes; }
function hippo_demodata_toolbar() { global $wp_admin_bar; $show_demo_data_bar = TRUE; if (function_exists('hippo_option')) { $show_demo_data_bar = hippo_option('demo-data-installer'); } $args = array('id' => 'hippo-installer', 'title' => __('Import “' . HIPPO_THEME_NAME . '” Demo Data', 'hippo-plugin'), 'href' => admin_url('admin.php?import=hippodemodata&step=ready')); if (!empty($show_demo_data_bar)) { $wp_admin_bar->add_menu($args); } }
function hippo_less_variables($arr) { $preset = apply_filters('hippo_preset', hippo_option('preset', FALSE, 'preset1')) . '-'; $layout_type = hippo_option('layout-type', FALSE, 'full-width'); $theme_color = hippo_option($preset . 'theme-color', FALSE, '#58b698'); $bgcolor = hippo_option($preset . 'body-background-color', FALSE, '#ffffff'); $contents_color = hippo_option($preset . 'contents-color', FALSE, '#606676'); $menu_color = hippo_option($preset . 'menu-color', FALSE, '#9197a8'); $headings_color = hippo_option($preset . 'headings-color', FALSE, '#3a424d'); $links_color = hippo_option($preset . 'links-color', FALSE, '#58b698'); $hover_color = hippo_option($preset . 'hover-color', FALSE, '#58b698'); // body typography $font_family = hippo_option('body-typography', 'font-family'); $font_option = hippo_option('body-typography', 'font-backup'); $font_weight = hippo_option('body-typography', 'font-weight'); // headinng typography $hfont_family = hippo_option('heading-typography', 'font-family'); $hfont_option = hippo_option('heading-typography', 'font-backup'); $hfont_weight = hippo_option('heading-typography', 'font-weight'); $arr['theme-color'] = $theme_color; $arr['bg-color'] = $bgcolor; $arr['content-color'] = $contents_color; $arr['menu-color'] = $menu_color; $arr['heading-color'] = $headings_color; $arr['link-color'] = $links_color; $arr['hover-color'] = $hover_color; // body typography $arr['font-family'] = $font_family; $arr['font-backup'] = $font_option; $arr['font-weight'] = $font_weight; // heading typography $arr['heading-font-family'] = $hfont_family; $arr['heading-font-backup'] = $hfont_option; $arr['heading-font-weight'] = $hfont_weight; return $arr; }
<?php $layout = hippo_option('blog-layout', FALSE, 'right-sidebar'); if ($layout == 'right-sidebar' and is_active_sidebar('hippo-blog-sidebar')) { ?> <div class="col-md-3 col-md-offset-1 col-sm-4 right-sidebar"> <div class="primary-sidebar widget-area" role="complementary"> <?php dynamic_sidebar('hippo-blog-sidebar'); ?> </div> </div> <?php } elseif ($layout == 'left-sidebar' and is_active_sidebar('hippo-blog-sidebar')) { ?> <div class="col-md-3 col-md-pull-9 col-sm-4 col-sm-pull-8 left-sidebar"> <div class="primary-sidebar widget-area" role="complementary"> <?php dynamic_sidebar('hippo-blog-sidebar'); ?> </div> </div> <?php }
<?php /* Include the Post-Format-specific template for the content. * If you want to override this in a child theme, then include a file * called content-___.php (where ___ is the Post Format name) and that will be used instead. */ get_template_part('content', get_post_format()); ?> <?php } ?> <div class="pagination-wrap clearfix"> <?php // Posts Pagination if (hippo_option('blog-page-nav', FALSE, TRUE)) { hippo_posts_pagination(); } else { hippo_posts_navigation(); } ?> </div> <?php } else { ?> <?php get_template_part('content', 'none'); ?>
function hippo_scripts() { if (!hippo_option('body-typography', 'font-family')) { wp_enqueue_style('hippo-google-font', hippo_fonts_url(), array(), NULL); } // fontawesome. wp_enqueue_style('hippo-fontawesome', get_template_directory_uri() . '/css/font-awesome.min.css', array(), '4.3.0'); // flaticon. wp_enqueue_style('hippo-flaticon', get_template_directory_uri() . '/css/flaticon.css', array(), NULL); // Twitter BootStrap. wp_enqueue_style('hippo-bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css', array(), '3.3.5'); // owl-carousel wp_enqueue_style('hippo-owl-carousel', get_template_directory_uri() . '/css/owl.carousel.css', array(), '1.3.2'); // owl-theme wp_enqueue_style('hippo-owl-theme', get_template_directory_uri() . '/css/owl.theme.css', array(), '1.3.2'); // magnific popup css wp_enqueue_style('hippo-magnific-popup-css', get_template_directory_uri() . '/css/magnific-popup.css', array(), NULL); // hippo off canvas wp_enqueue_style('hippo-offcanvas', get_template_directory_uri() . '/css/hippo-off-canvas.css', array(), NULL); // language css wp_enqueue_style('hippo-language-css', get_template_directory_uri() . '/css/language-select.css', array(), NULL); // master.less if (is_plugin_active('hippo-plugin/hippo-plugin.php')) { wp_enqueue_style('master-less', get_template_directory_uri() . '/less/master.less'); } else { wp_enqueue_style('hippo-default-preset', get_template_directory_uri() . '/css-compiled/master-' . apply_filters('hippo_preset', hippo_option('preset', FALSE, 'preset1')) . '.css'); } // main stylesheet wp_enqueue_style('hippo-stylesheet', get_stylesheet_uri()); // modernizr wp_enqueue_script('hippo-modernizr', get_template_directory_uri() . '/js/modernizr-2.8.1.min.js', array(), NULL); // bootstrap wp_enqueue_script('hippo-bootstrap-js', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), '3.3.5', TRUE); // owl-carousel wp_enqueue_script('hippo-owl-carousel-js', get_template_directory_uri() . '/js/owl.carousel.min.js', array('jquery'), NULL, TRUE); // Count to wp_enqueue_script('hippo-count-to', get_template_directory_uri() . '/js/countUp.js', array('jquery'), NULL, TRUE); // Magnific popup wp_enqueue_script('hippo-magnific-popup', get_template_directory_uri() . '/js/magnific-popup.min.js', array('jquery'), NULL, TRUE); // Hippo offcanvas wp_enqueue_script('hippo-offcanvas', get_template_directory_uri() . '/js/hippo-off-canvas.js', array('jquery'), NULL, TRUE); // viewport.js wp_enqueue_script('hippo-viewport', get_template_directory_uri() . '/js/jquery.viewport.js', array('jquery'), NULL, TRUE); // google map wp_enqueue_script('hippo-google-map', '//maps.googleapis.com/maps/api/js?sensor=true', array(), NULL, TRUE); // fitvids js wp_enqueue_script('hippo-fitvids-js', get_template_directory_uri() . '/js/jquery.fitvids.js', array('jquery'), NULL, TRUE); if (hippo_option('sticky-menu', false, false)) { // Sticky menu js wp_enqueue_script('hippo-sticky-menu', get_template_directory_uri() . '/js/sticky-menu.js', array('jquery'), NULL, TRUE); } // Retina js wp_enqueue_script('hippo-retina', get_template_directory_uri() . '/js/retina.min.js', array('jquery'), NULL, TRUE); // Twitter fetcher wp_enqueue_script('hippo-twitter-fetcher', get_template_directory_uri() . '/js/twitter-fetcher-min.js', array('jquery'), NULL, TRUE); // flicker-photo wp_enqueue_script('hippo-flicker-photo', get_template_directory_uri() . '/js/flicker-photo.min.js', array('jquery'), NULL, TRUE); // classie wp_enqueue_script('hippo-classie', get_template_directory_uri() . '/js/classie.js', array('jquery'), NULL, TRUE); // Sselect Fx wp_enqueue_script('hippo-select-fx', get_template_directory_uri() . '/js/selectFx.js', array('jquery'), NULL, TRUE); // shuffle wp_enqueue_script('hippo-shuffle', get_template_directory_uri() . '/js/jquery.shuffle.min.js', array('jquery'), NULL, TRUE); // shuffle wp_enqueue_script('hippo-parallax', get_template_directory_uri() . '/js/jquery.parallax.min.js', array('jquery'), NULL, TRUE); // plugin wp_enqueue_script('hippo-script', get_template_directory_uri() . '/js/scripts.js', array('jquery'), NULL, TRUE); wp_register_script('angularMin', get_template_directory_uri() . '/js/datangjs/vendor/angular.min.js', array(), '1.3.14'); // Angular wp_enqueue_script('angularMin'); // Enqueue it! wp_register_script('controllerForm', get_template_directory_uri() . '/js/datangjs/custom/controllerforms.js', array(), '1.0.0'); // Angular wp_enqueue_script('controllerForm'); // Enqueue it! wp_register_script('functionsReusable', get_template_directory_uri() . '/js/datangjs/custom/functions-reusable.js', array(), '1.0.0'); // Angular wp_enqueue_script('functionsReusable'); // Enqueue it! // Primero incluimos nuestro archivo javascript definido anteriormente wp_enqueue_script('mi-script-ajax', get_template_directory_uri() . '/js/datangjs/custom/functions-ajax.js', array(), null); // ahora declaramos la variable MyAjax y le pasamos el valor url (wp-admin/admin-ajax.php) al script validations.js wp_localize_script('mi-script-ajax', 'MyAjax', array('url' => admin_url('admin-ajax.php'))); // localize script wp_localize_script('hippo-script', 'hippoJSObject', array('ajax_url' => esc_url(admin_url('admin-ajax.php')), 'site_url' => esc_url(site_url('/')), 'theme_url' => get_template_directory_uri(), 'is_front_page' => is_front_page(), 'is_home' => is_home(), 'offcanvas_menu_position' => 'hippo-offcanvas-' . hippo_option('offcanvas-menu-position', FALSE, 'left'), 'offcanvas_menu_effect' => hippo_option('offcanvas-menu-effect', FALSE, 'slide-in-on-top'))); if (is_singular() && comments_open() && get_option('thread_comments')) { wp_enqueue_script('comment-reply'); } }
public function less_loader($src, $handle) { $src_path = parse_url($src, PHP_URL_PATH); $split_dot = explode('.', $src_path); $extension = strtolower(end($split_dot)); if ($extension == 'less') { /** * Filter Hook For Change CSS Compile Directory, */ $css_compiled_directory = apply_filters('hippo_css_compile_dir', 'css-compiled'); $less_file_name = basename($src_path); $find = trailingslashit(dirname($_SERVER['PHP_SELF'])); $replace = ABSPATH; if ($find == '/') { $less_file_abs_path = rtrim($replace, '/') . $src_path; } else { $less_file_abs_path = str_ireplace($find, $replace, $src_path); } $current_preset = '-' . apply_filters('hippo_preset', hippo_option('preset', FALSE, 'preset1')); if (is_multisite()) { if (!function_exists('get_home_path')) { require_once ABSPATH . '/wp-admin/includes/file.php'; } $mu_home_path = get_home_path(); $current_blog_path = get_blog_details()->path; $is_blog_home_same = (bool) ($find == $current_blog_path); if ($is_blog_home_same) { $mu_site_basename = '/'; } else { $mu_site_basename = trailingslashit(current(explode('/', str_replace($mu_home_path, '', $less_file_abs_path)))); $less_file_abs_path = str_replace($mu_site_basename, '', $less_file_abs_path); } } $less_file_rel_path = str_ireplace($this->get_load_uri($less_file_abs_path), '', $less_file_abs_path); $load_path = $this->get_load_uri($less_file_abs_path); $load_http_uri = $this->get_load_uri($less_file_abs_path, TRUE); //$css_file_name = str_ireplace('.less', '.css', $less_file_name); $css_file_name = str_ireplace('.less', $current_preset . '.css', $less_file_name); if (is_multisite()) { if (!$is_blog_home_same) { //$css_file_name = str_ireplace('.less', '-'.untrailingslashit($mu_site_basename).'.css', $less_file_name); $css_file_name = str_ireplace('.less', '-' . untrailingslashit($mu_site_basename) . $current_preset . '.css', $less_file_name); } } $css_file_rel_path = trailingslashit($css_compiled_directory) . $css_file_name; $css_file_abs_path = trailingslashit($load_path) . $css_file_rel_path; $css_file_compiled_dir_path = trailingslashit($load_path) . $css_compiled_directory; $css_file_http_path = trailingslashit($load_http_uri) . $css_file_rel_path; if (!hippo_option('less-compiler', FALSE, FALSE)) { return $css_file_http_path; } try { // $less_variables = apply_filters( 'hippo_set_less_variables', array(), $hippo_less ); $this->less_object->parseFile($less_file_abs_path, ''); $css_output = $this->less_object->getCss(); if (!file_exists($css_file_compiled_dir_path)) { mkdir($css_file_compiled_dir_path); } if (!file_put_contents($css_file_abs_path, $css_output)) { wp_die(sprintf(__("Cann't create file <strong>%s</strong>, Please check file permission to write. ", 'hippo-plugin'), $css_file_rel_path)); } } catch (exception $e) { wp_die(sprintf(__('%s', 'hippo-plugin'), nl2br($e->getMessage()))); } return $css_file_http_path; } return $src; }
<?php $quote_form = hippo_option('quote-form', FALSE, TRUE); echo do_shortcode($quote_form); ?> </div> </div> </div> </div> <!-- End quote form --> <?php } ?> <?php if (hippo_option('login-form', FALSE, TRUE)) { ?> <!-- Login & register modal --> <div class="modal fade in" id="cssModal"> <div class="modal-dialog modal-sm"> <div class="modal-content css-modal-content"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h1><?php esc_html_e('Login to your account', 'monsoon'); ?> </h1> <?php if (get_option('users_can_register')) {
if (hippo_option('portfolio_carousel')) { $project_terms = wp_get_object_terms($post->ID, 'portfolio-type', array('fields' => 'ids')); $post_limit = hippo_option('related-post-limit'); // arguments $args = array('post_type' => 'portfolio', 'post_status' => 'publish', 'posts_per_page' => $post_limit, 'orderby' => 'rand', 'tax_query' => array(array('taxonomy' => 'portfolio-type', 'field' => 'id', 'terms' => $project_terms)), 'post__not_in' => array($post->ID)); $query = new WP_Query($args); // loop over query if ($query->have_posts()) { ?> <div class="related-post-wrapper"> <?php if (hippo_option('related-post-title')) { ?> <h3><?php echo esc_html(hippo_option('related-post-title')); ?> </h3> <?php } ?> <div class="row related-project"> <?php while ($query->have_posts()) { $query->the_post(); ?> <div class="col-md-4"> <div class="single-portfolio-item"> <div class="portfolio-thumbnail"> <?php
} } elseif (function_exists('is_bbpress') and is_bbpress() || bbp_is_forum_archive() || bbp_is_topic_archive() || bbp_is_topic_tag() || bbp_is_single_forum() || bbp_is_single_topic() || bbp_is_single_user() || bbp_is_search()) { if (hippo_option('forum-short-description')) { ?> <p><?php echo wp_kses(hippo_option('forum-short-description'), array('a' => array('href' => array(), 'title' => array(), 'class' => array()), 'br' => array(), 'em' => array(), 'strong' => array(), 'ul' => array('class' => array()), 'li' => array('class' => array()), 'p' => array('class' => array()), 'span' => array('class' => array()))); ?> </p> <?php } } else { if (hippo_option('blog-short-description')) { ?> <p><?php echo wp_kses(hippo_option('blog-short-description'), array('a' => array('href' => array(), 'title' => array(), 'class' => array()), 'br' => array(), 'em' => array(), 'strong' => array(), 'ul' => array('class' => array()), 'li' => array('class' => array()), 'p' => array('class' => array()), 'span' => array('class' => array()))); ?> </p> <?php } } ?> </div> </div> </div> </div> </div> </div> </div> --> <?php
<?php /* Include the Post-Format-specific template for the content. * If you want to override this in a child theme, then include a file * called content-___.php (where ___ is the Post Format name) and that will be used instead. */ get_template_part('content', 'search'); ?> <?php } ?> <?php // Posts Pagination if (hippo_option('blog-page-nav', false, true)) { hippo_posts_pagination(); } else { hippo_posts_navigation(); } ?> <?php } else { ?> <?php get_template_part('content', 'none'); ?> <?php
<?php get_header(); ?> <div class="container"> <div class="row"> <?php $layout = hippo_option('shop-layout', FALSE, 'right-sidebar'); $grid_class = 'col-md-12'; if ($layout == 'right-sidebar') { $grid_class = is_active_sidebar('woosidebar') ? 'col-md-9 col-sm-8' : $grid_class; } elseif ($layout == 'left-sidebar') { $grid_class = is_active_sidebar('woosidebar') ? 'col-md-9 col-md-push-3 col-sm-8 col-sm-push-4' : $grid_class; } ?> <div class="<?php echo esc_attr($grid_class); ?> "> <?php /** * woocommerce_before_main_content hook * * @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content) * @hooked woocommerce_breadcrumb - 20 */ do_action('woocommerce_output_content_wrapper');
<div> <div> <?php dynamic_sidebar('offcanvas-menu'); ?> </div> </div> </nav> <?php } ?> </div> <!-- /pusher --> <?php if (!offCanvas_On_InnerPusher(hippo_option('offcanvas-menu-effect', FALSE, 'slide-in-on-top'))) { ?> <nav class="menu-wrapper" id="offcanvasmenu"> <button type="button" class="close close-sidebar">×</button> <div> <div> <?php dynamic_sidebar('offcanvas-menu'); ?> </div> </div> </nav> <?php } ?> </div>
function hippo_title_image($placeholder = 'http://placehold.it/1400x400') { $query = get_queried_object(); $image = FALSE; if (is_archive()) { $image = esc_url(hippo_option('title-archive-image', 'url')); } if (is_404()) { $image = esc_url(hippo_option('title-404-image', 'url')); } if (is_search()) { $image = esc_url(hippo_option('title-search-image', 'url')); } if (is_category()) { $image = esc_url(hippo_option('title-category-image', 'url')); } if (is_tag()) { $image = esc_url(hippo_option('title-tag-image', 'url')); } if (is_author()) { $image = esc_url(hippo_option('title-author-image', 'url')); } if (is_page()) { $image = esc_url(hippo_option('title-page-image', 'url')); $indivisual_image = get_post_meta($query->ID, 'page_header_image', TRUE); $indivisual_image = $indivisual_image ? wp_get_attachment_url($indivisual_image) : FALSE; if ($indivisual_image) { $image = esc_url($indivisual_image); } } if (is_single()) { $image = esc_url(hippo_option('title-single-image', 'url')); $indivisual_image = get_post_meta($query->ID, 'page_header_image', TRUE); $indivisual_image = $indivisual_image ? wp_get_attachment_url($indivisual_image) : FALSE; if ($indivisual_image) { $image = esc_url($indivisual_image); } } if (empty($indivisual_image)) { if (is_singular('service')) { $image = esc_url(hippo_option('title-service-image', 'url')); } if (is_singular('team')) { $image = esc_url(hippo_option('title-team-image', 'url')); } } if (is_home()) { $image = esc_url(hippo_option('title-blog-image', 'url')); } if (!$image) { $image = esc_url(hippo_option('title-blog-image', 'url')); } $link = apply_filters('hippo_title_image', $image, $image); if (empty($link)) { return apply_filters('hippo_title_image_placeholder', $placeholder); } else { return $link; } }
<style> .vc_custom_1438443055686{ padding-bottom: 30px !important; } </style> </head> <body <?php body_class(); ?> > <!-- wrapper --> <div class="wrapper" id="wrapper"> <!-- content push wrapper --> <div class="inner-wrapper pusher"> <!-- this is the wrapper for the content --> <div class="contents"> <?php $header_style = hippo_option('header-style', FALSE, 'header-style-one'); if ($header_style == 'header-style-two') { get_header('two'); } elseif ($header_style == 'header-style-three') { get_header('three'); } else { get_header('one'); } if (hippo_option('page-header-image', FALSE, TRUE)) { get_header('page'); }
?> > <div class="container"> <div class="row"> <div class="col-md-8 col-sm-8 entry-content"> <?php while (have_posts()) { the_post(); ?> <?php get_template_part('content', 'page'); ?> <?php if (hippo_option('page-comment', FALSE, TRUE)) { ?> <?php // If comments are open or we have at least one comment, load up the comment template if (comments_open() || get_comments_number()) { comments_template(); } ?> <?php } ?> <?php } // end of the loop. ?>
?> &url=<?php the_permalink(); ?> " title="<?php esc_html_e('Share this post on Linkedin!', 'monsoon'); ?> " target="_blank"><?php esc_html_e('linkedin', 'monsoon'); ?> </a> </li> <?php } ?> </ul> </div> </div> <?php } ?> <?php if (is_single()) { if (get_the_author_meta('description')) { get_template_part('author-bio'); } if (hippo_option('post-navigation', FALSE, TRUE)) { hippo_post_navigation(); } }
<?php $layout = hippo_option('page-layout', FALSE, 'right-sidebar'); if ($layout == 'right-sidebar' and is_active_sidebar('hippo-page-sidebar')) { ?> <div class="col-md-3 col-md-offset-1 col-sm-4 right-sidebar"> <div class="primary-sidebar widget-area" role="complementary"> <?php dynamic_sidebar('hippo-page-sidebar'); ?> </div> </div> <?php } elseif ($layout == 'left-sidebar' and is_active_sidebar('hippo-page-sidebar')) { ?> <div class="col-md-3 col-md-pull-9 col-sm-4 col-sm-pull-8 left-sidebar"> <div class="primary-sidebar widget-area" role="complementary"> <?php dynamic_sidebar('hippo-page-sidebar'); ?> </div> </div> <?php }