<?php } ?> <?php $main_css = ''; $row_css = ''; $main_class = ''; $page_template = ''; if (function_exists('is_woocommerce') && is_woocommerce()) { $custom_fields = get_post_custom_values('_wp_page_template', $c_pageID); $page_template = is_array($custom_fields) && !empty($custom_fields) ? $custom_fields[0] : ''; } if (get_post_type($c_pageID) == 'tribe_events' && tribe_get_option('tribeEventsTemplate', 'default') == '100-width.php') { $page_template = '100-width.php'; } if (is_page_template('100-width.php') || is_page_template('blank.php') || '100-width.php' == $page_template || ('1' == fusion_get_option('portfolio_width_100', 'portfolio_width_100', $c_pageID) || 'yes' == fusion_get_option('portfolio_width_100', 'portfolio_width_100', $c_pageID)) && 'avada_portfolio' == get_post_type($c_pageID) || ('1' == fusion_get_option('blog_width_100', 'portfolio_width_100', $c_pageID) || 'yes' == fusion_get_option('blog_width_100', 'portfolio_width_100', $c_pageID)) && 'post' == get_post_type($c_pageID) || 'yes' == fusion_get_page_option('portfolio_width_100', $c_pageID) && ('post' != get_post_type($c_pageID) && 'avada_portfolio' != get_post_type($c_pageID)) || avada_is_portfolio_template() && 'yes' == get_post_meta($c_pageID, 'pyre_portfolio_width_100', true)) { $main_css = 'padding-left:0px;padding-right:0px;'; if (Avada()->settings->get('hundredp_padding') && !get_post_meta($c_pageID, 'pyre_hundredp_padding', true)) { $main_css = 'padding-left:' . Avada()->settings->get('hundredp_padding') . ';padding-right:' . Avada()->settings->get('hundredp_padding'); } if (get_post_meta($c_pageID, 'pyre_hundredp_padding', true)) { $main_css = 'padding-left:' . get_post_meta($c_pageID, 'pyre_hundredp_padding', true) . ';padding-right:' . get_post_meta($c_pageID, 'pyre_hundredp_padding', true); } $row_css = 'max-width:100%;'; $main_class = 'width-100'; } do_action('avada_before_main_container'); ?> <div id="main" class="clearfix <?php echo $main_class; ?>
} ?> <?php $main_css = ''; $row_css = ''; $main_class = ''; $page_template = ''; if (is_woocommerce()) { $custom_fields = get_post_custom_values('_wp_page_template', $c_pageID); if (is_array($custom_fields) && !empty($custom_fields)) { $page_template = $custom_fields[0]; } else { $page_template = ''; } } if (is_page_template('100-width.php') || is_page_template('blank.php') || get_post_meta($slider_page_id, 'pyre_portfolio_width_100', true) == 'yes' || avada_is_portfolio_template() && get_post_meta($c_pageID, 'pyre_portfolio_width_100', true) == 'yes' || $page_template == '100-width.php') { $main_css = 'padding-left:0px;padding-right:0px;'; if ($smof_data['hundredp_padding'] && !get_post_meta($c_pageID, 'pyre_hundredp_padding', true)) { $main_css = 'padding-left:' . $smof_data['hundredp_padding'] . ';padding-right:' . $smof_data['hundredp_padding']; } if (get_post_meta($c_pageID, 'pyre_hundredp_padding', true)) { $main_css = 'padding-left:' . get_post_meta($c_pageID, 'pyre_hundredp_padding', true) . ';padding-right:' . get_post_meta($c_pageID, 'pyre_hundredp_padding', true); } $row_css = 'max-width:100%;'; $main_class = 'width-100'; } ?> <div id="main" class="clearfix <?php echo $main_class; ?> " style="<?php
/** * Number based pagination * @param string $pages Maximum number of pages * @param integer $range * @param string $current_query * @return void */ function fusion_pagination($pages = '', $range = 2, $current_query = '') { $showitems = $range * 2 + 1; if ($current_query == '') { global $paged; if (empty($paged)) { $paged = 1; } } else { $paged = $current_query->query_vars['paged']; } if ($pages == '') { if ($current_query == '') { global $wp_query; $pages = $wp_query->max_num_pages; if (!$pages) { $pages = 1; } } else { $pages = $current_query->max_num_pages; } } if (1 != $pages) { if (Avada()->settings->get('blog_pagination_type') != 'Pagination' && (is_home() || is_search() || get_post_type() == 'post' && (is_author() || is_archive())) || Avada()->settings->get('grid_pagination_type') != 'Pagination' && (avada_is_portfolio_template() || is_post_type_archive('avada_portfolio') || is_tax('portfolio_category') || is_tax('portfolio_skills') || is_tax('portfolio_tags'))) { echo "<div class='pagination infinite-scroll clearfix'>"; } else { echo "<div class='pagination clearfix'>"; } if ($paged > 1) { echo "<a class='pagination-prev' href='" . get_pagenum_link($paged - 1) . "'><span class='page-prev'></span><span class='page-text'>" . __('Previous', 'Avada') . "</span></a>"; } for ($i = 1; $i <= $pages; $i++) { if (1 != $pages && (!($i >= $paged + $range + 1 || $i <= $paged - $range - 1) || $pages <= $showitems)) { echo $paged == $i ? "<span class='current'>" . $i . "</span>" : "<a href='" . get_pagenum_link($i) . "' class='inactive' >" . $i . "</a>"; } } if ($paged < $pages) { echo "<a class='pagination-next' href='" . get_pagenum_link($paged + 1) . "'><span class='page-text'>" . __('Next', 'Avada') . "</span><span class='page-next'></span></a>"; } echo "</div>\n"; } }
/** * Number based pagination * @param string $pages Maximum number of pages * @param integer $range * @param string $current_query * @return void */ function fusion_pagination($pages = '', $range = 2, $current_query = '') { $showitems = $range * 2 + 1; if ('' == $current_query) { global $paged; if (empty($paged)) { $paged = 1; } } else { $paged = $current_query->query_vars['paged']; } if ('' == $pages) { if ('' == $current_query) { global $wp_query; $pages = $wp_query->max_num_pages; if (!$pages) { $pages = 1; } } else { $pages = $current_query->max_num_pages; } } ?> <?php if (1 != $pages) { ?> <?php if ('Pagination' != Avada()->settings->get('blog_pagination_type') && (is_home() || is_search() || 'post' == get_post_type() && (is_author() || is_archive())) || 'Pagination' != Avada()->settings->get('grid_pagination_type') && (avada_is_portfolio_template() || is_post_type_archive('avada_portfolio') || is_tax('portfolio_category') || is_tax('portfolio_skills') || is_tax('portfolio_tags'))) { ?> <div class='pagination infinite-scroll clearfix'> <?php } else { ?> <div class='pagination clearfix'> <?php } ?> <?php if (1 < $paged) { ?> <a class="pagination-prev" href="<?php echo get_pagenum_link($paged - 1); ?> "> <span class="page-prev"></span> <span class="page-text"><?php esc_html_e('Previous', 'Avada'); ?> </span> </a> <?php } ?> <?php for ($i = 1; $i <= $pages; $i++) { ?> <?php if (1 != $pages && (!($i >= $paged + $range + 1 || $i <= $paged - $range - 1) || $pages <= $showitems)) { ?> <?php if ($paged == $i) { ?> <span class="current"><?php echo $i; ?> </span> <?php } else { ?> <a href="<?php echo get_pagenum_link($i); ?> " class="inactive"><?php echo $i; ?> </a> <?php } ?> <?php } ?> <?php } ?> <?php if ($paged < $pages) { ?> <a class="pagination-next" href="<?php echo get_pagenum_link($paged + 1); ?> "> <span class="page-text"><?php esc_html_e('Next', 'Avada'); ?> </span> <span class="page-next"></span> </a> <?php } ?> </div> <?php // Needed for Theme check ob_start(); posts_nav_link(); ob_get_clean(); ?> <?php } }
function attr() { global $smof_data; if (strpos($smof_data['site_width'], '%') === false && strpos($smof_data['site_width'], 'px') === false) { $smof_data['site_width'] = $smof_data['site_width'] . 'px'; } $site_width = (int) $smof_data['site_width']; $site_width_percent = false; if (strpos($smof_data['site_width'], '%') !== false) { $site_width_percent = true; } $int_left_padding = (int) self::$args['padding_left']; $int_right_padding = (int) self::$args['padding_right']; $object_id = get_queried_object_id(); $c_pageID = FusionCore_Plugin::c_pageID(); $width_100 = false; $page_template = ''; if (function_exists('is_woocommerce')) { if (is_woocommerce()) { $custom_fields = get_post_custom_values('_wp_page_template', $c_pageID); $page_template = is_array($custom_fields) && !empty($custom_fields) ? $custom_fields[0] : ''; } } if (is_page_template('100-width.php') || is_page_template('blank.php') || ('1' == fusion_get_option('portfolio_width_100', 'portfolio_width_100', $c_pageID) || 'yes' == fusion_get_option('portfolio_width_100', 'portfolio_width_100', $c_pageID) && 'avada_portfolio' == get_post_type($c_pageID)) || avada_is_portfolio_template() && 'yes' == get_post_meta($c_pageID, 'pyre_portfolio_width_100', true) || '100-width.php' == $page_template) { $width_100 = true; } $attr['class'] = 'fusion-fullwidth fullwidth-box fusion-fullwidth-' . $this->fwc_counter . ' '; $attr['style'] = ''; $attr['class'] .= sprintf(' fusion-parallax-%s', self::$args['background_parallax']); if (self::$args['hundred_percent'] == 'yes') { $attr['class'] .= ' hundred-percent-fullwidth'; if ((int) self::$args['padding_left'] > 0 || (int) self::$args['padding_right'] > 0) { $attr['class'] .= ' fusion-nonzero-padding'; } } else { $attr['class'] .= ' nonhundred-percent-fullwidth'; } if (self::$bg_type == 'video') { $attr['class'] .= ' video-background'; } else { if (self::$bg_type == 'faded') { $attr['class'] .= ' faded-background'; } } if (self::$args['equal_height_columns'] == 'yes') { $attr['class'] .= ' fusion-equal-height-columns'; } if (self::$args['border_color']) { $attr['style'] .= sprintf('border-color:%s;', self::$args['border_color']); } if (self::$args['border_size']) { $attr['style'] .= sprintf('border-bottom-width: %s;border-top-width: %s;', self::$args['border_size'], self::$args['border_size']); } if (self::$args['border_style']) { $attr['style'] .= sprintf('border-bottom-style: %s;border-top-style: %s;', self::$args['border_style'], self::$args['border_style']); } if (self::$args['padding_bottom']) { $attr['style'] .= sprintf('padding-bottom:%s;', self::$args['padding_bottom']); } if (self::$args['padding_top']) { $attr['style'] .= sprintf('padding-top:%s;', self::$args['padding_top']); } if (self::$args['padding_left']) { $attr['style'] .= sprintf('padding-left:%s;', self::$args['padding_left']); } if (self::$args['padding_right']) { $attr['style'] .= sprintf('padding-right:%s;', self::$args['padding_right']); } if (self::$args['hundred_percent'] == 'no' && (int) self::$args['padding_left'] > 0 && $width_100 == true) { $attr['style'] .= sprintf('padding-left:%s !important;', self::$args['padding_left']); } if (self::$args['hundred_percent'] == 'no' && (int) self::$args['padding_right'] > 0 && $width_100 == true) { $attr['style'] .= sprintf('padding-right:%s !important;', self::$args['padding_right']); } if (self::$args['id']) { $attr['id'] = self::$args['id']; } if (self::$args['class']) { $attr['class'] .= ' ' . self::$args['class']; } if (self::$args['background_image'] && self::$args['background_parallax'] == 'fixed') { $attr['style'] .= 'background-attachment:fixed;'; } if (self::$args['background_parallax'] == "none" || self::$args['background_parallax'] == "fixed") { if (self::$args['background_color']) { $attr['style'] .= sprintf('background-color:%s;', self::$args['background_color']); } if (self::$args['background_image'] && self::$args['background_position']) { $attr['style'] .= sprintf('background-position:%s;', self::$args['background_position']); } if (self::$args['background_image'] && self::$args['background_repeat']) { $attr['style'] .= sprintf('background-repeat:%s;', self::$args['background_repeat']); } if (self::$args['background_image'] && self::$args['background_repeat'] == 'no-repeat') { $attr['style'] .= '-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover;'; // IE 8 background-size: cover filter if (self::$args['background_image']) { $attr['style'] .= sprintf('-ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'%s\', sizingMethod=\'scale\')";', self::$args['background_image']); } } if (self::$bg_type != 'faded') { if (self::$args['background_image']) { $attr['style'] .= sprintf('background-image: url(%s);', self::$args['background_image']); } } } if (self::$args['hide_on_mobile'] == 'yes') { $attr['class'] .= ' fusion-hide-on-mobile'; } return $attr; }
function themefusion_pagination($pages = '', $range = 2, $current_query = '') { global $smof_data; $showitems = $range * 2 + 1; if ($current_query == '') { global $paged; if (empty($paged)) { $paged = 1; } } else { $paged = $current_query->query_vars['paged']; } if ($pages == '') { if ($current_query == '') { global $wp_query; $pages = $wp_query->max_num_pages; if (!$pages) { $pages = 1; } } else { $pages = $current_query->max_num_pages; } } if (1 != $pages) { if ($smof_data['blog_pagination_type'] == 'Infinite Scroll' && is_home() || $smof_data['grid_pagination_type'] == 'Infinite Scroll' && avada_is_portfolio_template()) { echo "<div class='pagination infinite-scroll clearfix'>"; } else { echo "<div class='pagination clearfix'>"; } //if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo "<a href='".get_pagenum_link(1)."'><span class='arrows'>«</span> First</a>"; if ($paged > 1) { echo "<a class='pagination-prev' href='" . get_pagenum_link($paged - 1) . "'><span class='page-prev'></span>" . __('Previous', 'Avada') . "</a>"; } for ($i = 1; $i <= $pages; $i++) { if (1 != $pages && (!($i >= $paged + $range + 1 || $i <= $paged - $range - 1) || $pages <= $showitems)) { echo $paged == $i ? "<span class='current'>" . $i . "</span>" : "<a href='" . get_pagenum_link($i) . "' class='inactive' >" . $i . "</a>"; } } if ($paged < $pages) { echo "<a class='pagination-next' href='" . get_pagenum_link($paged + 1) . "'>" . __('Next', 'Avada') . "<span class='page-next'></span></a>"; } //if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) echo "<a href='".get_pagenum_link($pages)."'>Last <span class='arrows'>»</span></a>"; echo "</div>\n"; } }
<?php } ?> <?php $main_css = ''; $row_css = ''; $main_class = ''; $page_template = ''; if (function_exists('is_woocommerce') && is_woocommerce()) { $custom_fields = get_post_custom_values('_wp_page_template', $c_pageID); $page_template = is_array($custom_fields) && !empty($custom_fields) ? $custom_fields[0] : ''; } if ('tribe_events' == get_post_type($c_pageID) && '100-width.php' == tribe_get_option('tribeEventsTemplate', 'default')) { $page_template = '100-width.php'; } if (is_page_template('100-width.php') || is_page_template('blank.php') || '100-width.php' == $page_template || ('1' == fusion_get_option('portfolio_width_100', 'portfolio_width_100', $c_pageID) || 'yes' == fusion_get_option('portfolio_width_100', 'portfolio_width_100', $c_pageID)) && is_singular('avada_portfolio') || ('1' == fusion_get_option('blog_width_100', 'portfolio_width_100', $c_pageID) || 'yes' == fusion_get_option('blog_width_100', 'portfolio_width_100', $c_pageID)) && is_singular('post') || 'yes' == fusion_get_page_option('portfolio_width_100', $c_pageID) && !is_singular(array('post', 'avada_portfolio')) || avada_is_portfolio_template() && 'yes' == get_post_meta($c_pageID, 'pyre_portfolio_width_100', true)) { $main_css = 'padding-left:0px;padding-right:0px;'; if (Avada()->settings->get('hundredp_padding') && !get_post_meta($c_pageID, 'pyre_hundredp_padding', true)) { $main_css = 'padding-left:' . Avada()->settings->get('hundredp_padding') . ';padding-right:' . Avada()->settings->get('hundredp_padding'); } if (get_post_meta($c_pageID, 'pyre_hundredp_padding', true)) { $main_css = 'padding-left:' . get_post_meta($c_pageID, 'pyre_hundredp_padding', true) . ';padding-right:' . get_post_meta($c_pageID, 'pyre_hundredp_padding', true); } $row_css = 'max-width:100%;'; $main_class = 'width-100'; } do_action('avada_before_main_container'); ?> <div id="main" class="clearfix <?php echo $main_class; ?>