function presscore_congif_populate_team_vars() { $config = presscore_config(); $post_id = $config->get('post_id'); $prefix = '_dt_team_options_'; // for categorizer compatibility if (!$config->get('order')) { $config->set('order', get_post_meta($post_id, "{$prefix}order", true)); } if (!$config->get('orderby')) { $config->set('orderby', get_post_meta($post_id, "{$prefix}orderby", true)); } $config->set('display', get_post_meta($post_id, "_dt_team_display", true)); //////////////////// // Image sizing // //////////////////// $config->set('image_layout', get_post_meta($post_id, "{$prefix}image_layout", true)); $config->set('thumb_proportions', get_post_meta($post_id, "{$prefix}thumb_proportions", true)); $config->set('show_excerpts', get_post_meta($post_id, "{$prefix}show_exerpts", true)); ////////////// // Layout // ////////////// $config->set('layout', get_post_meta($post_id, "{$prefix}masonry_layout", true)); $config->set('full_width', get_post_meta($post_id, "{$prefix}full_width", true)); $config->set('posts_per_page', get_post_meta($post_id, "{$prefix}ppp", true)); $config->set('post.preview.description.style', 'under_image'); /////////////////// // Items style // /////////////////// $config->set('item_padding', get_post_meta($post_id, "{$prefix}item_padding", true), 20); $config->set('post.preview.width.min', get_post_meta($post_id, "{$prefix}target_width", true), 370); $config->set('template.columns.number', get_post_meta($post_id, "{$prefix}columns_number", true), 3); $config->set('post.preview.background.enabled', get_post_meta($post_id, "{$prefix}bg_under_posts", true)); }
/** * Init theme config for shop. * * @param string $name */ function dt_woocommerce_configure_template($name = '') { dt_woocommerce_configure_mini_cart(); // Add template configuration actions. $config = presscore_config(); $mod_wc_config = dt_woocommerce_template_config($config); add_action('dt_wc_loop_start', array($mod_wc_config, 'setup')); add_action('dt_wc_loop_end', array($mod_wc_config, 'cleanup')); // Stop if not on woocommerce page. if ('shop' !== $name) { return; } // From what page get settings? $post_id = null; if (is_shop()) { $post_id = woocommerce_get_page_id('shop'); } else { if (is_cart()) { $post_id = woocommerce_get_page_id('cart'); } else { if (is_checkout()) { $post_id = woocommerce_get_page_id('checkout'); } } } if ($post_id) { $config->set('post_id', $post_id); } if (!is_product()) { add_filter('presscore_get_page_title', 'dt_woocommerce_get_page_title', 20); } // Replace theme breadcrumbs. add_filter('presscore_get_breadcrumbs-html', 'dt_woocommerce_replace_theme_breadcrumbs', 20, 2); }
public function get_response($input) { $this->input = $input; $this->config = presscore_config(); $this->response = $this->get_default_response(); $this->do_response(); return $this->response; }
function presscore_get_post_back_link() { $page_id = apply_filters('presscore_post_back_link_id', presscore_config()->get('post.navigation.back_button.target_page_id')); if ($page_id) { return '<a class="back-to-list" href="' . esc_url(get_permalink($page_id)) . '"></a>'; } return ''; }
function presscore_archive_post_content() { $post_type = get_post_type(); $html = apply_filters("presscore_archive_post_content-{$post_type}", ''); if ($html) { echo $html; } else { if ('post' == $post_type) { presscore_config()->set('show_details', false); presscore_populate_post_config(); presscore_get_template_part('theme', 'blog/masonry/blog-masonry-post'); } else { presscore_get_template_part('theme', 'content-archive'); } } }
function presscore_congif_populate_testimonials_vars() { $config = presscore_config(); $post_id = $config->get('post_id'); $prefix = '_dt_testimonials_options_'; $config->set('layout', get_post_meta($post_id, "{$prefix}masonry_layout", true), 'masonry'); $config->set('posts_per_page', get_post_meta($post_id, "{$prefix}ppp", true)); $config->set('display', get_post_meta($post_id, "_dt_testimonials_display", true)); $config->set('full_width', get_post_meta($post_id, "{$prefix}full_width", true), false); $config->set('item_padding', get_post_meta($post_id, "{$prefix}item_padding", true), 20); $config->set('post.preview.width.min', get_post_meta($post_id, "{$prefix}target_width", true), 370); $config->set('template.columns.number', get_post_meta($post_id, "{$prefix}columns_number", true), 3); $config->set('load_style', get_post_meta($post_id, "{$prefix}load_style", true), 'default'); $config->set('post.preview.load.effect', get_post_meta($post_id, "{$prefix}load_effect", true), 'fade_in'); $config->set('post.preview.description.style', 'on_hoover_centered'); $config->set('post.preview.description.alignment', 'left'); }
function presscore_footer_html_class($class = array()) { if ($class) { $output = is_array($class) ? $class : explode(' ', $class); } else { $output = array(); } switch (presscore_config()->get('template.footer.style')) { case 'full_width_line': $output[] = 'full-width-line'; break; case 'solid_background': $output[] = 'solid-bg'; if ('outline' === presscore_config()->get('template.footer.decoration')) { $output[] = 'footer-outline-decoration'; } break; // default - content_width_line } $output = apply_filters('presscore_footer_html_class', $output); return $output ? sprintf('class="%s"', presscore_esc_implode(' ', array_unique($output))) : ''; }
function presscore_get_filtered_posts($args) { $config = presscore_config(); // sanitize $request = $config->get('request_display'); if ($request) { $request = wp_parse_args($request, array('terms_ids' => null)); } $display = $config->get('display'); if (!is_array($display)) { $display = array(); } $display = wp_parse_args($display, array('terms_ids' => null, 'posts_ids' => null, 'type' => 'category', 'select' => 'all')); $is_posts_query = 'albums' == $display['type']; $terms = $request ? $request['terms_ids'] : ($is_posts_query ? null : $display['terms_ids']); $defaults = array('post_type' => 'post', 'taxonomy' => 'category', 'select' => $request ? 'only' : $display['select'], 'order' => $config->get('order'), 'orderby' => $config->get('orderby'), 'posts_per_page' => $config->get('posts_per_page'), 'terms' => $terms, 'post__in' => $is_posts_query && 'only' == $display['select'] ? $display['posts_ids'] : null, 'post__not_in' => $is_posts_query && 'except' == $display['select'] ? $display['posts_ids'] : null, 'query' => presscore_query()); $args = wp_parse_args($args, $defaults); $query = $args['query']; unset($args['query']); $posts_query = $query->get_posts_by_terms($args); do_action('presscore_get_filtered_posts-' . $args['post_type'], $posts_query); do_action('presscore_get_filtered_posts', $posts_query); return $posts_query; }
function presscore_congif_populate_albums_vars() { $config = presscore_config(); $config->set_post_id($config->get('post_id')); $post_id = $config->get_post_id(); $prefix = '_dt_albums_options_'; $config->set_meta_prefix($prefix); // for categorizer compatibility if (!$config->get('order')) { $config->set_meta('order', 'order'); } if (!$config->get('orderby')) { $config->set_meta('orderby', 'orderby'); } if (!$config->get('display')) { $display = get_post_meta($post_id, '_dt_albums_display', true); if (!isset($display['terms_ids'])) { $display['terms_ids'] = null; } $config->set('display', $display); } $config->map(array('template.posts_filter.terms.enabled' => array('meta', 'show_filter', true), 'template.posts_filter.orderby.enabled' => array('meta', 'show_orderby', true), 'template.posts_filter.order.enabled' => array('meta', 'show_order', true), 'posts_per_page' => array('meta', 'ppp', ''), 'full_width' => array('meta', 'full_width', false), 'item_padding' => array('meta', 'item_padding', 20), 'thumb_proportions' => array('meta', 'thumb_proportions', array('width' => 1, 'height' => 1)), 'image_layout' => array('meta', 'image_layout', 'original'), 'all_the_same_width' => array('meta', 'posts_same_width', false), 'load_style' => array('meta', 'load_style', 'default'), 'post.preview.mini_images.enabled' => array('meta', 'show_round_miniatures', true), 'show_titles' => array('meta', 'show_titles', true), 'show_excerpts' => array('meta', 'show_exerpts', true), 'post.meta.fields.date' => array('meta', 'show_date_in_post_meta', true), 'post.meta.fields.categories' => array('meta', 'show_categories_in_post_meta', true), 'post.meta.fields.comments' => array('meta', 'show_comments_in_post_meta', true), 'post.meta.fields.author' => array('meta', 'show_author_in_post_meta', true), 'post.meta.fields.media_number' => array('meta', 'show_numbers_in_post_meta', true), 'post.preview.load.effect' => array('meta', 'load_effect', 'fade_in'), 'show_all_pages' => array('meta', 'show_all_pages', false))); // layout if ('template-albums-jgrid.php' != dt_get_template_name($post_id, true)) { $config->map(array('layout' => array('meta', 'layout'), 'post.preview.description.style' => array('meta', 'description', 'under_image'), 'post.preview.description.alignment' => array('meta', 'post_content_alignment', 'left'), 'post.preview.hover.animation' => array('meta', 'hover_animation', 'fade'), 'post.preview.hover.color' => array('meta', 'hover_bg_color', 'accent'), 'post.preview.hover.content.visibility' => array('meta', 'hover_content_visibility', 'on_hoover'), 'post.preview.hover.lines.animation' => array('meta', 'lines_animation_effect', '1'), 'post.preview.hover.title.visibility' => array('meta', 'title_visibility', 'on_hoover'), 'post.preview.width.min' => array('meta', 'target_width', 370), 'template.columns.number' => array('meta', 'columns_number', 3), 'post.preview.background.enabled' => array('value', false), 'post.preview.background.style' => array('value', false))); $description_style = $config->get('post.preview.description.style'); // content alignment if ('on_hoover_centered' == $description_style) { $config->set_meta('post.preview.description.alignment', 'bg_post_content_alignment'); } else { if ('bg_with_lines' == $description_style) { $config->set('post.preview.description.alignment', false); } else { $config->set_meta('post.preview.description.alignment', 'post_content_alignment'); } } // preview background if ('under_image' == $description_style) { $background_under_posts = get_post_meta($post_id, "{$prefix}bg_under_masonry_posts", true); $config->set('post.preview.background.enabled', !in_array($background_under_posts, array('disabled', ''))); $config->set('post.preview.background.style', $background_under_posts, false); } // justified grid } else { $config->map(array('layout' => array('value', 'grid'), 'post.preview.description.style' => array('meta', 'jgrid_description', 'on_hoover_centered'), 'post.preview.hover.animation' => array('meta', 'jgrid_hover_animation', 'fade'), 'post.preview.hover.color' => array('meta', 'jgrid_hover_bg_color', 'accent'), 'post.preview.hover.content.visibility' => array('meta', 'jgrid_hover_content_visibility', 'on_hoover'), 'post.preview.hover.lines.animation' => array('meta', 'jgrid_lines_animation_effect', '1'), 'post.preview.hover.title.visibility' => array('meta', 'jgrid_title_visibility', 'on_hoover'), 'target_height' => array('meta', 'target_height', 250), 'justified_grid' => array('value', true), 'all_the_same_width' => array('value', true), 'hide_last_row' => array('meta', 'hide_last_row', false))); $description_style = $config->get('post.preview.description.style'); // content alignment if ('on_hoover_centered' == $description_style) { $config->set_meta('post.preview.description.alignment', 'jgrid_bg_post_content_alignment'); } else { if ('bg_with_lines' == $description_style) { $config->set('post.preview.description.alignment', false); } else { $config->set_meta('post.preview.description.alignment', 'jgrid_post_content_alignment'); } } if ('default' != $config->get('load_style')) { $config->set('hide_last_row', false); } } }
// File Security Check if (!defined('ABSPATH')) { exit; } $image = $rollover_content = $rollover_class = ''; // media switch (presscore_config()->get('post.preview.media.style')) { case 'featured_image': $image_id = has_post_thumbnail() ? get_post_thumbnail_id() : 0; $link_class = 'alignnone'; $link_class .= presscore_get_image_video_url($image_id) ? ' rollover-video' : ' rollover'; $image = presscore_project_get_thumbnail_img($image_id, $link_class); // rollover icons $rollover_content = presscore_project_get_preview_buttons($image_id); if (1 == presscore_project_preview_buttons_count()) { $rollover_class .= ' rollover-active'; } break; case 'slideshow': $slider_classes = array('alignnone', 'slider-simple'); if ('grid' != presscore_config()->get('layout')) { $slider_classes[] = 'slider-masonry'; } $image = presscore_get_project_media_slider($slider_classes); break; } // content $content = presscore_project_get_preview_content(); $template_args = array('image' => $image, 'content' => $content, 'rollover_content' => $rollover_content, 'figure_class' => $rollover_class); // description under image template presscore_get_template_part('theme', 'post-layouts/description-under-image-odd', null, $template_args);
<?php /** * Portfolio list content. * * @package presscore * @since presscore 0.1 */ // File Security Check if (!defined('ABSPATH')) { exit; } $config = presscore_config(); $article_content_layout = presscore_get_template_image_layout($config->get('layout'), $config->get('post.query.var.current_post')); ?> <?php do_action('presscore_before_post'); ?> <article <?php post_class(array('post', 'project-' . $article_content_layout)); ?> > <?php $image = $rollover_content = $rollover_class = ''; if (!post_password_required()) { switch ($config->get('post.preview.media.style')) { case 'featured_image': $image_id = get_post_thumbnail_id();
/** * Filers masonry container class array. * * @param array $class * @return array */ function dt_woocommerce_filter_masonry_container_class($class = array()) { if ('under_image' === presscore_config()->get('post.preview.description.style')) { if ('below_image' === presscore_config()->get('product.preview.add_to_cart.position')) { $class[] = 'cart-btn-below-img'; } else { $class[] = 'cart-btn-on-img'; } } return $class; }
* @var $show_bg * @var $sidebar_id * Shortcode class * @var $this WPBakeryShortCode_VC_Widget_sidebar */ $title = $el_class = $sidebar_id = $show_bg = ''; $atts = vc_map_get_attributes($this->getShortcode(), $atts); extract($atts); if ('' === $sidebar_id) { return null; } $el_class = $this->getExtraClass($el_class); if ('true' === $show_bg) { $el_class .= ' solid-bg'; } switch (presscore_config()->get('sidebar.style.background.decoration')) { case 'shadow': $el_class .= ' sidebar-shadow-decoration'; break; case 'outline': $el_class .= ' sidebar-outline-decoration'; break; } ob_start(); dynamic_sidebar($sidebar_id); $sidebar_value = ob_get_contents(); ob_end_clean(); $sidebar_value = trim($sidebar_value); $sidebar_value = '<li' === substr($sidebar_value, 0, 3) ? '<ul>' . $sidebar_value . '</ul>' : $sidebar_value; $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wpb_widgetised_column wpb_content_element sidebar-content' . $el_class, $this->settings['base'], $atts); $output = '
<?php /** * Mirosite template. * * @package the7 * @since 3.0.0 */ /* Template Name: Microsite */ if (!defined('ABSPATH')) { exit; } presscore_config()->set('template', 'microsite'); get_header(); ?> <?php if (presscore_is_content_visible()) { ?> <div id="content" class="content" role="main"> <?php if (have_posts()) { while (have_posts()) { the_post(); ?> <?php do_action('presscore_before_loop');
* @package vogue * @since 1.0.0 */ // File Security Check if (!defined('ABSPATH')) { exit; } if (presscore_is_content_visible()) { ?> </div><!-- .wf-container --> </div><!-- .wf-wrap --> </div><!-- #main --> <?php if (presscore_config()->get('template.footer.background.slideout_mode')) { echo '</div>'; } do_action('presscore_after_main_container'); ?> <?php } // presscore_is_content_visible ?> <a href="#" class="scroll-top"></a> </div><!-- #page --> <?php wp_footer();
/** * Returns html class property based on current template settings. * * @since 1.0.0 * @param array $custom_class Custom class. * @return string */ function presscore_masonry_container_class($custom_class = array()) { $_custom_class = $custom_class; if (!is_array($_custom_class)) { $_custom_class = (string) $_custom_class; $_custom_class = explode(' ', $_custom_class); } $html_class = $_custom_class; $config = presscore_config(); // ajax class if (!in_array($config->get('load_style'), array('default', false))) { $html_class[] = 'with-ajax'; } // loading effect $html_class[] = presscore_tpl_get_load_effect_class($config->get('post.preview.load.effect')); // lazy loading if ('lazy_loading' == $config->get('load_style')) { $html_class[] = 'lazy-loading-mode'; } // layout switch ($config->get('layout')) { case 'grid': $html_class[] = 'iso-grid'; break; case 'masonry': $html_class[] = 'iso-container'; break; } if ($config->get('justified_grid')) { $html_class[] = 'jg-container'; } // post preview background if ($config->get('post.preview.background.enabled')) { $html_class[] = 'bg-under-post'; } // description style $description_style = $config->get('post.preview.description.style'); if ('under_image' == $description_style) { $html_class[] = 'description-under-image'; } else { if ('disabled' != $description_style) { $html_class[] = 'description-on-hover'; } } // hover classes switch ($description_style) { case 'on_hoover_centered': $html_class[] = 'hover-style-two'; $html_class[] = presscore_tpl_get_hover_anim_class($config->get('post.preview.hover.animation')); // content align $html_class[] = presscore_tpl_get_content_align_class($config->get('post.preview.description.alignment')); if ('dark' == $config->get('post.preview.hover.color')) { $html_class[] = 'hover-color-static'; } break; case 'under_image': // content align $html_class[] = presscore_tpl_get_content_align_class($config->get('post.preview.description.alignment')); if ('dark' == $config->get('post.preview.hover.color')) { $html_class[] = 'hover-color-static'; } break; case 'on_dark_gradient': $html_class[] = 'hover-style-one'; // content align $html_class[] = presscore_tpl_get_content_align_class($config->get('post.preview.description.alignment')); if ('always' == $config->get('post.preview.hover.content.visibility')) { $html_class[] = 'always-show-info'; } break; case 'from_bottom': $html_class[] = 'hover-style-three'; $html_class[] = 'cs-style-3'; // content align $html_class[] = presscore_tpl_get_content_align_class($config->get('post.preview.description.alignment')); break; case 'bg_with_lines': $html_class[] = 'hover-style-two'; $html_class[] = presscore_tpl_get_anim_effect_class($config->get('post.preview.hover.lines.animation')); if ('dark' == $config->get('post.preview.hover.color')) { $html_class[] = 'hover-color-static'; } if ('always' == $config->get('post.preview.hover.title.visibility')) { $html_class[] = 'always-show-info'; } break; } // round images if ('round' == $config->get('image_layout')) { $html_class[] = 'round-images'; } /** * Masonry container class filter. * * @since 1.0.0 * @var array $html_class */ $html_class = apply_filters('presscore_masonry_container_class', $html_class); return $html_class ? sprintf('class="%s"', presscore_esc_implode(' ', array_unique($html_class))) : ''; }
/** * @since 3.0.0 * @return boolean */ function presscore_is_microsite() { return 'microsite' === presscore_config()->get('template'); }
/** * Display theme primary nav menu. * * @since 3.0.0 * @param string $location */ function presscore_primary_nav_menu($location) { $cahce_name = "primary_nav_menu_{$location}"; if (false === ($cache = wp_cache_get($cahce_name, 'presscore'))) { ob_start(); do_action('presscore_primary_nav_menu_before'); presscore_nav_menu(array('theme_location' => $location, 'items_wrap' => '%3$s', 'submenu_class' => implode(' ', presscore_get_primary_submenu_class('sub-nav')), 'parent_is_clickable' => presscore_config()->get('header.menu.submenu.parent_clickable'))); do_action('presscore_primary_nav_menu_after'); $cache = ob_get_contents(); ob_end_clean(); wp_cache_set($cahce_name, $cache, 'presscore'); } echo $cache; }
<?php /** * Search form view. * * @package the7 */ // File Security Check if (!defined('ABSPATH')) { exit; } $show_icon = presscore_config()->get('header.elements.search.icon.enabled'); $class = $show_icon ? '' : ' icon-off'; $caption = presscore_config()->get('header.elements.search.caption'); if (!$caption && $show_icon) { $class .= ' text-disable'; } if (!$caption) { $caption = ' '; } ?> <form class="searchform" role="search" method="get" action="<?php echo esc_url(home_url('/')); ?> "> <input type="text" class="field searchform-s" name="s" value="<?php echo esc_attr(get_search_query()); ?> " placeholder="<?php _e('Type and hit enter …', 'the7mk2'); ?>
<?php /** * Product Loop Start * * @author WooThemes * @package WooCommerce/Templates * @version 2.0.0 */ do_action('dt_wc_loop_start'); do_action('presscore_before_loop'); // fullwidth wrap open if (presscore_config()->get('full_width')) { echo '<div class="full-width-wrap">'; } // masonry container open echo '<div ' . presscore_masonry_container_class(array('wf-container', 'woo-hover')) . presscore_masonry_container_data_atts() . '>';
/** * Determine that the header is mixed. * * @since 3.0.0 * @return boolean */ function presscore_header_layout_is_mixed() { return in_array(presscore_config()->get('header.layout'), array('slide_out', 'overlay')); }
/** * @return string */ function presscore_mod_albums_get_photo_description() { $html = ''; $config = presscore_config(); if (presscore_image_title_enabled(get_the_ID()) && $config->get('show_titles') && ($title = get_the_title())) { $html .= sprintf('<h3 class="entry-title"><a class="dt-trigger-first-mfp" href="%s" title="%s" rel="bookmark">%s</a></h3>', get_permalink(), the_title_attribute('echo=0'), $title); } if ($config->get('show_excerpts')) { $html .= wpautop(get_the_content()); } if ($html) { $html .= presscore_post_edit_link(); } return $html; }
/** * Returns the floating logos array. * @since 3.0.0 * @return array */ function presscore_get_floating_menu_logos_meta() { $config = presscore_config(); if ('main' === $config->get('header.floating_navigation.logo.style')) { $logo = $config->get('logo.header.regular'); $hd_logo = $config->get('logo.header.hd'); } else { $logo = $config->get('logo.header.floating.regular'); $hd_logo = $config->get('logo.header.floating.hd'); } return array('logo' => dt_get_uploaded_logo($logo), 'logo_retina' => dt_get_uploaded_logo($hd_logo, 'retina')); }
exit; } ?> <article id="post-<?php the_ID(); ?> " <?php post_class('project-post'); ?> > <?php do_action('presscore_before_post_content'); if (!post_password_required()) { switch (presscore_config()->get('post.media.type')) { case 'photo_scroller': break; case 'jgrid': case 'masonry_grid': presscore_get_template_part('mod_albums', 'albums-post-single-media'); break; default: echo '<div class="wf-container">'; echo '<div class="wf-cell wf-1 project-slider">'; presscore_get_template_part('mod_albums', 'albums-post-single-media'); echo '</div>'; echo '</div>'; } if (get_the_content()) { echo '<div class="wf-container">';
* * @package the7\Albums\Templates * @since 3.0.0 */ // File Security Check if (!defined('ABSPATH')) { exit; } ?> <?php do_action('presscore_before_post'); ?> <article <?php post_class('post'); ?> > <?php if ('under_image' == presscore_config()->get('post.preview.description.style')) { include plugin_dir_path(__FILE__) . 'album-tpl-desc-under-img.php'; } else { include plugin_dir_path(__FILE__) . 'album-tpl-desc-on-hover.php'; } ?> </article> <?php do_action('presscore_after_post');
public function filter_body_class($classes) { // fix single portfolio class if (is_single() && 'dt_portfolio' === get_post_type()) { $key = array_search('single-dt_portfolio', $classes); if (false !== $key) { $classes[$key] = 'single-portfolio'; } } // hover icons style switch (presscore_config()->get('post.preview.hover.icon.style')) { case 'outline': $classes[] = 'outlined-portfolio-icons'; break; case 'transparent': $classes[] = 'semitransparent-portfolio-icons'; break; case 'accent': $classes[] = 'accent-portfolio-icons'; break; case 'small': $classes[] = 'small-portfolio-icons'; break; } return $classes; }
<?php /** * Shortcode attributes * @var $atts * @var $type * Shortcode class * @var $this WPBakeryShortCode_VC_Facebook */ extract(shortcode_atts(array('type' => 'standard', 'url' => '', 'like' => 'post'), $atts)); if (empty($url)) { if (isset($like) && 'page' === $like && function_exists('presscore_config') && presscore_config()->get('page_id')) { $url = get_permalink(presscore_config()->get('page_id')); } else { $url = get_permalink(); } } $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'fb_like wpb_content_element fb_type_' . $type, $this->settings['base'], $atts); $output = '<div class="' . esc_attr($css_class) . '"><iframe src="http://www.facebook.com/plugins/like.php?href=' . $url . '&layout=' . $type . '&show_faces=false&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true"></iframe></div>' . $this->endBlockComment($this->getShortcode()) . "\n"; echo $output;
/** * Returns class based on title_bg_mode value * * @since 1.0.0 * @return string class */ function presscore_get_page_title_bg_mode_html_class() { switch (presscore_config()->get('page_title.background.mode')) { case 'background': $class = 'solid-bg'; break; case 'gradient': $class = 'gradient-bg'; break; case 'fullwidth_line': $class = 'full-width-line'; break; case 'disabled': $class = 'disabled-bg'; break; default: $class = ''; } return $class; }
function presscore_config_get_theme_option() { $config = presscore_config(); $config->map(array('template.content.boxes.background.decoration' => array('option', 'general-content_boxes_decoration', 'none'), 'template.content.width' => array('option', 'general-content_width', '1200px'), 'template.beautiful_loading.enabled' => array('option', 'general-beautiful_loading', 'enabled'), 'template.beautiful_loading.loadr.style' => array('option', 'general-loader_style', 'double_circles'), 'template.beautiful_loading.loadr.custom_code' => array('option', 'general-custom_loader'), 'template.accent.color.mode' => array('option', 'general-accent_color_mode', 'color'), 'template.layout' => array('option', 'general-layout', 'wide'), 'template.icons.style' => array('option', 'general-icons_style', 'light'), 'template.posts_filter.style' => array('option', 'general-filter_style', 'ios'), 'template.posts_filter.text_upper_case' => array('option', 'general-filter_ucase', false), 'template.contact_form.style' => array('option', 'general-contact_form_style', 'ios'), 'post.fancy_date.size' => array('option', 'general-fancy_date_size', 'big'), 'slideshow.bullets.style' => array('option', 'general-slideshow_bullets_style', 'outline'), 'template.images.hover.style' => array('option', 'image_hover-style', 'none'), 'template.images.hover.animation' => array('option', 'image_hover-onclick_animation', true), 'template.images.hover.icon' => array('option', 'image_hover-default_icon', 'none'), 'post.preview.mini_images.style' => array('option', 'image_hover-album_miniatures_style', 'style_1'), 'post.preview.hover.icon.style' => array('option', 'image_hover-project_icons_style', 'accent'), 'buttons.style' => array('option', 'buttons-style', 'flat'), 'buttons.background' => array('option', 'buttons-color_mode', 'accent'), 'buttons.text.color' => array('option', 'buttons-text_color_mode', 'accent'), 'buttons.hover.background' => array('option', 'buttons-hover_color_mode', 'accent'), 'buttons.hover.text.color' => array('option', 'buttons-text_hover_color_mode', 'accent'), 'header.floating_navigation.style' => array('option', 'header-floating_navigation-style', 'fade'), 'header.floating_navigation.logo.style' => array('option', 'header-style-floating-choose_logo', 'custom'), 'header.floating_navigation.enabled' => array('option', 'header-show_floating_navigation', '1'), 'header.floating_navigation.show_after' => array('option', 'header-floating_navigation-show_after', '150'), 'header.floating_navigation.decoraion' => array('option', 'header-floating_navigation-decoration'), 'header.top_bar.background.mode' => array('option', 'top_bar-bg-style', 'content_line'), 'page_title.enabled' => array('option', 'general-show_titles'), 'page_title.align' => array('option', 'general-title_align'), 'page_title.font.size' => array('option', 'general-title_size'), 'page_title.font.color' => array('option', 'general-title_color'), 'page_title.height' => array('option', 'general-title_height'), 'page_title.breadcrumbs.enabled' => array('option', 'general-show_breadcrumbs'), 'page_title.breadcrumbs.font.color' => array('option', 'general-breadcrumbs_color'), 'page_title.breadcrumbs.background.mode' => array('option', 'general-breadcrumbs_bg_color'), 'page_title.background.mode' => array('option', 'general-title_bg_mode', 'content_line'), 'page_title.background.color' => array('option', 'general-title_bg_color'), 'page_title.decoration' => array('option', 'general-title_decoration', 'none'), 'page_title.background.image' => array('option', 'general-title_bg_image'), 'page_title.background.fullscreen' => array('option', 'general-title_bg_fullscreen'), 'page_title.background.fixed' => array('option', 'general-title_bg_fixed'), 'page_title.background.parallax_speed' => array('option', 'general-title_bg_parallax'), 'header_background' => array('option', 'header-background', 'normal'), 'header.transparent.background.opacity' => array('option', 'header-transparent_bg_opacity', 50), 'header.transparent.background.color' => array('option', 'header-transparent_bg_color', '#000000'), 'header.transparent.color_scheme' => array('option', 'page_title-background-style-transparent-color_scheme'), 'header.layout' => array('option', 'header-layout', 'inline'), 'header.mobile.logo.first_switch.layout' => array('option', 'header-mobile-first_switch-layout'), 'header.mobile.logo.first_switch' => array('option', 'header-mobile-first_switch-logo', 'mobile'), 'header.mobile.logo.second_switch.layout' => array('option', 'header-mobile-second_switch-layout'), 'header.mobile.logo.second_switch' => array('option', 'header-mobile-second_switch-logo', 'mobile'), 'header.mobile.floatin_navigation' => array('option', 'header-mobile-floating_navigation'), 'header.mobile.menu.align' => array('option', 'header-mobile-menu-align', 'left'), 'header.menu.submenu.parent_clickable' => array('option', 'header-menu-submenu-parent_is_clickable', true), 'header.menu.hover.decoration.style' => array('option', 'menu-decoration_style', ''), 'header.decoration' => array('option', 'header-decoration', 'shadow'), 'header.elements.search.caption' => array('option', 'header-elements-search-caption'), 'header.elements.search.icon.enabled' => array('option', 'header-elements-search-icon', true), 'header.elements.login.caption' => array('option', 'header-elements-login-caption'), 'header.elements.logout.caption' => array('option', 'header-elements-logout-caption'), 'header.elements.login.icon.enabled' => array('option', 'header-elements-login-icon', true), 'header.elements.login.url' => array('option', 'header-elements-login-url'))); $sidebar_style = of_get_option('sidebar-visual_style', 'with_dividers'); $config->set('sidebar.style', $sidebar_style); $config->set('sidebar.style.dividers.vertical', 'with_dividers' === $sidebar_style && of_get_option('sidebar-divider-vertical', true)); $config->set('sidebar.style.dividers.horizontal', 'with_widgets_bg' !== $sidebar_style && of_get_option('sidebar-divider-horizontal', true)); $config->set('sidebar.style.background.decoration', of_get_option('sidebar-decoration', 'none')); // footer $footer_style = of_get_option('footer-style', 'full_width_line'); $config->set('template.footer.style', $footer_style); if ('solid_background' == $footer_style) { $footer_slideout_mode = of_get_option('footer-slide-out-mode', false); } else { $footer_slideout_mode = false; } $config->set('template.footer.background.slideout_mode', $footer_slideout_mode); $config->set('template.footer.layout', of_get_option('footer-layout', '1/4+1/4+1/4+1/4')); $config->set('template.footer.decoration', of_get_option('footer-decoration', 'none')); // bottom bar $config->set('template.bottom_bar.style', of_get_option('bottom_bar-style', 'full_width_line')); $config->set('template.bottom_bar.copyrights', of_get_option('bottom_bar-copyrights', '')); $config->set('template.bottom_bar.text', of_get_option('bottom_bar-text', '')); $config->set('template.bottom_bar.credits', of_get_option('bottom_bar-credits', true)); // header layouts $header = 'header-' . $config->get('header.layout') . '-'; $config->map(array('header.elements.enabled' => array('option', "{$header}show_elements"), 'header.elements' => array('option', "{$header}elements"), 'header.is_fullwidth' => array('option', "{$header}is_fullwidth"), 'header.logo.position' => array('option', "{$header}logo-position"), 'header.menu.position' => array('option', "{$header}menu-position"), 'header.menu.items.alignment' => array('option', "{$header}menu-items_alignment"), 'header.menu.items.link' => array('option', "{$header}menu-items_link"), 'header.menu.items.margins.style' => array('option', 'header-menu-item-surround_margins-style'), 'header.menu.background.style' => array('option', "{$header}menu-bg-style"), 'header.menu.show_next_lvl_icons' => array('option', 'header-menu-show_next_lvl_icons', true), 'header.menu.dividers.enabled' => array('option', 'header-menu-show_dividers'), 'header.menu.dividers.surround' => array('option', 'header-menu-dividers-surround'), 'header.menu.decoration.style' => array('option', 'header-menu-decoration-style'), 'header.menu.decoration.style.underline.direction' => array('option', 'header-menu-decoration-underline-direction'), 'header.menu.decoration.style.other.hover.style' => array('option', 'header-menu-decoration-other-hover-style'), 'header.menu.decoration.style.other.hover.line.enabled' => array('option', 'header-menu-decoration-other-hover-line'), 'header.menu.decoration.style.other.active.style' => array('option', 'header-menu-decoration-other-active-style'), 'header.menu.decoration.style.other.active.line.enabled' => array('option', 'header-menu-decoration-other-active-line'), 'header.menu.decoration.style.other.click_decor.enabled' => array('option', 'header-menu-decoration-other-click_decor'), 'header.menu.decoration.style.other.links.is_justified' => array('option', 'header-menu-decoration-other-links-is_justified'), 'header.menu.hover.color.style' => array('option', 'header-menu-hover-font-color-style'), 'header.menu.submenu.hover.color.style' => array('option', 'header-menu-submenu-hover-font-color-style'), 'header.menu.submenu.show_next_lvl_icons' => array('option', 'header-menu-submenu-show_next_lvl_icons', true), 'header.menu.submenu.background.hover.style' => array('option', 'header-menu-submenu-bg-hover'), 'header.content.position' => array('option', "{$header}content-position"), 'header.position' => array('option', "{$header}position"), 'header.layout.slide_out.animation' => array('option', "{$header}overlay-animation"), 'header.layout.slide_out.x_cursor.enabled' => array('option', 'header-slide_out-overlay-x_cursor'), 'header.layout.slide_out.blur.enabled' => array('option', 'header-slide_out-overlay-blur'), 'header.layout.side.menu.submenu.position' => array('option', 'header-side-menu-submenu-position'), 'header.decoration' => array('option', 'header-decoration'), 'header.mixed.decoration' => array('option', 'header-mixed-decoration'), 'header.mixed.view' => array('option', "{$header}layout"), 'header.mixed.view.menu_icon.floating_logo.enabled' => array('option', "{$header}layout-menu_icon-show_floating_logo"), 'header.mixed.view.top_line.is_fullwidth' => array('option', "{$header}layout-top_line-is_fullwidth"), 'header.mixed.view.top_line.logo.position' => array('option', "{$header}layout-top_line-logo-position"), 'header.mixed.view.side_line.position' => array('option', "{$header}layout-side_line-position"))); }
*/ // File Security Check if (!defined('ABSPATH')) { exit; } if ('disabled' == presscore_config()->get('sidebar_position')) { return; } $sidebar = presscore_config()->get('sidebar_widgetarea_id'); // default sidebar if (!$sidebar) { $sidebar = apply_filters('presscore_default_sidebar', 'sidebar_1'); } // disable widget dividers $dividers_off = ''; if (!presscore_config()->get('sidebar.style.dividers.horizontal')) { $dividers_off = ' widget-divider-off'; } if (is_active_sidebar($sidebar)) { ?> <aside id="sidebar" <?php echo presscore_sidebar_html_class('sidebar'); ?> > <div class="sidebar-content<?php echo $dividers_off; ?> "> <?php do_action('presscore_before_sidebar_widgets');