Example #1
0
 function axiom_woocommerce_theme_setup3()
 {
     if (axiom_is_woocommerce_page()) {
         remove_action('woocommerce_sidebar', 'woocommerce_get_sidebar', 10);
         // Remove WOOC sidebar
         remove_action('woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);
         add_action('woocommerce_before_main_content', 'axiom_woocommerce_wrapper_start', 10);
         remove_action('woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);
         add_action('woocommerce_after_main_content', 'axiom_woocommerce_wrapper_end', 10);
         add_action('woocommerce_show_page_title', 'axiom_woocommerce_show_page_title', 10);
         remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_title', 5);
         add_action('woocommerce_single_product_summary', 'axiom_woocommerce_show_product_title', 5);
         add_action('woocommerce_before_shop_loop', 'axiom_woocommerce_before_shop_loop', 10);
         remove_action('woocommerce_after_shop_loop', 'woocommerce_pagination', 10);
         add_action('woocommerce_after_shop_loop', 'axiom_woocommerce_pagination', 10);
         add_action('woocommerce_before_subcategory_title', 'axiom_woocommerce_open_thumb_wrapper', 9);
         add_action('woocommerce_before_shop_loop_item_title', 'axiom_woocommerce_open_thumb_wrapper', 9);
         add_action('woocommerce_before_subcategory_title', 'axiom_woocommerce_open_item_wrapper', 20);
         add_action('woocommerce_before_shop_loop_item_title', 'axiom_woocommerce_open_item_wrapper', 20);
         add_action('woocommerce_after_subcategory', 'axiom_woocommerce_close_item_wrapper', 20);
         add_action('woocommerce_after_shop_loop_item', 'axiom_woocommerce_close_item_wrapper', 20);
         add_action('woocommerce_after_shop_loop_item_title', 'axiom_woocommerce_after_shop_loop_item_title', 7);
         add_action('woocommerce_after_subcategory_title', 'axiom_woocommerce_after_subcategory_title', 10);
         add_action('woocommerce_product_meta_end', 'axiom_woocommerce_show_product_id', 10);
         add_filter('woocommerce_output_related_products_args', 'axiom_woocommerce_output_related_products_args');
         add_filter('woocommerce_product_thumbnails_columns', 'axiom_woocommerce_product_thumbnails_columns');
         add_filter('loop_shop_columns', 'axiom_woocommerce_loop_shop_columns');
         add_filter('get_product_search_form', 'axiom_woocommerce_get_product_search_form');
         add_filter('post_class', 'axiom_woocommerce_loop_shop_columns_class');
         add_action('the_title', 'axiom_woocommerce_the_title');
         axiom_enqueue_popup();
     }
 }
Example #2
0
    function axiom_template_single_standard_output($post_options, $post_data)
    {
        $post_data['post_views']++;
        $avg_author = 0;
        $avg_users = 0;
        if (!$post_data['post_protected'] && $post_options['reviews'] && axiom_get_custom_option('show_reviews') == 'yes') {
            $avg_author = $post_data['post_reviews_author'];
            $avg_users = $post_data['post_reviews_users'];
        }
        $show_title = axiom_get_custom_option('show_post_title') == 'yes' && (axiom_get_custom_option('show_post_title_on_quotes') == 'yes' || !in_array($post_data['post_format'], array('aside', 'chat', 'status', 'link', 'quote')));
        $title_tag = axiom_get_custom_option('show_page_top') == 'yes' && axiom_get_custom_option('show_page_title') == 'yes' ? 'h3' : 'h1';
        axiom_open_wrapper('<article class="' . join(' ', get_post_class('itemscope' . ' post_item post_item_single' . ' post_featured_' . esc_attr($post_options['post_class']) . ' post_format_' . esc_attr($post_data['post_format']))) . '"' . ' itemscope itemtype="http://schema.org/' . ($avg_author > 0 || $avg_users > 0 ? 'Review' : 'Article') . '">');
        $post_icon = axiom_get_custom_option('show_post_icon') == 'yes' ? '<span class="post_icon ' . esc_attr($post_data['post_icon']) . '"></span>' : '';
        if ($show_title && $post_options['location'] == 'center' && (axiom_get_custom_option('show_page_top') == 'no' || axiom_get_custom_option('show_page_title') == 'no')) {
            ?>
			<<?php 
            echo esc_html($title_tag);
            ?>
 itemprop="<?php 
            echo $avg_author > 0 || $avg_users > 0 ? 'itemReviewed' : 'name';
            ?>
" class="post_title entry-title"><?php 
            echo balanceTags($post_icon);
            echo $post_data['post_title'];
            ?>
</<?php 
            echo esc_html($title_tag);
            ?>
>
		<?php 
        }
        if (!$post_data['post_protected'] && (!empty($post_options['dedicated']) || axiom_get_custom_option('show_featured_image') == 'yes' && $post_data['post_thumb'])) {
            ?>
			<section class="post_featured">
			<?php 
            if (!empty($post_options['dedicated'])) {
                echo $post_options['dedicated'];
            } else {
                axiom_enqueue_popup();
                ?>
				<div class="post_thumb" data-image="<?php 
                echo esc_url($post_data['post_attachment']);
                ?>
" data-title="<?php 
                echo esc_attr($post_data['post_title']);
                ?>
">
					<a class="hover_icon hover_icon_view" href="<?php 
                echo esc_url($post_data['post_attachment']);
                ?>
" title="<?php 
                echo esc_attr($post_data['post_title']);
                ?>
"><?php 
                echo $post_data['post_thumb'];
                ?>
</a>
				</div>
				<?php 
            }
            ?>
			</section>
			<?php 
        }
        if ($show_title && $post_options['location'] != 'center' && (axiom_get_custom_option('show_page_top') == 'no' || axiom_get_custom_option('show_page_title') == 'no')) {
            ?>
			<<?php 
            echo esc_html($title_tag);
            ?>
 itemprop="<?php 
            echo $avg_author > 0 || $avg_users > 0 ? 'itemReviewed' : 'name';
            ?>
" class="post_title entry-title"><?php 
            echo balanceTags($post_icon);
            echo $post_data['post_title'];
            ?>
</<?php 
            echo esc_html($title_tag);
            ?>
>
			<?php 
        }
        if (!$post_data['post_protected'] && axiom_get_custom_option('show_post_info') == 'yes') {
            $info_parts = array('snippets' => true);
            require axiom_get_file_dir('templates/parts/post-info.php');
        }
        require axiom_get_file_dir('templates/parts/reviews-block.php');
        axiom_open_wrapper('<section class="post_content" itemprop="' . ($avg_author > 0 || $avg_users > 0 ? 'reviewBody' : 'articleBody') . '">');
        // Post content
        if ($post_data['post_protected']) {
            echo $post_data['post_excerpt'];
            echo get_the_password_form();
        } else {
            global $AXIOM_GLOBALS;
            if (axiom_strpos($post_data['post_content'], axiom_sc_reviews_placeholder()) === false) {
                $post_data['post_content'] = do_shortcode('[trx_reviews]') . $post_data['post_content'];
            }
            echo trim(axiom_sc_gap_wrapper(axiom_sc_reviews_wrapper($post_data['post_content'])));
            require axiom_get_file_dir('templates/parts/single-pagination.php');
            if (axiom_get_custom_option('show_post_tags') == 'yes' && !empty($post_data['post_terms'][$post_data['post_taxonomy_tags']]->terms_links)) {
                ?>
				<div class="post_info post_info_bottom">
					<span class="post_info_item post_info_tags"><?php 
                _e('Tags:', 'axiom');
                ?>
 <?php 
                echo join(', ', $post_data['post_terms'][$post_data['post_taxonomy_tags']]->terms_links);
                ?>
</span>
				</div>
				<?php 
            }
        }
        axiom_close_wrapper();
        // .post_content
        if (!$post_data['post_protected']) {
            if ($post_data['post_edit_enable']) {
                require axiom_get_file_dir('templates/parts/editor-area.php');
            }
            require axiom_get_file_dir('templates/parts/author-info.php');
            require axiom_get_file_dir('templates/parts/share.php');
        }
        $sidebar_present = !axiom_sc_param_is_off(axiom_get_custom_option('show_sidebar_main'));
        if (!$sidebar_present) {
            axiom_close_wrapper();
        }
        // .post_item
        require axiom_get_file_dir('templates/parts/related-posts.php');
        if ($sidebar_present) {
            axiom_close_wrapper();
        }
        // .post_item
        if (!$post_data['post_protected']) {
            require axiom_get_file_dir('templates/parts/comments.php');
        }
        require axiom_get_file_dir('templates/parts/views-counter.php');
    }
Example #3
0
    function axiom_template_single_team_output($post_options, $post_data)
    {
        $post_data['post_views']++;
        $show_title = axiom_get_custom_option('show_post_title') == 'yes';
        $title_tag = axiom_get_custom_option('show_page_top') == 'yes' && axiom_get_custom_option('show_page_title') == 'yes' ? 'h3' : 'h1';
        axiom_open_wrapper('<article class="' . join(' ', get_post_class('itemscope' . ' post_item post_item_single_team' . ' post_featured_' . esc_attr($post_options['post_class']) . ' post_format_' . esc_attr($post_data['post_format']))) . '"' . ' itemscope itemtype="http://schema.org/Article' . '">');
        $post_icon = axiom_get_custom_option('show_post_icon') == 'yes' ? '<span class="post_icon ' . esc_attr($post_data['post_icon']) . '"></span>' : '';
        if ($show_title && $post_options['location'] == 'center' && (axiom_get_custom_option('show_page_top') == 'no' || axiom_get_custom_option('show_page_title') == 'no')) {
            ?>
			<<?php 
            echo esc_html($title_tag);
            ?>
 itemprop="name" class="post_title entry-title"><?php 
            echo balanceTags($post_icon);
            echo $post_data['post_title'];
            ?>
</<?php 
            echo esc_html($title_tag);
            ?>
>
			<?php 
        }
        if (!$post_data['post_protected'] && (!empty($post_options['dedicated']) || axiom_get_custom_option('show_featured_image') == 'yes' && $post_data['post_thumb'])) {
            ?>
			<section class="post_featured">
			<?php 
            if (!empty($post_options['dedicated'])) {
                echo $post_options['dedicated'];
            } else {
                axiom_enqueue_popup();
                ?>
				<div class="post_thumb" data-image="<?php 
                echo esc_url($post_data['post_attachment']);
                ?>
" data-title="<?php 
                echo esc_attr($post_data['post_title']);
                ?>
">
					<a class="hover_icon hover_icon_view" href="<?php 
                echo esc_url($post_data['post_attachment']);
                ?>
" title="<?php 
                echo esc_attr($post_data['post_title']);
                ?>
"><?php 
                echo $post_data['post_thumb'];
                ?>
</a>
				</div>
				<?php 
            }
            ?>
			</section>
			<?php 
        }
        if ($show_title && $post_options['location'] != 'center' && (axiom_get_custom_option('show_page_top') == 'no' || axiom_get_custom_option('show_page_title') == 'no')) {
            ?>
			<<?php 
            echo esc_html($title_tag);
            ?>
 itemprop="name" class="post_title entry-title"><?php 
            echo balanceTags($post_icon);
            echo $post_data['post_title'];
            ?>
</<?php 
            echo esc_html($title_tag);
            ?>
>
			<?php 
        }
        axiom_open_wrapper('<section class="post_content" itemprop="articleBody">');
        // Post content
        if ($post_data['post_protected']) {
            echo $post_data['post_excerpt'];
            echo get_the_password_form();
        } else {
            echo trim(axiom_sc_gap_wrapper(axiom_sc_reviews_wrapper($post_data['post_content'])));
            require axiom_get_file_dir('templates/parts/single-pagination.php');
            if (axiom_get_custom_option('show_post_tags') == 'yes' && !empty($post_data['post_terms'][$post_data['post_taxonomy_tags']]->terms_links)) {
                ?>
				<div class="post_info post_info_bottom">
					<span class="post_info_item post_info_tags"><?php 
                _e('Tags:', 'axiom');
                ?>
 <?php 
                echo join(', ', $post_data['post_terms'][$post_data['post_taxonomy_tags']]->terms_links);
                ?>
</span>
				</div>
				<?php 
            }
        }
        axiom_close_wrapper();
        // .post_content
        if (!$post_data['post_protected']) {
            if ($post_data['post_edit_enable']) {
                require axiom_get_file_dir('templates/parts/editor-area.php');
            }
            require axiom_get_file_dir('templates/parts/share.php');
        }
        axiom_close_wrapper();
        // .post_item
        if (!$post_data['post_protected']) {
            require axiom_get_file_dir('templates/parts/related-posts.php');
            require axiom_get_file_dir('templates/parts/comments.php');
        }
        require axiom_get_file_dir('templates/parts/views-counter.php');
    }
Example #4
0
function axiom_sc_popup($atts, $content = null)
{
    if (axiom_sc_in_shortcode_blogger()) {
        return '';
    }
    extract(axiom_sc_html_decode(shortcode_atts(array("id" => "", "class" => "", "css" => "", "top" => "", "bottom" => "", "left" => "", "right" => ""), $atts)));
    $css .= axiom_get_css_position_from_values($top, $right, $bottom, $left);
    axiom_enqueue_popup('magnific');
    $output = '<div' . ($id ? ' id="' . esc_attr($id) . '"' : '') . ' class="sc_popup mfp-with-anim mfp-hide' . ($class ? ' ' . esc_attr($class) : '') . '"' . ($css != '' ? ' style="' . esc_attr($css) . '"' : '') . '>' . do_shortcode($content) . '</div>';
    return apply_filters('axiom_shortcode_output', $output, 'trx_popup', $atts, $content);
}
Example #5
0
 function axiom_options_load_scripts()
 {
     // WP Color Picker
     axiom_enqueue_style('wp-color-picker', false, array(), null);
     // AxiomThemes fontello styles
     axiom_enqueue_style('axiom-fontello-admin-style', axiom_get_file_url('css/fontello-admin/css/fontello-admin.css'), array(), null);
     axiom_enqueue_style('axiom-fontello-style', axiom_get_file_url('css/fontello/css/fontello.css'), array(), null);
     // AxiomThemes options styles
     axiom_enqueue_style('axiom-options-style', axiom_get_file_url('core/core.options/css/core.options.css'), array(), null);
     axiom_enqueue_style('axiom-options-datepicker-style', axiom_get_file_url('core/core.options/css/core.options-datepicker.css'), array(), null);
     // WP core scripts
     wp_enqueue_media();
     axiom_enqueue_script('wp-color-picker', false, array('jquery'), null, true);
     // Input masks for text fields
     axiom_enqueue_script('jquery-input-mask', axiom_get_file_url('core/core.options/js/jquery.maskedinput.1.3.1.min.js'), array('jquery'), null, true);
     // AxiomThemes core scripts
     axiom_enqueue_script('axiom-core-utils-script', axiom_get_file_url('js/core.utils.js'), array(), null, true);
     // AxiomThemes options scripts
     axiom_enqueue_script('axiom-options-script', axiom_get_file_url('core/core.options/js/core.options.js'), array('jquery', 'jquery-ui-core', 'jquery-ui-tabs', 'jquery-ui-accordion', 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-datepicker'), null, true);
     axiom_enqueue_script('axiom-options-custom-script', axiom_get_file_url('core/core.options/js/core.options-custom.js'), array('axiom-options-script'), null, true);
     axiom_enqueue_messages();
     axiom_enqueue_popup();
 }
Example #6
0
    if (!empty($list)) {
        foreach ($list as $bm) {
            echo '<li><a href="' . esc_url($bm['url']) . '" class="bookmarks_item">' . $bm['title'] . '<span class="bookmarks_delete icon-cancel-1" title="' . __('Delete this bookmark', 'axiom') . '"></span></a></li>';
        }
    }
    ?>
		</ul>
	</li>
	<?php 
}
if (axiom_get_custom_option('show_login') == 'yes') {
    if (!is_user_logged_in()) {
        // Load core messages
        axiom_enqueue_messages();
        // Load Popup engine
        axiom_enqueue_popup();
        ?>
		<li class="menu_user_register"><a href="#popup_registration" class="popup_link popup_register_link"><?php 
        _e('Register', 'axiom');
        ?>
</a></li>
		<li class="menu_user_login"><a href="#popup_login" class="popup_link popup_login_link"><?php 
        _e('Login', 'axiom');
        ?>
</a></li>
		<?php 
    } else {
        $current_user = wp_get_current_user();
        ?>
		<li class="menu_user_controls">
			<a href="#"><?php