Exemplo n.º 1
0
 /**
  * Register sidebars
  */
 public function register_sidebars()
 {
     foreach ($this->sidebars as $id => $name) {
         foreach ($this->places as $place) {
             register_sidebar(array('id' => $id . '-' . $place, 'name' => $name . " ({$place})", 'description' => $name . " ({$place})", 'before_widget' => '<section id="%1$s" class="widget %2$s">', 'after_widget' => '</section>', 'before_title' => apply_filters('wpv_before_widget_title', '<h4 class="widget-title">', 'body'), 'after_title' => apply_filters('wpv_after_widget_title', '</h4>', 'body')));
         }
     }
     for ($i = 1; $i <= (int) wpv_get_option('footer-sidebars'); $i++) {
         register_sidebar(array('id' => "footer-sidebars-{$i}", 'name' => "Footer widget area {$i}", 'description' => "Footer widget area {$i}", 'before_widget' => '<section id="%1$s" class="widget %2$s">', 'after_widget' => '</section>', 'before_title' => apply_filters('wpv_before_widget_title', '<h4 class="widget-title">', 'footer'), 'after_title' => apply_filters('wpv_after_widget_title', '</h4>', 'footer')));
     }
     for ($i = 1; $i <= (int) wpv_get_option('header-sidebars'); $i++) {
         register_sidebar(array('id' => "header-sidebars-{$i}", 'name' => "Body Top Widget Area {$i}", 'description' => "Body top widget area {$i}", 'before_widget' => '<section id="%1$s" class="widget %2$s">', 'after_widget' => '</section>', 'before_title' => apply_filters('wpv_before_widget_title', '<h4 class="widget-title">', 'header'), 'after_title' => apply_filters('wpv_after_widget_title', '</h4>', 'header')));
     }
     if (wpv_get_option('feedback-type') == 'sidebar') {
         register_sidebar(array('id' => "feedback-sidebar", 'name' => "Feedback Widget Area", 'description' => "Slides out when the feedback button is clicked", 'before_widget' => '<section id="%1$s" class="widget %2$s">', 'after_widget' => '</section>', 'before_title' => apply_filters('wpv_before_widget_title', '<h4 class="widget-title">', 'feedback'), 'after_title' => apply_filters('wpv_after_widget_title', '</h4>', 'feedback')));
     }
     $custom_sidebars = wpv_get_option('custom-sidebars');
     $custom_sidebars = explode(',', $custom_sidebars);
     foreach ($custom_sidebars as $sidebar) {
         $name = str_replace('wpv_sidebar-', '', $sidebar);
         $sidebar = sanitize_title($sidebar);
         if (!empty($sidebar)) {
             foreach ($this->places as $place) {
                 register_sidebar(array('id' => $sidebar . '-' . $place, 'name' => "{$name} ({$place})", 'description' => "{$name} ({$place})", 'before_widget' => '<section id="%1$s" class="widget %2$s">', 'after_widget' => '</section>', 'before_title' => apply_filters('wpv_before_widget_title', '<h4 class="widget-title">', 'body'), 'after_title' => apply_filters('wpv_after_widget_title', '</h4>', 'body'), 'class' => 'vamtam-custom'));
             }
         }
     }
 }
 public static function header_layout($layout)
 {
     $logo_type = wpv_get_option('header-logo-type');
     if ($logo_type === 'names') {
         return 'standard';
     }
     return $layout;
 }
Exemplo n.º 3
0
/**
 * Same as wpv_get_option, but echoes the value instead of returning it
 *
 * @uses   wpv_get_option()
 *
 * @param  string $name option   name
 * @param  mixed  $default       default value
 * @param  bool   $stripslashes  whether to filter the result with stripslashes()
 * @param  boolean $boolean      whether to cast the value to bool
 */
function wpvge($name, $default = null, $stripslashes = true, $boolean = false)
{
    $opt = wpv_get_option($name, $default, $stripslashes);
    if ($boolean === true) {
        $opt = (bool) $opt;
    }
    echo $opt;
}
 /**
  * checks if the theme has been updated
  * and the update message has not been dismissed
  */
 public static function check()
 {
     $current_version = WpvFramework::get_version();
     $last_known_version = get_option(THEME_SLUG . self::$last_version_key);
     if ($current_version !== $last_known_version || !wpv_get_option('theme-update-notice-dismissed')) {
         $GLOBALS['wpv_only_smart_less_compilation'] = true;
         $status = wpv_finalize_custom_css();
         if ('smart less failed' === trim($status)) {
             add_action('admin_notices', array(__CLASS__, 'after_update_notice'));
             add_action('wpv_after_save_theme_options', array(__CLASS__, 'dismiss_notice'));
             wpv_update_option('last-theme-version', $current_version);
             wpv_update_option('theme-update-notice-dismissed', false);
         } else {
             self::dismiss_notice();
         }
     }
 }
Exemplo n.º 5
0
function wpv_save_config($options)
{
    if (isset($_POST['doreset'])) {
        echo 'Deleting... ';
    }
    foreach ($options as $option) {
        if (isset($option['id']) && !empty($option['id'])) {
            wpv_save_option_by_id($option['id'], $option['type']);
        } elseif ($option['type'] == 'select_checkbox') {
            wpv_save_option_by_id($option['id_select'], 'select_checkbox');
            wpv_save_option_by_id($option['id_checkbox'], 'select_checkbox');
        } elseif ($option['type'] == 'social') {
            $places = array('post', 'page', 'portfolio', 'lightbox', 'product', 'tribe');
            $networks = array('twitter', 'facebook', 'googleplus', 'pinterest');
            foreach ($places as $place) {
                foreach ($networks as $network) {
                    wpv_save_option_by_id("share-{$place}-{$network}", 'social');
                }
            }
        } elseif ($option['type'] == 'horizontal_blocks') {
            $id = $option['id_prefix'];
            wpv_update_option($id, $_POST[$id]);
            for ($i = 1; $i <= $_POST["{$id}-max"]; $i++) {
                wpv_save_option_by_id("{$id}-{$i}-width", 'select');
                wpv_save_option_by_id("{$id}-{$i}-last", 'checkbox');
                wpv_save_option_by_id("{$id}-{$i}-empty", 'checkbox');
            }
        } elseif ($option['type'] == 'color-row') {
            foreach ($option['inputs'] as $id => $name) {
                wpv_save_option_by_id($id, 'color');
            }
        } elseif ($option['type'] == 'select-row') {
            foreach ($option['selects'] as $id => $name) {
                wpv_save_option_by_id($id, 'select');
            }
        }
        if (isset($option['process']) && function_exists($option['process'])) {
            wpv_update_option($option['id'], $option['process']($option, wpv_get_option($option['id'])));
        }
    }
    do_action('vamtam_saved_options');
    return wpv_finalize_custom_css();
}
Exemplo n.º 6
0
 /**
  * Initialize the theme admin
  */
 public function __construct()
 {
     $this->option_pages = array('general' => array(__('VamTam | General Settings', 'church-event'), __('General Settings', 'church-event')), 'layout' => array(__('VamTam | Layout', 'church-event'), __('Layout', 'church-event')), 'styles' => array(__('VamTam | Styles', 'church-event'), __('Styles', 'church-event')), 'import' => array(__('VamTam | Quick Import', 'church-event'), __('Quick Import', 'church-event')), 'help' => array(__('VamTam | help', 'church-event'), __('Help', 'church-event')));
     add_action('admin_init', array('WpvUpdateNotice', 'check'));
     add_action('admin_footer', array(__CLASS__, 'icons_selector'));
     add_action('admin_menu', array(&$this, 'load_menus'));
     add_action('menu_order', array(&$this, 'reorder_menus'));
     add_action('add_meta_boxes', array(&$this, 'load_metaboxes'));
     add_action('save_post', array(&$this, 'load_metaboxes'));
     add_action('sidebar_admin_setup', array(&$this, 'sidebar_admin_setup'));
     add_action('wp_ajax_wpv-delete-widget-area', array('WpvSidebarInterface', 'delete_widget_area'));
     add_filter('admin_notices', array(__CLASS__, 'update_warning'));
     require_once WPV_ADMIN_METABOXES . 'shortcode.php';
     $this->load_functions();
     new WpvSkinManagement();
     new WpvIconsHelper();
     new WpvFontsHelper();
     require_once WPV_ADMIN_HELPERS . 'updates/version-checker.php';
     if (!wpv_get_option(THEME_SLUG . '_vamtam_theme_activated', false)) {
         wpv_update_option(THEME_SLUG . '_vamtam_theme_activated', true);
         delete_option('default_comment_status');
     }
 }
Exemplo n.º 7
0
<?php

/**
 * Vamtam Post Options
 *
 * @package wpv
 * @subpackage honeymoon
 */
return array(array('name' => __('Layout and Styles', 'honeymoon'), 'type' => 'separator'), array('name' => __('Page Slider', 'honeymoon'), 'desc' => __('In the drop down you will see the sliders that you have created. Please note that the theme uses Revolution Slider and its option panel is found in the WordPress navigation menu on the left.', 'honeymoon'), 'id' => 'slider-category', 'type' => 'select', 'default' => '', 'prompt' => __('Disabled', 'honeymoon'), 'options' => WpvTemplates::get_all_sliders(), 'class' => 'fbport fbport-disabled'), array('name' => __('Show Splash Screen', 'honeymoon'), 'desc' => __('This option is usuful if you have video background,
		 featured slider, galleries or other pages that will load considarable amount of time.', 'honeymoon'), 'id' => 'show-splash-screen', 'type' => 'toggle', 'default' => false), array('name' => __('Header Featured Area', 'honeymoon'), 'desc' => __('This option is only active if you have disabled the header slider. You can place plain text or HTML into it.', 'honeymoon'), 'id' => 'page-middle-header-content', 'type' => 'textarea', 'default' => '', 'class' => 'fbport fbport-disabled'), array('name' => __('Full Width Header Featured Area', 'honeymoon'), 'desc' => __('Extend the featured area to the end of the screen. This is basicly a full screen mode.', 'honeymoon'), 'id' => 'page-middle-header-content-fullwidth', 'type' => 'toggle', 'default' => 'false'), array('name' => __('Header Featured Area Minimum Height', 'honeymoon'), 'desc' => __('Please note that this option does not affect the slider height. The slider height is controled from the LayerSlider option panel.', 'honeymoon'), 'id' => 'page-middle-header-min-height', 'type' => 'range', 'default' => 0, 'min' => 0, 'max' => 1000, 'unit' => 'px', 'class' => 'fbport fbport-disabled'), array('name' => __('Featured Area / Slider Background', 'honeymoon'), 'desc' => __('This option is used for the featured area, header slider and the Ajax portfolio slider.<br>If you want to use an image as a background, enabling the cover button will resize and crop the image so that it will always fit the browser window on any resolution.', 'honeymoon'), 'id' => 'local-title-background', 'type' => 'background', 'show' => 'color,image,repeat,size', 'class' => 'fbport fbport-disabled fbport-page'), array('name' => __('Sticky Header Behaviour', 'honeymoon'), 'id' => 'sticky-header-type', 'type' => 'select', 'default' => 'normal', 'desc' => __('Please make sure you have the sticky header enabled in theme options - layout - header.', 'honeymoon'), 'options' => array('normal' => __('Normal', 'honeymoon'), 'over' => __('Over the page content', 'honeymoon'), 'half-over' => __('Bottom half over the page content', 'honeymoon')), 'class' => 'fbport fbport-disabled'), array('name' => __('Show Page Title Area', 'honeymoon'), 'desc' => __('Enables the area used by the page title.', 'honeymoon'), 'id' => 'show-page-header', 'type' => 'toggle', 'default' => true, 'class' => 'fbport fbport-disabled'), array('name' => __('Page Title Background', 'honeymoon'), 'id' => 'local-page-title-background', 'type' => 'background', 'show' => 'color,image,repeat,size', 'class' => 'fbport fbport-disabled'), array('name' => __('Description', 'honeymoon'), 'desc' => __('The text will appear next or bellow the title of the page, only if the option above is enabled.', 'honeymoon'), 'id' => 'description', 'type' => 'textarea', 'default' => ''), array('name' => __('Show Body Top Widget Areas', 'honeymoon'), 'desc' => __('The layout of these areas can be configured from "Vamtam" -> "Layout" -> "Body". In Appearance => Widgets you populate them with widgets.', 'honeymoon'), 'image' => WPV_ADMIN_ASSETS_URI . 'images/header-sidebars-3.png', 'id' => 'show_header_sidebars', 'type' => 'toggle', 'default' => wpv_get_option('has-header-sidebars'), 'has_default' => true, 'class' => 'fbport fbport-disabled', 'only' => 'page,post,portfolio,product'), array('name' => __('Page Layout Type', 'honeymoon'), 'desc' => __('The sidebars are placed just below the page title. You can choose one of the predefined layouts.', 'honeymoon'), 'id' => 'layout-type', 'type' => 'body-layout', 'only' => 'page,post,portfolio,product,tribe_events,events', 'default' => 'default', 'has_default' => true, 'class' => 'fbport fbport-disabled'), array('name' => __('Custom Sidebars', 'honeymoon'), 'desc' => __('This option correlates with the one above. If you have custom sidebars created, you will enable them by selecting them in the drop-down menu. Otherwise the page default sidebars will be used.', 'honeymoon'), 'type' => 'select-row', 'selects' => array('left_sidebar_type' => array('desc' => __('Left:', 'honeymoon'), 'prompt' => __('Default', 'honeymoon'), 'target' => 'sidebars', 'default' => false), 'right_sidebar_type' => array('desc' => __('Right:', 'honeymoon'), 'prompt' => __('Default', 'honeymoon'), 'target' => 'sidebars', 'default' => false)), 'class' => 'fbport fbport-disabled'), array('name' => __('Page Background', 'honeymoon'), 'desc' => __('Please note that this option is used only in boxed layout mode.<br>
In full width layout mode the page background is covered by the header, slider, body and footer backgrounds respectively. If the color opacity of these areas is 1 or an opaque image is used, the page background won\'t be visible.<br>
If you want to use an image as a background, enabling the cover button will resize and crop the image so that it will always fit the browser window on any resolution.<br>
You can override this option on a page by page basis.', 'honeymoon'), 'id' => 'background', 'type' => 'background', 'show' => 'color,image,repeat,size,attachment'), array('name' => __('Use Bottom Padding on This Page', 'honeymoon'), 'desc' => __('If you disable this option, the last element will stick to the footer. Useful for parallax pages.', 'honeymoon'), 'id' => 'use-page-bottom-padding', 'type' => 'toggle', 'default' => true, 'class' => 'fbport fbport-disabled'));
 public static function system_status()
 {
     if (wpv_get_option('system-status-opt-out')) {
         return array('disabled' => true);
     }
     $result = array('disabled' => false, 'wp_debug' => WP_DEBUG, 'wp_debug_display' => WP_DEBUG_DISPLAY, 'wp_debug_log' => WP_DEBUG_LOG, 'active_plugins' => array(), 'writable' => array(), 'ziparchive' => class_exists('ZipArchive'));
     if (function_exists('ini_get')) {
         $result['post_max_size'] = ini_get('post_max_size');
         $result['max_input_vars'] = ini_get('max_input_vars');
         $result['max_execution_time'] = ini_get('max_execution_time');
         $result['memory_limit'] = ini_get('memory_limit');
     }
     $active_plugins = self::active_plugins();
     foreach ($active_plugins as $plugin) {
         $plugin_data = @get_plugin_data(WP_PLUGIN_DIR . '/' . $plugin);
         $result['active_plugins'][$plugin] = array('name' => $plugin_data['Name'], 'version' => $plugin_data['Version'], 'author' => $plugin_data['AuthorName']);
     }
     $result['writable'][WPV_CACHE_DIR] = is_writable(WPV_CACHE_DIR);
     $dir = opendir(WPV_CACHE_DIR);
     while ($file = readdir($dir)) {
         if ($file !== '.' && $file !== '..' && preg_match('/\\.css|less$/', $file)) {
             $filepath = WPV_CACHE_DIR . $file;
             $result['writable'][$filepath] = is_writable($filepath);
         }
     }
     $response = wp_remote_post(THEME_URI . 'utils/lessc-spawn.php');
     if (!is_wp_error($response) && $response['response']['code'] >= 200 && $response['response']['code'] < 300) {
         $result['wp_remote_post'] = 'OK';
     } elseif (is_wp_error($response)) {
         $result['wp_remote_post'] = 'NOT OK - ' . $response->get_error_message();
     } else {
         $result['wp_remote_post'] = 'NOT OK - unknown error';
     }
     return $result;
 }
Exemplo n.º 9
0
			<a href="#" id="feedback" class="slideout icon" ><?php 
        wpv_icon('pencil');
        ?>
</a>
		<?php 
    } else {
        ?>
			<a href="<?php 
        wpvge('feedback-link');
        ?>
" id="feedback" class="icon"><?php 
        wpv_icon('pencil');
        ?>
</a>
		<?php 
    }
    ?>
	</div>
<?php 
}
?>

<?php 
if (wpv_get_option('show_scroll_to_top')) {
    ?>
	<div id="scroll-to-top" class="icon"><?php 
    wpv_icon('arrow-up3');
    ?>
</div>
<?php 
}
Exemplo n.º 10
0
 * Actual, visible header. Includes the logo, menu, etc.
 * @package wpv
 */
$layout = wpv_get_option('header-layout');
if (is_page_template('page-blank.php')) {
    return;
}
?>
<div class="fixed-header-box">
	<header class="main-header layout-<?php 
echo $layout;
?>
 <?php 
if ($layout === 'logo-menu') {
    echo 'header-content-wrapper';
}
?>
 ">
		<?php 
get_template_part('templates/header/top/nav');
?>
		<?php 
get_template_part('templates/header/top/main', wpv_get_option('header-layout'));
?>
	</header>

	<?php 
do_action('wpv_header_box');
?>
</div><!-- / .fixed-header-box -->
<div class="shadow-bottom"></div>
Exemplo n.º 11
0
 private static function get_sidebars_list()
 {
     return explode(',', wpv_get_option('custom-sidebars'));
 }
Exemplo n.º 12
0
<?php

global $wpv_fonts;
$current_size = wpv_get_option($id . '-size');
$current_lheight = wpv_get_option($id . '-lheight');
$current_face = wpv_get_option($id . '-face');
$current_weight = wpv_get_option($id . '-weight');
$current_color = wpv_get_option($id . '-color');
$weights = array('300', '300 italic', 'normal', 'italic', '600', '600 italic', 'bold', 'bold italic', '800', '800 italic');
if (!isset($only)) {
    $only = array();
} else {
    $only = explode(',', $only);
}
$show = new stdClass();
$show->size = in_array('size', $only) || sizeof($only) == 0 ? '' : 'hidden';
$show->size_lheight_sep = in_array('size', $only) && in_array('lheight', $only) || sizeof($only) == 0 ? '' : 'hidden';
$show->lheight = in_array('lheight', $only) || sizeof($only) == 0 ? '' : 'hidden';
$show->face = in_array('face', $only) || sizeof($only) == 0 ? '' : 'hidden';
$show->weight = in_array('weight', $only) || sizeof($only) == 0 ? '' : 'hidden';
$show->color = in_array('color', $only) || sizeof($only) == 0 ? '' : 'hidden';
?>

<div class="wpv-config-row font clearfix <?php 
echo $class;
?>
">
	<?php 
if (isset($name)) {
    ?>
		<div class="rtitle">
Exemplo n.º 13
0
<?php

/**
 * adds several links that allow the user to easily set several predefined options
 */
$available_layouts = array('full', 'left-only', 'right-only', 'left-right');
$selected = wpv_get_option($id, $default);
?>

<div class="wpv-config-row body-layout <?php 
if (isset($class)) {
    echo esc_attr($class);
}
?>
">
	<div class="rtitle">
		<h4><?php 
echo $name;
?>
</h4>

		<?php 
wpv_description($id, $desc);
?>
	</div>

	<div class="rcontent">
		<?php 
foreach ($available_layouts as $layout) {
    ?>
			<span class="layout-type">
Exemplo n.º 14
0
 /**
  * Registers post types
  */
 private function load_types()
 {
     // portfolios
     register_post_type('portfolio', array('labels' => array('name' => _x('Portfolios', 'post type general name', 'church-event'), 'singular_name' => _x('Portfolio', 'post type singular name', 'church-event'), 'add_new' => _x('Add New', 'portfolio', 'church-event'), 'add_new_item' => __('Add New Portfolio', 'church-event'), 'edit_item' => __('Edit Portfolio', 'church-event'), 'new_item' => __('New Portfolio', 'church-event'), 'view_item' => __('View Portfolio', 'church-event'), 'search_items' => __('Search Portfolios', 'church-event'), 'not_found' => __('No portfolios found', 'church-event'), 'not_found_in_trash' => __('No portfolios found in Trash', 'church-event'), 'parent_item_colon' => ''), 'singular_label' => __('portfolio', 'church-event'), 'public' => true, 'exclude_from_search' => false, 'show_ui' => true, 'capability_type' => 'post', 'hierarchical' => false, 'rewrite' => array('with_front' => false, 'slug' => wpv_get_option('portfolio-slug')), 'query_var' => false, 'menu_position' => '55.4', 'supports' => array('comments', 'editor', 'excerpt', 'page-attributes', 'thumbnail', 'title')));
     register_taxonomy('portfolio_category', 'portfolio', array('hierarchical' => true, 'labels' => array('name' => _x('Portfolio Categories', 'taxonomy general name', 'church-event'), 'singular_name' => _x('Portfolio Category', 'taxonomy singular name', 'church-event'), 'search_items' => __('Search Portfolio Categories', 'church-event'), 'popular_items' => __('Popular Portfolio Categories', 'church-event'), 'all_items' => __('All Portfolio Categories', 'church-event'), 'parent_item' => null, 'parent_item_colon' => null, 'edit_item' => __('Edit Portfolio Category', 'church-event'), 'update_item' => __('Update Portfolio Category', 'church-event'), 'add_new_item' => __('Add New Portfolio Category', 'church-event'), 'new_item_name' => __('New Portfolio Category Name', 'church-event'), 'separate_items_with_commas' => __('Separate Portfolio category with commas', 'church-event'), 'add_or_remove_items' => __('Add or remove portfolio category', 'church-event'), 'choose_from_most_used' => __('Choose from the most used portfolio category', 'church-event')), 'show_ui' => true, 'query_var' => true, 'rewrite' => false));
     register_post_type('testimonials', array('labels' => array('name' => _x('Testimonials', 'post type general name', 'church-event'), 'singular_name' => _x('Testimonial', 'post type singular name', 'church-event'), 'add_new' => _x('Add New', 'testimonials', 'church-event'), 'add_new_item' => __('Add New Testimonial', 'church-event'), 'edit_item' => __('Edit Testimonial', 'church-event'), 'new_item' => __('New Testimonial', 'church-event'), 'view_item' => __('View Testimonial', 'church-event'), 'search_items' => __('Search Testimonials', 'church-event'), 'not_found' => __('No testimonials found', 'church-event'), 'not_found_in_trash' => __('No testimonials found in Trash', 'church-event'), 'parent_item_colon' => ''), 'singular_label' => __('testimonial', 'church-event'), 'public' => true, 'publicly_queryable' => false, 'exclude_from_search' => true, 'show_ui' => true, 'show_in_nav_menus' => false, 'capability_type' => 'post', 'hierarchical' => false, 'menu_position' => '55.3', 'supports' => array('title', 'editor', 'excerpt', 'thumbnail', 'comments', 'page-attributes')));
     register_taxonomy('testimonials_category', 'testimonials', array('hierarchical' => true, 'labels' => array('name' => _x('Testimonials Category', 'taxonomy general name', 'church-event'), 'singular_name' => _x('Testimonial Category', 'taxonomy singular name', 'church-event'), 'search_items' => __('Search Categories', 'church-event'), 'popular_items' => __('Popular Categories', 'church-event'), 'all_items' => __('All Categories', 'church-event'), 'parent_item' => null, 'parent_item_colon' => null, 'edit_item' => __('Edit Testimonials Category', 'church-event'), 'update_item' => __('Update Testimonials Category', 'church-event'), 'add_new_item' => __('Add New Testimonials Category', 'church-event'), 'new_item_name' => __('New Testimonials Category Name', 'church-event'), 'separate_items_with_commas' => __('Separate Testimonials category with commas', 'church-event'), 'add_or_remove_items' => __('Add or remove testimonials category', 'church-event'), 'choose_from_most_used' => __('Choose from the most used testimonials category', 'church-event')), 'show_ui' => true, 'query_var' => false, 'rewrite' => false));
     if (wpv_get_option('portfolio-slug') !== wpv_get_option('previous-portfolio-slug')) {
         flush_rewrite_rules();
         wpv_update_option('previous-portfolio-slug', wpv_get_option('portfolio-slug'));
     }
 }
Exemplo n.º 15
0
		<?php 
        if (wpv_get_optionb('show-related-posts') && is_singular('post')) {
            ?>
			<?php 
            $terms = array();
            $cats = get_the_category();
            foreach ($cats as $cat) {
                $terms[] = $cat->term_id;
            }
            ?>
			<div class="related-posts">
				<div class="clearfix">
					<div class="grid-1-1">
						<?php 
            echo apply_filters('wpv_related_posts_title', '<h2 class="related-content-title">' . wpv_get_option('related-posts-title') . '</h3>');
            ?>
						<?php 
            echo WPV_Blog::shortcode(array('count' => 8, 'column' => 4, 'cat' => $terms, 'layout' => 'scroll-x', 'show_content' => true, 'post__not_in' => get_the_ID()));
            ?>
					</div>
				</div>
			</div>
		<?php 
        }
        if (!wpv_is_reduced_response()) {
            ?>
	</div>
<?php 
        }
    }
Exemplo n.º 16
0
        do_action('wpv_before_sub_footer');
        ?>

				<?php 
        if (wpv_get_option('credits') != '') {
            ?>
					<div class="copyrights">
						<div class="<?php 
            if (!wpv_get_option('full-width-header')) {
                echo 'limit-wrapper';
            }
            ?>
">
							<div class="row">
								<?php 
            echo do_shortcode(wpv_get_option('credits'));
            ?>
							</div>
						</div>
					</div>
				<?php 
        }
        ?>
			<?php 
    }
    ?>

		</div><!-- / .pane-wrapper -->

<?php 
}
Exemplo n.º 17
0
    echo apply_filters('wpv_share_class', 'share-btns');
    ?>
">
	<div class="sep-3"></div>
	<ul class="socialcount" data-url="<?php 
    esc_attr_e(get_permalink());
    ?>
" data-share-text="<?php 
    esc_attr_e(get_the_title());
    ?>
" data-media="">
		<?php 
    foreach ($networks as $slug => $cfg) {
        ?>
			<?php 
        if (wpv_get_option("share-{$context}-{$slug}")) {
            ?>
				<li class="<?php 
            echo $slug;
            ?>
">
					<a href="<?php 
            echo $cfg['link'];
            echo urlencode(get_permalink());
            ?>
" title="<?php 
            esc_attr_e($cfg['title']);
            ?>
">
						<?php 
            echo do_shortcode("[icon name='{$slug}']");
Exemplo n.º 18
0
 * @package wpv
 */
$layout = wpv_get_option('top-bar-layout');
$layout = !empty($layout) ? explode('-', $layout) : null;
if ($layout) {
    ?>
	<div id="top-nav-wrapper">
		<?php 
    do_action('wpv_top_nav_before');
    ?>
		<nav class="top-nav <?php 
    echo implode('-', $layout);
    ?>
">
			<div class="<?php 
    if (wpv_get_option('header-layout') != 'logo-menu' || !wpv_get_option('full-width-header')) {
        echo 'limit-wrapper';
    }
    ?>
 top-nav-inner">
				<div class="row">
					<div class="row">
						<?php 
    foreach ($layout as $part) {
        get_template_part('templates/header/top/nav', $part);
    }
    ?>
					</div>
				</div>
			</div>
		</nav>
Exemplo n.º 19
0
 * @package  wpv
 */
global $wpv_title;
if (!is_404()) {
    if (wpv_has_woocommerce() && is_woocommerce() && !is_single()) {
        if (is_product_category()) {
            $wpv_title = single_cat_title('', false);
        } elseif (is_product_tag()) {
            $wpv_title = single_tag_title('', false);
        } else {
            $wpv_title = woocommerce_get_page_id('shop') ? get_the_title(woocommerce_get_page_id('shop')) : '';
        }
    }
}
$page_header_bg = WpvTemplates::page_header_background();
$global_page_header_bg = wpv_get_option('page-title-background-image') . wpv_get_option('page-title-background-color');
if (!WpvTemplates::has_breadcrumbs() && !WpvTemplates::has_page_header() && !WpvTemplates::has_post_siblings_buttons() || is_404() && (!function_exists('tribe_is_event_query') || !tribe_is_event_query())) {
    return;
}
if (is_page_template('page-blank.php')) {
    return;
}
?>
<div id="sub-header" class="layout-<?php 
echo WpvTemplates::get_layout();
?>
 <?php 
if (!empty($page_header_bg) || !empty($global_page_header_bg)) {
    echo 'has-background';
}
?>
 function wpv_tribe_single_upcoming()
 {
     echo do_shortcode(wpv_get_option('events-after-sidebars-2-content'));
 }
Exemplo n.º 21
0
 /**
  * Front-end styles
  */
 public function styles()
 {
     if (is_admin() || WpvTemplates::is_login()) {
         return;
     }
     $theme_version = WpvFramework::get_version();
     $external_fonts = maybe_unserialize(wpv_get_option('external-fonts'));
     if (is_array($external_fonts) && !empty($external_fonts)) {
         foreach ($external_fonts as $name => $url) {
             wp_enqueue_style('wpv-' . $name, $url, array(), $theme_version);
         }
     }
     wp_enqueue_style('front-magnific-popup', wpv_prepare_url(WPV_THEME_CSS . 'magnific.css'));
     $cache_timestamp = wpv_get_option('css-cache-timestamp');
     $generated_deps = array('front-magnific-popup');
     if (wpv_has_woocommerce()) {
         $generated_deps[] = 'woocommerce-layout';
         $generated_deps[] = 'woocommerce-smallscreen';
         $generated_deps[] = 'woocommerce-general';
     }
     if (class_exists('Tribe__Events__Main') && (tribe_is_event_query() || tribe_is_event_organizer() || tribe_is_event_venue())) {
         $generated_deps[] = 'tribe-events-calendar-style';
         $generated_deps[] = 'tribe-events-full-calendar-style';
     }
     $suffix = is_multisite() ? $GLOBALS['blog_id'] : '';
     $css_file = 'all' . $suffix . '.css';
     $css_path = WPV_CACHE_URI . $css_file;
     if (!file_exists(WPV_CACHE_DIR . $css_file)) {
         $css_path = WPV_SAMPLES_URI . 'all-default.css';
     }
     wp_enqueue_style('front-all', wpv_prepare_url($css_path), $generated_deps, $cache_timestamp);
     global $wpv_is_shortcode_preview;
     if ($wpv_is_shortcode_preview) {
         wp_enqueue_style('vamtam-shortcode-preview', WPV_ADMIN_ASSETS_URI . 'css/shortcode-preview.css');
     }
     $custom_icons = get_option('vamtam-custom-icons-map');
     if ($custom_icons) {
         $icons_path = trailingslashit(WP_CONTENT_URL) . 'vamtam/custom-icon-font/';
         $custom_icons_css = "\n\t\t\t\t@font-face {\n\t\t\t\t\tfont-family: 'vamtam-custom-icons';\n\t\t\t\t\tsrc: url({$icons_path}custom-icons.eot);\n\t\t\t\t\tsrc: url({$icons_path}custom-icons.eot?#iefix) format('embedded-opentype'),\n\t\t\t\t\t\turl({$icons_path}custom-icons.ttf) format('truetype');\n\t\t\t\t\tfont-weight: normal;\n\t\t\t\t\tfont-style: normal;\n\t\t\t\t}\n\t\t\t";
         wp_add_inline_style('front-all', $custom_icons_css);
     }
 }
Exemplo n.º 22
0
 /**
  * Check if the current context has share buttons
  *
  * @param  string  $context current view ( page, post, etc. )
  * @return boolean          whether the current context has share buttons
  */
 public static function has_share($context)
 {
     return apply_filters('wpv_has_share', wpv_get_option("share-{$context}-twitter") || wpv_get_option("share-{$context}-facebook") || wpv_get_option("share-{$context}-googleplus") || wpv_get_option("share-{$context}-pinterest"), $context);
 }
Exemplo n.º 23
0
function theme_body_classes($body_class)
{
    global $wpv_has_header_sidebars, $post, $wpv_is_shortcode_preview;
    $is_blank_page = is_page_template('page-blank.php');
    $has_header_slider = WpvTemplates::has_header_slider();
    $wpv_has_header_sidebars = wpv_post_meta_default('show_header_sidebars', 'has-header-sidebars');
    $has_page_header = (WpvTemplates::has_page_header() || WpvTemplates::has_post_siblings_buttons()) && !is_404();
    $body_class[] = $is_blank_page ? 'full' : wpv_get_option('site-layout-type');
    $body_class[] = 'pagination-' . wpv_get_option('pagination-type');
    $body_class[] = is_singular(WpvFramework::$complex_layout) ? 'sticky-header-type-' . wpv_post_meta(null, 'sticky-header-type', true) : '';
    $body_class[] = 'wpv-not-scrolled';
    $body_class_conditions = array('no-page-header' => !$has_page_header, 'has-page-header' => $has_page_header, 'cbox-share-twitter' => wpv_get_optionb('share-lightbox-twitter'), 'cbox-share-facebook' => wpv_get_optionb('share-lightbox-facebook'), 'cbox-share-googleplus' => wpv_get_optionb('share-lightbox-googleplus'), 'cbox-share-pinterest' => wpv_get_optionb('share-lightbox-pinterest'), 'fixed-header' => wpv_get_optionb('fixed-header'), 'has-header-slider' => $has_header_slider, 'has-header-sidebars' => $wpv_has_header_sidebars, 'no-header-slider' => !$has_header_slider, 'no-header-sidebars' => !$wpv_has_header_sidebars, 'no-footer-sidebars' => !wpv_get_optionb('has-footer-sidebars'), 'responsive-layout' => WPV_RESPONSIVE, 'fixed-layout' => !WPV_RESPONSIVE, 'has-breadcrumbs' => wpv_get_optionb('enable-breadcrumbs'), 'no-breadcrumbs' => !wpv_get_optionb('enable-breadcrumbs'), 'no-slider-button-thumbnails' => !wpv_get_optionb('header-slider-button-thumbnails'), 'sticky-header' => wpv_get_optionb('sticky-header'), 'no-page-bottom-padding' => wpv_post_meta(null, 'use-page-bottom-padding', true) == 'false', 'vamtam-shortcode-tooltip-preview' => $wpv_is_shortcode_preview && strpos($GLOBALS['wpv_current_shortcode'], '[tooltip') !== false);
    foreach ($body_class_conditions as $class => $cond) {
        if ($cond) {
            $body_class[] = $class;
        }
    }
    if (is_archive() || is_search() || get_query_var('format_filter')) {
        define('WPV_ARCHIVE_TEMPLATE', true);
    }
    return $body_class;
}
Exemplo n.º 24
0
 function wpv_customcss()
 {
     $styles = wpv_get_option('custom_css');
     if (empty($styles)) {
         return;
     }
     wp_add_inline_style('front-all', $styles);
 }
Exemplo n.º 25
0
"><?php 
echo $name;
?>
</label>
		</h4>

		<?php 
wpv_description($id, $desc);
?>
	</div>

	<div class="rcontent">
		<textarea id="<?php 
echo $id;
?>
" rows="<?php 
echo $rows;
?>
" name="<?php 
echo $id;
?>
" class="large-text code <?php 
wpv_static($value);
?>
"><?php 
echo wpv_get_option($id, $default);
?>
</textarea>
	</div>
</div>
Exemplo n.º 26
0
<div class="grid-1-2" id="top-nav-text">
	<?php 
echo do_shortcode(wpv_get_option('top-bar-text'));
?>
</div>
				</div>
			<?php 
}
?>

			<div class="header-center">
				<div id="menus">
					<?php 
get_template_part('templates/header/top/main-menu');
?>
				</div>
			</div>

			<?php 
do_action('wpv_header_cart');
?>

			<?php 
if (wpv_get_option('enable-header-search')) {
    ?>
				<div class="header-right">
					<?php 
    get_template_part('templates/header/top/search-button');
    ?>
				</div>
			<?php 
}
?>
		</div>
	</div>
</div>
Exemplo n.º 28
0
function wpv_ga_script()
{
    $an_key = wpv_get_option('analytics_key');
    if ($an_key) {
        ?>
	<script>
		(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
		(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
		m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
		})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

		ga('create', '<?php 
        echo $an_key;
        ?>
', 'auto');
		ga('require', 'displayfeatures');
		ga('send', 'pageview');
	</script>
<?php 
    }
}
Exemplo n.º 29
0
	<div class="rcontent">
		<?php 
foreach ($selects as $id => $s) {
    ?>
			<?php 
    if (isset($s['target'])) {
        if (isset($s['options'])) {
            $s['options'] = $s['options'] + WpvConfigGenerator::get_select_target_config($s['target']);
        } else {
            $s['options'] = WpvConfigGenerator::get_select_target_config($s['target']);
        }
    }
    if (isset($GLOBALS['wpv_in_metabox'])) {
        $selected = get_post_meta($post->ID, $id, true);
    } else {
        $selected = wpv_get_option($id, $s['default']);
    }
    ?>
			<div class="single-option">
				<div class="single-desc"><?php 
    echo $s['desc'];
    ?>
</div>
				
				<select name="<?php 
    echo $id;
    ?>
" id="<?php 
    echo $id;
    ?>
" class="<?php 
Exemplo n.º 30
0
        ?>
				<a class="vamtam-cart-dropdown-link no-dropdown icon theme" href="<?php 
        echo esc_attr($woocommerce->cart->get_cart_url());
        ?>
">
					<span class="icon theme"><?php 
        wpv_icon('theme-handbag');
        ?>
</span>
					<span class="products cart-empty">...</span>
				</a>
			<?php 
    }
    ?>
			<?php 
    if (wpv_get_option('mobile-search-in-header')) {
        ?>
				<button class="header-search icon wpv-overlay-search-trigger"><?php 
        wpv_icon('search1');
        ?>
</button>
			<?php 
    }
    ?>
		</div>
	<?php 
} else {
    ?>
		<a href="<?php 
    echo home_url();
    ?>