コード例 #1
0
ファイル: core.socials.php プロジェクト: pcuervo/odc
 function axiom_show_share_links($args)
 {
     if (axiom_get_custom_option('show_share') == 'hide') {
         return '';
     }
     $args = array_merge(array('post_id' => 0, 'post_link' => '', 'post_title' => '', 'post_descr' => '', 'post_thumb' => '', 'size' => 'small', 'style' => 'icons', 'type' => 'block', 'popup' => true, 'counters' => axiom_get_custom_option('show_share_counters') == 'yes', 'direction' => axiom_get_custom_option('show_share'), 'caption' => axiom_get_custom_option('share_caption'), 'share' => axiom_get_theme_option('share_buttons'), 'echo' => true), $args);
     if (count($args['share']) == 0 || implode('', $args['share'][0]) == '') {
         return '';
     }
     global $AXIOM_GLOBALS;
     $upload_info = wp_upload_dir();
     $upload_url = $upload_info['baseurl'];
     $output = '<div class="sc_socials sc_socials_size_' . esc_attr($args['size']) . ' sc_socials_share' . ($args['type'] == 'drop' ? ' sc_socials_drop' : ' sc_socials_dir_' . esc_attr($args['direction'])) . '">' . ($args['caption'] != '' ? '<span class="share_caption">' . $args['caption'] . '</span>' : '');
     foreach ($args['share'] as $soc) {
         $icon = $args['style'] == 'icons' || axiom_strpos($soc['icon'], $upload_url) !== false ? $soc['icon'] : axiom_get_socials_url(basename($soc['icon']));
         $sn = basename($soc['icon']);
         $sn = $args['style'] == 'icons' ? axiom_substr($sn, axiom_strrpos($sn, '-') + 1) : axiom_substr($sn, 0, axiom_strrpos($sn, '.'));
         if (($pos = axiom_strrpos($sn, '_')) !== false) {
             $sn = axiom_substr($sn, 0, $pos);
         }
         $url = empty($soc['url']) && !empty($AXIOM_GLOBALS['share_links'][$sn]) ? $AXIOM_GLOBALS['share_links'][$sn] : $soc['url'];
         $link = str_replace(array('{id}', '{link}', '{title}', '{descr}', '{image}'), array(urlencode($args['post_id']), urlencode($args['post_link']), urlencode(strip_tags($args['post_title'])), urlencode(strip_tags($args['post_descr'])), urlencode($args['post_thumb'])), $url);
         $output .= '<div class="sc_socials_item">' . '<a href="' . esc_url($soc['url']) . '"' . ' class="social_icons social_' . esc_attr($sn) . '"' . ($args['popup'] ? ' onclick="window.open(\'' . esc_url($link) . '\', \'_blank\', \'scrollbars=0, resizable=1, menubar=0, left=100, top=100, width=480, height=400, toolbar=0, status=0\'); return false;"' : ' target="_blank"') . ($args['style'] == 'bg' ? ' style="background-image: url(' . esc_url($icon) . ');"' : '') . ($args['counters'] ? ' data-count="' . esc_attr($sn) . '"' : '') . '>' . ($args['style'] == 'icons' ? '<span class="icon-' . esc_attr($sn) . '"></span>' : ($args['style'] == 'images' ? '<img src="' . esc_url($icon) . '" alt="' . esc_attr($sn) . '" />' : '<span class="sc_socials_hover" style="background-image: url(' . esc_url($icon) . ');"></span>')) . '</a>' . ($args['type'] == 'drop' ? '<i>' . trim(axiom_strtoproper($sn)) . '</i>' : '') . '</div>';
     }
     $output .= '</div>';
     if ($args['echo']) {
         echo $output;
     }
     return $output;
 }
コード例 #2
0
ファイル: socials.php プロジェクト: pcuervo/odc
    /**
     * How to display the widget on the screen.
     */
    function widget($args, $instance)
    {
        extract($args);
        $title = apply_filters('widget_title', isset($instance['title']) ? $instance['title'] : '');
        $text = isset($instance['text']) ? do_shortcode($instance['text']) : '';
        $logo_image = isset($instance['logo_image']) ? $instance['logo_image'] : '';
        $logo_text = isset($instance['logo_text']) ? $instance['logo_text'] : '';
        $show_logo = isset($instance['show_logo']) ? (int) $instance['show_logo'] : 1;
        $show_icons = isset($instance['show_icons']) ? (int) $instance['show_icons'] : 1;
        /* Before widget (defined by themes). */
        echo $before_widget;
        /* Display the widget title if one was input (before and after defined by themes). */
        if ($title) {
            echo $before_title . $title . $after_title;
        }
        ?>
		<div class="widget_inner">
            <?php 
        if ($show_logo) {
            if ($logo_image == '') {
                $logo_image = axiom_get_custom_option('logo_image');
            }
            if ($logo_text == '') {
                $logo_text = axiom_get_custom_option('logo_text');
            }
            if ($logo_image != '' || $logo_text != '') {
                ?>
						<div class="logo"><a href="<?php 
                echo esc_url(home_url());
                ?>
"><?php 
                echo $logo_image ? '<img src="' . esc_url($logo_image) . '" alt="">' : '';
                echo $logo_text ? '<span class="logo_text">' . str_replace(array('[', ']'), array('<span class="menu_color">', '</span>'), $logo_text) . '</span>' : '';
                ?>
</a></div>
					<?php 
            }
        }
        if (!empty($text)) {
            ?>
					<div class="logo_descr"><?php 
            echo nl2br(do_shortcode($text));
            ?>
</div>
                    <?php 
        }
        if ($show_icons) {
            echo do_shortcode('[trx_socials][/trx_socials]');
        }
        ?>
		</div>

		<?php 
        /* After widget (defined by themes). */
        echo $after_widget;
    }
コード例 #3
0
ファイル: core.customizer.php プロジェクト: pcuervo/odc
 function axiom_core_customizer_add_custom_styles($custom_style)
 {
     // Custom fonts
     if (axiom_get_custom_option('typography_custom') == 'yes') {
         $fonts = axiom_get_list_fonts(false);
         $fname = axiom_get_custom_option('typography_p_font');
         if (isset($fonts[$fname])) {
             $fstyle = explode(',', axiom_get_custom_option('typography_p_style'));
             $fname2 = ($pos = axiom_strpos($fname, ' (')) !== false ? axiom_substr($fname, 0, $pos) : $fname;
             $i = in_array('i', $fstyle);
             $u = in_array('u', $fstyle);
             $c = axiom_get_custom_option('typography_p_color');
             $custom_style .= "\n\t\t\t\t\tbody, button, input, select, textarea {\n\t\t\t\t\t\tfont-family: '" . esc_attr($fname2) . "'" . (isset($fonts[$fname]['family']) ? ", " . esc_attr($fonts[$fname]['family']) : '') . ";\n\t\t\t\t\t}\n\t\t\t\t\tbody {\n\t\t\t\t\t\tfont-size: " . esc_attr(axiom_get_custom_option('typography_p_size')) . "px;\n\t\t\t\t\t\tfont-weight: " . esc_attr(axiom_get_custom_option('typography_p_weight')) . ";\n\t\t\t\t\t\tline-height: " . esc_attr(axiom_get_custom_option('typography_p_lineheight')) . "px;\n\t\t\t\t\t\t" . ($c ? "color: " . esc_attr($c) . ";" : '') . "\n\t\t\t\t\t\t" . ($i ? "font-style: italic;" : '') . "\n\t\t\t\t\t\t" . ($u ? "text-decoration: underline;" : '') . "\n\t\t\t\t\t}\n\t\t\t\t";
         }
         for ($h = 1; $h <= 6; $h++) {
             $fname = axiom_get_custom_option('typography_h' . $h . '_font');
             if (isset($fonts[$fname])) {
                 $fstyle = explode(',', axiom_get_custom_option('typography_h' . $h . '_style'));
                 $fname2 = ($pos = axiom_strpos($fname, ' (')) !== false ? axiom_substr($fname, 0, $pos) : $fname;
                 $i = in_array('i', $fstyle);
                 $u = in_array('u', $fstyle);
                 $c = axiom_get_custom_option('typography_h' . $h . '_color');
                 $custom_style .= "\n\t\t\t\t\t\th" . intval($h) . ", .h" . intval($h) . " {\n\t\t\t\t\t\t\tfont-family: '" . esc_attr($fname2) . "'" . (isset($fonts[$fname]['family']) ? ", " . esc_attr($fonts[$fname]['family']) : '') . ";\n\t\t\t\t\t\t\tfont-size: " . esc_attr(axiom_get_custom_option('typography_h' . intval($h) . '_size')) . "px;\n\t\t\t\t\t\t\tfont-weight: " . esc_attr(axiom_get_custom_option('typography_h' . intval($h) . '_weight')) . ";\n\t\t\t\t\t\t\tline-height: " . esc_attr(axiom_get_custom_option('typography_h' . intval($h) . '_lineheight')) . "px;\n\t\t\t\t\t\t\t" . ($c ? "color: " . esc_attr($c) . ";" : '') . "\n\t\t\t\t\t\t\t" . ($i ? "font-style: italic;" : '') . "\n\t\t\t\t\t\t\t" . ($u ? "text-decoration: underline;" : '') . "\n\t\t\t\t\t\t}\n\t\t\t\t\t\th" . $h . " a, .h" . $h . " a {\n\t\t\t\t\t\t\t" . ($c ? "color: " . esc_attr($c) . ";" : '') . "\n\t\t\t\t\t\t}\n\t\t\t\t\t";
             }
         }
     }
     // Submenu width
     $menu_width = axiom_get_theme_option('menu_width');
     if (!empty($menu_width)) {
         $custom_style .= "\n\t\t\t\t/* Submenu width */\n\t\t\t\t.menu_main_wrap .menu_main_nav > li ul {\n\t\t\t\t\twidth: " . intval($menu_width) . "px;\n\t\t\t\t}\n\t\t\t\t.menu_main_wrap .menu_main_nav > li > ul ul {\n\t\t\t\t\tleft:" . intval($menu_width + 4) . "px;\n\t\t\t\t}\n\t\t\t\t.menu_main_wrap .menu_main_nav > li > ul ul.submenu_left {\n\t\t\t\t\tleft:-" . intval($menu_width + 1) . "px;\n\t\t\t\t}\n\t\t\t";
     }
     // Logo height
     $logo_height = axiom_get_custom_option('logo_height');
     if (!empty($logo_height)) {
         $custom_style .= "\n\t\t\t\t/* Logo header height */\n\t\t\t\t.menu_main_wrap .logo_main {\n\t\t\t\t\theight:" . intval($logo_height) . "px;\n\t\t\t\t}\n\t\t\t";
     }
     // Logo top offset
     $logo_offset = axiom_get_custom_option('logo_offset');
     if (!empty($logo_offset)) {
         $custom_style .= "\n\t\t\t\t/* Logo header top offset */\n\t\t\t\t.menu_main_wrap .logo {\n\t\t\t\t\tmargin-top:" . intval($logo_offset) . "px;\n\t\t\t\t}\n\t\t\t";
     }
     // Logo footer height
     $logo_height = axiom_get_theme_option('logo_footer_height');
     if (!empty($logo_height)) {
         $custom_style .= "\n\t\t\t\t/* Logo footer height */\n\t\t\t\t.contacts_wrap .logo img {\n\t\t\t\t\theight:" . intval($logo_height) . "px;\n\t\t\t\t}\n\t\t\t";
     }
     // Custom css from theme options
     $custom_style .= axiom_get_custom_option('custom_css');
     return $custom_style;
 }
コード例 #4
0
ファイル: core.options.php プロジェクト: pcuervo/odc
 function axiom_load_custom_options()
 {
     global $wp_query, $post, $AXIOM_GLOBALS;
     $AXIOM_GLOBALS['custom_options'] = $AXIOM_GLOBALS['post_options'] = $AXIOM_GLOBALS['taxonomy_options'] = $AXIOM_GLOBALS['template_options'] = array();
     // Load template options
     $page_id = axiom_detect_template_page_id();
     if ($page_id > 0) {
         $AXIOM_GLOBALS['template_options'] = get_post_meta($page_id, 'post_custom_options', true);
     }
     // Load taxonomy and post options
     $inheritance_key = axiom_detect_inheritance_key();
     if (!empty($inheritance_key)) {
         $inheritance = axiom_get_theme_inheritance($inheritance_key);
         // Load taxonomy options
         if (!empty($inheritance['taxonomy'])) {
             foreach ($inheritance['taxonomy'] as $tax) {
                 $tax_obj = get_taxonomy($tax);
                 $tax_query = !empty($tax_obj->query_var) ? $tax_obj->query_var : $tax;
                 if ($tax == 'category' && is_category()) {
                     // Current page is category's archive (Categories need specific check)
                     $tax_id = (int) get_query_var('cat');
                     if (empty($tax_id)) {
                         $tax_id = get_query_var('category_name');
                     }
                     $AXIOM_GLOBALS['taxonomy_options'] = axiom_taxonomy_get_inherited_properties('category', $tax_id);
                     break;
                 } else {
                     if ($tax == 'post_tag' && is_tag()) {
                         // Current page is tag's archive (Tags need specific check)
                         $tax_id = get_query_var($tax_query);
                         $AXIOM_GLOBALS['taxonomy_options'] = axiom_taxonomy_get_inherited_properties('post_tag', $tax_id);
                         break;
                     } else {
                         if (is_tax($tax)) {
                             // Current page is custom taxonomy archive (All rest taxonomies check)
                             $tax_id = get_query_var($tax_query);
                             $AXIOM_GLOBALS['taxonomy_options'] = axiom_taxonomy_get_inherited_properties($tax, $tax_id);
                             break;
                         }
                     }
                 }
             }
         }
         // Load post options
         if (!empty($inheritance['post_type']) && is_singular() && (in_array(get_query_var('post_type'), $inheritance['post_type']) || !empty($post->post_type) && in_array($post->post_type, $inheritance['post_type']))) {
             $post_id = get_the_ID();
             $AXIOM_GLOBALS['post_options'] = get_post_meta($post_id, 'post_custom_options', true);
             if (!empty($inheritance['taxonomy'])) {
                 $tax_list = array();
                 foreach ($inheritance['taxonomy'] as $tax) {
                     $tax_terms = axiom_get_terms_by_post_id(array('post_id' => $post_id, 'taxonomy' => $tax));
                     if (!empty($tax_terms[$tax]->terms)) {
                         $tax_list[] = axiom_taxonomies_get_inherited_properties($tax, $tax_terms[$tax]);
                     }
                 }
                 if (!empty($tax_list)) {
                     foreach ($tax_list as $tax_options) {
                         if (!empty($tax_options)) {
                             foreach ($tax_options as $tk => $tv) {
                                 if (!isset($AXIOM_GLOBALS['taxonomy_options'][$tk]) || axiom_is_inherit_option($AXIOM_GLOBALS['taxonomy_options'][$tk])) {
                                     $AXIOM_GLOBALS['taxonomy_options'][$tk] = $tv;
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     // Merge Template options with required for current page template
     $layout_name = axiom_get_custom_option(is_singular() && !axiom_get_global('blog_streampage') ? 'single_style' : 'blog_style');
     if (!empty($AXIOM_GLOBALS['registered_templates'][$layout_name]['theme_options'])) {
         $AXIOM_GLOBALS['template_options'] = array_merge($AXIOM_GLOBALS['template_options'], $AXIOM_GLOBALS['registered_templates'][$layout_name]['theme_options']);
     }
     do_action('axiom_action_load_custom_options');
     $AXIOM_GLOBALS['theme_options_loaded'] = true;
 }
コード例 #5
0
ファイル: top-panel.php プロジェクト: pcuervo/odc
">
					<div class="content_wrap clearfix">
						<div class="logo">
							<a href="<?php 
echo esc_url(home_url());
?>
"><?php 
echo !empty($AXIOM_GLOBALS['logo_' . $logo_style]) ? '<img src="' . esc_url($AXIOM_GLOBALS['logo_' . $logo_style]) . '" class="logo_main" alt=""><img src="' . esc_url($AXIOM_GLOBALS['logo_fixed']) . '" class="logo_fixed" alt="">' : '';
echo $AXIOM_GLOBALS['logo_text'] ? '<span class="logo_text">' . $AXIOM_GLOBALS['logo_text'] . '</span>' : '';
echo $AXIOM_GLOBALS['logo_slogan'] ? '<span class="logo_slogan">' . esc_html($AXIOM_GLOBALS['logo_slogan']) . '</span>' : '';
?>
</a>
						</div>
						
						<?php 
if (axiom_get_custom_option('show_search') == 'yes') {
    echo do_shortcode('[trx_search open="no" title=""]');
}
?>
		
						<a href="#" class="menu_main_responsive_button icon-menu-1"></a>

						<nav role="navigation" class="menu_main_nav_area">
							<?php 
if (empty($AXIOM_GLOBALS['menu_main'])) {
    $AXIOM_GLOBALS['menu_main'] = axiom_get_nav_menu('menu_main');
}
if (empty($AXIOM_GLOBALS['menu_main'])) {
    $AXIOM_GLOBALS['menu_main'] = axiom_get_nav_menu();
}
echo $AXIOM_GLOBALS['menu_main'];
コード例 #6
0
ファイル: header.php プロジェクト: pcuervo/odc
						<?php 
    }
    ?>
					</div>
				</div>
			<?php 
}
if (is_page('resource-centre-1')) {
    require_once axiom_get_file_dir('templates/parts/resource-centre-top.php');
}
?>

			<div class="page_content_wrap<?php 
echo axiom_get_custom_option('custom_page_paddings') == 'no' ? '' : ' wrap_custom';
?>
"<?php 
echo axiom_get_custom_option('show_page_top') == 'no' ? ' ' . trim($header_style) : '';
?>
>

				<?php 
// Content and sidebar wrapper
if (!is_singular(array('resource'))) {
    if ($body_style != 'fullscreen') {
        axiom_open_wrapper('<div class="content_wrap">');
    }
}
if (!is_singular(array('resource'))) {
    // Main content wrapper
    axiom_open_wrapper('<div class="content">');
}
コード例 #7
0
ファイル: front.customizer.php プロジェクト: pcuervo/odc
<?php

axiom_enqueue_slider();
$theme_skin = axiom_get_custom_option('theme_skin');
$color_scheme = axiom_get_custom_option('color_scheme');
if (empty($color_scheme)) {
    $color_scheme = 'original';
}
$color_scheme_list = axiom_get_list_color_schemes();
$link_color = apply_filters('axiom_filter_get_link_color', axiom_get_custom_option('link_color'));
$menu_color = apply_filters('axiom_filter_get_menu_color', axiom_get_custom_option('menu_color'));
$user_color = apply_filters('axiom_filter_get_user_color', axiom_get_custom_option('user_color'));
$body_style = axiom_get_custom_option('body_style');
$bg_color = axiom_get_custom_option('bg_color');
$bg_pattern = axiom_get_custom_option('bg_pattern');
$bg_image = axiom_get_custom_option('bg_image');
$co_style = 'co_light';
//'co_dark';
?>
<div class="custom_options_shadow"></div>

<div id="custom_options" class="custom_options <?php 
echo esc_attr($co_style);
?>
">

	<a href="#" id="co_toggle" class="icon-gear-icon"></a>
	
	<div class="co_header">
		<div class="co_title">
			<span><?php 
コード例 #8
0
ファイル: excerpt.php プロジェクト: pcuervo/odc
    function axiom_template_excerpt_output($post_options, $post_data)
    {
        $show_title = true;
        //!in_array($post_data['post_format'], array('aside', 'chat', 'status', 'link', 'quote'));
        $tag = axiom_sc_in_shortcode_blogger(true) ? 'div' : 'article';
        ?>
		<<?php 
        echo $tag;
        ?>
 <?php 
        post_class('post_item post_item_excerpt post_featured_' . esc_attr($post_options['post_class']) . ' post_format_' . esc_attr($post_data['post_format']) . ($post_options['number'] % 2 == 0 ? ' even' : ' odd') . ($post_options['number'] == 0 ? ' first' : '') . ($post_options['number'] == $post_options['posts_on_page'] ? ' last' : '') . ($post_options['add_view_more'] ? ' viewmore' : ''));
        ?>
>

			<?php 
        $post_icon = axiom_get_custom_option('show_post_icon') == 'yes' ? '<span class="post_icon ' . esc_attr($post_data['post_icon']) . '"></span>' : '';
        ?>

			<?php 
        if ($post_data['post_flags']['sticky']) {
            ?>
<span class="sticky_label"></span><?php 
        }
        if ($show_title && $post_options['location'] == 'center' && !empty($post_data['post_title'])) {
            ?>
<h3 class="post_title"><a href="<?php 
            echo esc_url($post_data['post_link']);
            ?>
"><?php 
            echo balanceTags($post_icon);
            echo $post_data['post_title'];
            ?>
</a></h3><?php 
        }
        if (!$post_data['post_protected'] && (!empty($post_options['dedicated']) || $post_data['post_thumb'] || $post_data['post_gallery'] || $post_data['post_video'] || $post_data['post_audio'])) {
            ?>
				<div class="post_featured">
				<?php 
            if (!empty($post_options['dedicated'])) {
                echo $post_options['dedicated'];
            } else {
                if ($post_data['post_thumb'] || $post_data['post_gallery'] || $post_data['post_video'] || $post_data['post_audio']) {
                    require axiom_get_file_dir('templates/parts/post-featured.php');
                }
            }
            ?>
				</div>
			<?php 
        }
        ?>
	
			<div class="post_content clearfix">
				<?php 
        if ($show_title && $post_options['location'] != 'center' && !empty($post_data['post_title'])) {
            ?>
<h3 class="post_title"><a href="<?php 
            echo esc_url($post_data['post_link']);
            ?>
"><?php 
            echo balanceTags($post_icon);
            echo $post_data['post_title'];
            ?>
</a></h3><?php 
        }
        if (!$post_data['post_protected'] && $post_options['info']) {
            require axiom_get_file_dir('templates/parts/post-info.php');
        }
        ?>
		
				<div class="post_descr">
				<?php 
        if ($post_data['post_protected']) {
            echo $post_data['post_excerpt'];
        } else {
            if ($post_data['post_excerpt']) {
                echo in_array($post_data['post_format'], array('quote', 'link', 'chat', 'aside', 'status')) ? $post_data['post_excerpt'] : '<p>' . trim(axiom_strshort($post_data['post_excerpt'], isset($post_options['descr']) ? $post_options['descr'] : axiom_get_custom_option('post_excerpt_maxlength'))) . '</p>';
            }
        }
        if (empty($post_options['readmore'])) {
            $post_options['readmore'] = __('READ MORE', 'axiom');
        }
        if (!axiom_sc_param_is_off($post_options['readmore']) && !in_array($post_data['post_format'], array('quote', 'link', 'chat', 'aside', 'status'))) {
            echo do_shortcode('[trx_button link="' . esc_url($post_data['post_link']) . '"]' . $post_options['readmore'] . '[/trx_button]');
        }
        ?>
				</div>

			</div>	<!-- /.post_content -->

		</<?php 
        echo $tag;
        ?>
>	<!-- /.post_item -->

	<?php 
    }
コード例 #9
0
ファイル: share.php プロジェクト: pcuervo/odc
<?php

//===================================== Social sharing =====================================
$show_share = axiom_get_custom_option("show_share");
if (!axiom_sc_param_is_off($show_share)) {
    $rez = axiom_show_share_links(array('post_id' => $post_data['post_id'], 'post_link' => $post_data['post_link'], 'post_title' => $post_data['post_title'], 'post_descr' => strip_tags($post_data['post_excerpt']), 'post_thumb' => $post_data['post_attachment'], 'type' => 'block', 'echo' => false));
    if ($rez) {
        ?>
		<div class="post_info post_info_bottom post_info_share post_info_share_<?php 
        echo esc_attr($show_share);
        ?>
"><?php 
        echo $rez;
        ?>
</div>
		<?php 
    }
}
コード例 #10
0
ファイル: skin.php プロジェクト: pcuervo/odc
 function axiom_action_add_scripts_inline_education()
 {
     echo '<script type="text/javascript">' . 'jQuery(document).ready(function() {' . "if (AXIOM_GLOBALS['theme_font']=='') AXIOM_GLOBALS['theme_font'] = 'Roboto';" . "AXIOM_GLOBALS['link_color'] = '" . apply_filters('axiom_filter_get_link_color', axiom_get_custom_option('link_color')) . "';" . "AXIOM_GLOBALS['menu_color'] = '" . apply_filters('axiom_filter_get_menu_color', axiom_get_custom_option('menu_color')) . "';" . "AXIOM_GLOBALS['user_color'] = '" . apply_filters('axiom_filter_get_user_color', axiom_get_custom_option('user_color')) . "';" . "});" . "</script>";
 }
コード例 #11
0
ファイル: shortcodes.php プロジェクト: pcuervo/odc
function axiom_sc_video($atts, $content = null)
{
    if (axiom_sc_in_shortcode_blogger()) {
        return '';
    }
    extract(axiom_sc_html_decode(shortcode_atts(array("url" => '', "src" => '', "image" => '', "ratio" => '16:9', "autoplay" => 'off', "align" => '', "bg_image" => '', "bg_top" => '', "bg_bottom" => '', "bg_left" => '', "bg_right" => '', "frame" => "on", "id" => "", "class" => "", "animation" => "", "css" => "", "width" => '', "height" => '', "top" => "", "bottom" => "", "left" => "", "right" => ""), $atts)));
    $ratio = empty($ratio) ? "16:9" : str_replace(array('/', '\\', '-'), ':', $ratio);
    $ratio_parts = explode(':', $ratio);
    if (empty($height) && empty($width)) {
        $width = '100%';
    }
    $ed = axiom_substr($width, -1);
    if (empty($height) && !empty($width) && $ed != '%') {
        $height = round($width / $ratio_parts[0] * $ratio_parts[1]);
    }
    if (!empty($height) && empty($width)) {
        $width = round($height * $ratio_parts[0] / $ratio_parts[1]);
    }
    $css .= axiom_get_css_position_from_values($top, $right, $bottom, $left);
    $css_dim = axiom_get_css_position_from_values('', '', '', '', $width, $height);
    $css_bg = axiom_get_css_paddings_from_values($bg_top, $bg_right, $bg_bottom, $bg_left);
    if ($src == '' && $url == '' && isset($atts[0])) {
        $src = $atts[0];
    }
    $url = $src != '' ? $src : $url;
    if ($image != '' && axiom_sc_param_is_off($image)) {
        $image = '';
    } else {
        if (axiom_sc_param_is_on($autoplay) && is_single()) {
            $image = '';
        } else {
            if ($image > 0) {
                $attach = wp_get_attachment_image_src($image, 'full');
                if (isset($attach[0]) && $attach[0] != '') {
                    $image = $attach[0];
                }
            }
            if ($bg_image) {
                $thumb_sizes = axiom_get_thumb_sizes(array('layout' => 'grid_3'));
                $image = axiom_get_resized_image_url(empty($image) ? get_the_ID() : $image, $thumb_sizes['w'], $thumb_sizes['h'], null, false, false, false);
            } else {
                $image = axiom_get_resized_image_url(empty($image) ? get_the_ID() : $image, $ed != '%' ? $width : null, $height);
            }
            if (empty($image)) {
                $image = axiom_get_video_cover_image($url);
            }
        }
    }
    if ($bg_image > 0) {
        $attach = wp_get_attachment_image_src($bg_image, 'full');
        if (isset($attach[0]) && $attach[0] != '') {
            $bg_image = $attach[0];
        }
    }
    if ($bg_image) {
        $css_bg .= $css . 'background-image: url(' . esc_url($bg_image) . ');';
        $css = $css_dim;
    } else {
        $css .= $css_dim;
    }
    $url = axiom_get_video_player_url($src != '' ? $src : $url);
    $video = '<video' . ($id ? ' id="' . esc_attr($id) . '"' : '') . ' class="sc_video' . (!empty($class) ? ' ' . esc_attr($class) : '') . '"' . ' src="' . esc_url($url) . '"' . ' width="' . esc_attr($width) . '" height="' . esc_attr($height) . '"' . ' data-width="' . esc_attr($width) . '" data-height="' . esc_attr($height) . '"' . ' data-ratio="' . esc_attr($ratio) . '"' . ($image ? ' poster="' . esc_attr($image) . '" data-image="' . esc_attr($image) . '"' : '') . (!axiom_sc_param_is_off($animation) ? ' data-animation="' . esc_attr(axiom_sc_get_animation_classes($animation)) . '"' : '') . ($align && $align != 'none' ? ' data-align="' . esc_attr($align) . '"' : '') . ($bg_image ? ' data-bg-image="' . esc_attr($bg_image) . '"' : '') . ($css_bg != '' ? ' data-style="' . esc_attr($css_bg) . '"' : '') . ($css != '' ? ' style="' . esc_attr($css) . '"' : '') . ($image && axiom_get_theme_option('substitute_video') == 'yes' || axiom_sc_param_is_on($autoplay) && is_single() ? ' autoplay="autoplay"' : '') . ' controls="controls" loop="loop"' . '>' . '</video>';
    if (axiom_get_custom_option('substitute_video') == 'no') {
        if (axiom_sc_param_is_on($frame)) {
            $video = axiom_get_video_frame($video, $image, $css, $css_bg);
        }
    } else {
        if (isset($_GET['vc_editable']) && $_GET['vc_editable'] == 'true' && (isset($_POST['action']) && $_POST['action'] == 'vc_load_shortcode')) {
            $video = axiom_substitute_video($video, $width, $height, false);
        }
    }
    if (axiom_get_theme_option('use_mediaelement') == 'yes') {
        axiom_enqueue_script('wp-mediaelement');
    }
    return apply_filters('axiom_shortcode_output', $video, 'trx_video', $atts, $content);
}
コード例 #12
0
ファイル: attachment.php プロジェクト: pcuervo/odc
<?php

/**
Template Name: Attachment page
*/
get_header();
while (have_posts()) {
    the_post();
    // Move axiom_set_post_views to the javascript - counter will work under cache system
    if (axiom_get_custom_option('use_ajax_views_counter') == 'no') {
        axiom_set_post_views(get_the_ID());
    }
    axiom_show_post_layout(array('layout' => 'attachment', 'sidebar' => !axiom_sc_param_is_off(axiom_get_custom_option('show_sidebar_main'))));
}
get_footer();
コード例 #13
0
ファイル: slider.php プロジェクト: pcuervo/odc
                    if (empty($slider_count)) {
                        $slider_count = 3;
                    }
                }
                $slider_interval = axiom_get_custom_option("slider_interval");
                if ($slider_count > 0 || !empty($slider_ids)) {
                    $slider_html = do_shortcode('[trx_slider' . ' custom="no"' . ' crop="no"' . ' controls="0"' . ' engine="' . esc_attr($slider) . '"' . ' height="' . max(100, axiom_get_custom_option('slider_height')) . '"' . ' titles="' . esc_attr(axiom_get_custom_option("slider_infobox")) . '"' . ($slider_interval ? ' interval="' . esc_attr($slider_interval) . '"' : '') . ($slider_alias ? ' cat="' . esc_attr($slider_alias) . '"' : '') . ($slider_ids ? ' ids="' . esc_attr($slider_ids) . '"' : '') . ($slider_count ? ' count="' . esc_attr($slider_count) . '"' : '') . ($slider_orderby ? ' orderby="' . esc_attr($slider_orderby) . '"' : '') . ($slider_order ? ' order="' . esc_attr($slider_order) . '"' : '') . ($slider_pagination ? ' pagination="' . esc_attr($slider_pagination) . '"' : '') . '][/trx_slider]');
                }
            }
        }
    }
    // if slider selected
    if (!empty($slider_html)) {
        ?>
		<section class="slider_wrap slider_<?php 
        echo esc_attr(axiom_get_custom_option('slider_display'));
        ?>
 slider_engine_<?php 
        echo esc_attr($slider);
        ?>
 slider_alias_<?php 
        echo esc_attr($slider_alias);
        ?>
">
			<?php 
        echo $slider_html;
        ?>
		</section>
		<?php 
    }
}
コード例 #14
0
ファイル: reviews-block.php プロジェクト: pcuervo/odc
 if (!empty($post_data['post_terms'][$post_data['post_taxonomy']]->terms)) {
     foreach ($post_data['post_terms'][$post_data['post_taxonomy']]->terms as $cat) {
         $id = (int) $cat->term_id;
         $prop = axiom_taxonomy_get_inherited_property($post_data['post_taxonomy'], $id, 'reviews_criterias');
         if (!empty($prop) && !axiom_is_inherit_option($prop)) {
             $field['options'] = $prop;
             break;
         }
     }
 }
 // Author marks
 if ($reviews_first_author || !$reviews_second_hide) {
     $field["id"] = "reviews_marks_author";
     $field["descr"] = strip_tags($post_data['post_excerpt']);
     $field["accept"] = false;
     $marks = axiom_reviews_marks_to_display(axiom_reviews_marks_prepare(axiom_get_custom_option('reviews_marks'), count($field['options'])));
     $output .= '<div id="author_marks" class="sc_tabs_content">' . trim(axiom_reviews_get_markup($field, $marks, false, false, $reviews_first_author)) . '</div>';
 }
 // Users marks
 if (!$reviews_first_author || !$reviews_second_hide) {
     $marks = axiom_reviews_marks_to_display(axiom_reviews_marks_prepare(get_post_meta($post_data['post_id'], 'reviews_marks2', true), count($field['options'])));
     $users = max(0, get_post_meta($post_data['post_id'], 'reviews_users', true));
     $field["id"] = "reviews_marks_users";
     $field["descr"] = sprintf(__("Summary rating from <b>%s</b> user's marks.", 'axiom'), $users) . ' ' . (!isset($_COOKIE['axiom_votes']) || axiom_strpos($_COOKIE['axiom_votes'], ',' . $post_data['post_id'] . ',') === false ? __('You can set own marks for this article - just click on stars above and press "Accept".', 'axiom') : __('Thanks for your vote!', 'axiom'));
     $field["accept"] = $allow_user_marks;
     $output .= '<div id="users_marks" class="sc_tabs_content"' . (!$output ? ' style="display: block;"' : '') . '>' . trim(axiom_reviews_get_markup($field, $marks, $allow_user_marks, false, !$reviews_first_author)) . '</div>';
 }
 $reviews_markup .= $output . '</div>';
 if ($allow_user_marks) {
     axiom_enqueue_script('jquery-ui-draggable', false, array('jquery', 'jquery-ui-core'), null, true);
     $reviews_markup .= '
コード例 #15
0
ファイル: attachment.php プロジェクト: pcuervo/odc
    function axiom_template_attachment_output($post_options, $post_data)
    {
        $post_data['post_views']++;
        $title_tag = axiom_get_custom_option('show_page_top') == 'yes' && axiom_get_custom_option('show_page_title') == 'yes' ? 'h3' : 'h1';
        ?>
		<article <?php 
        post_class('post_item post_item_attachment template_attachment');
        ?>
>

		<?php 
        $post_icon = axiom_get_custom_option('show_post_icon') == 'yes' ? '<span class="post_icon ' . esc_attr($post_data['post_icon']) . '"></span>' : '';
        ?>

			<<?php 
        echo esc_html($title_tag);
        ?>
 class="post_title"><?php 
        echo balanceTags($post_icon);
        echo !empty($post_data['post_excerpt']) ? strip_tags($post_data['post_excerpt']) : $post_data['post_title'];
        ?>
</<?php 
        echo esc_html($title_tag);
        ?>
>

			<div class="post_featured">
				<div class="post_thumb post_nav" data-image="<?php 
        echo esc_url($post_data['post_attachment']);
        ?>
" data-title="<?php 
        echo esc_attr($post_data['post_title']);
        ?>
">
					<?php 
        echo $post_data['post_thumb'];
        $post = get_post();
        $attachments = array_values(get_children(array('post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID')));
        foreach ($attachments as $k => $attachment) {
            if ($attachment->ID == $post->ID) {
                break;
            }
        }
        if (isset($attachments[$k - 1])) {
            $link = get_permalink($attachments[$k - 1]->ID) . '#top_of_page';
            $desc = axiom_strshort(!empty($attachments[$k - 1]->post_excerpt) ? $attachments[$k - 1]->post_excerpt : $attachments[$k - 1]->post_title, 30);
            ?>
						<a class="post_nav_item post_nav_prev" href="<?php 
            echo esc_url($link);
            ?>
">
							<span class="post_nav_info">
								<span class="post_nav_info_title"><?php 
            _e('Previous item', 'axiom');
            ?>
</span>
								<span class="post_nav_info_description"><?php 
            echo $desc;
            ?>
</span>
							</span>
						</a>
						<?php 
        }
        if (isset($attachments[$k + 1])) {
            $link = get_permalink($attachments[$k + 1]->ID) . '#top_of_page';
            $desc = axiom_strshort(!empty($attachments[$k + 1]->post_excerpt) ? $attachments[$k + 1]->post_excerpt : $attachments[$k + 1]->post_title, 30);
            ?>
						<a class="post_nav_item post_nav_next" href="<?php 
            echo esc_url($link);
            ?>
">
							<span class="post_nav_info">
								<span class="post_nav_info_title"><?php 
            _e('Next item', 'axiom');
            ?>
</span>
								<span class="post_nav_info_description"><?php 
            echo $desc;
            ?>
</span>
							</span>
						</a>
						<?php 
        }
        ?>
				</div>
			</div>
		
			<?php 
        if (!$post_data['post_protected'] && axiom_get_custom_option('show_post_info') == 'yes') {
            require axiom_get_file_dir('templates/parts/post-info.php');
        }
        ?>
		
			<div class="post_content">
				<?php 
        // Post content
        if ($post_data['post_protected']) {
            echo $post_data['post_excerpt'];
        } else {
            echo $post_data['post_content'] ? $post_data['post_content'] : __('No image description ...', 'axiom');
            wp_link_pages(array('before' => '<div class="nav_pages_parts"><span class="pages">' . __('Pages:', 'axiom') . '</span>', 'after' => '</div>', 'link_before' => '<span class="page_num">', 'link_after' => '</span>'));
            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 
            }
        }
        ?>
			
			</div>	<!-- /.post_content -->
		
		</article>

		<section class="related_wrap related_wrap_empty"></section>

		<?php 
        if (!$post_data['post_protected']) {
            require axiom_get_file_dir('templates/parts/comments.php');
        }
        require axiom_get_file_dir('templates/parts/views-counter.php');
    }
コード例 #16
0
ファイル: core.lists.php プロジェクト: pcuervo/odc
 function axiom_get_scheme_color($clr)
 {
     global $AXIOM_GLOBALS;
     $scheme = axiom_get_custom_option('color_scheme');
     if (empty($scheme) || empty($AXIOM_GLOBALS['color_schemes'][$scheme])) {
         $scheme = 'original';
     }
     return isset($AXIOM_GLOBALS['color_schemes'][$scheme][$clr]) ? $AXIOM_GLOBALS['color_schemes'][$scheme][$clr] : '';
 }
コード例 #17
0
ファイル: author-info.php プロジェクト: pcuervo/odc
<?php

//===================================== Post author info =====================================
if (axiom_get_custom_option("show_post_author") == 'yes') {
    $post_author_name = $post_author_socials = '';
    $show_post_author_socials = true;
    if ($post_data['post_type'] == 'post') {
        $post_author_title = __('About', 'axiom');
        $post_author_name = $post_data['post_author'];
        $post_author_url = $post_data['post_author_url'];
        $post_author_email = get_the_author_meta('user_email', $post_data['post_author_id']);
        $post_author_avatar = get_avatar($post_author_email, 75 * min(2, max(1, axiom_get_theme_option("retina_ready"))));
        $post_author_descr = do_shortcode(nl2br(get_the_author_meta('description', $post_data['post_author_id'])));
        if ($show_post_author_socials) {
            $post_author_socials = axiom_show_user_socials(array('author_id' => $post_data['post_author_id'], 'style' => 'bg', 'size' => 'small', 'style' => 'icons', 'echo' => false));
        }
    }
    if (!empty($post_author_name)) {
        ?>
		<section class="post_author author vcard" itemprop="author" itemscope itemtype="http://schema.org/Person">
			<div class="post_author_avatar"><a href="<?php 
        echo esc_url($post_data['post_author_url']);
        ?>
" itemprop="image"><?php 
        echo $post_author_avatar;
        ?>
</a></div>
			<h6 class="post_author_title"><?php 
        echo esc_html($post_author_title);
        ?>
 <span itemprop="name"><a href="<?php 
コード例 #18
0
ファイル: news.php プロジェクト: pcuervo/odc
    function axiom_template_news_output($post_options, $post_data)
    {
        if (axiom_sc_param_is_on($post_options['scroll'])) {
            axiom_enqueue_slider();
        }
        require axiom_get_file_dir('templates/parts/reviews-summary.php');
        $title_tag = $post_options['columns_count'] > 0 ? 'h6' : 'h4';
        $title = '<' . esc_attr($title_tag) . ' class="post_title sc_title sc_blogger_title">' . (!isset($post_options['links']) || $post_options['links'] ? '<a href="' . esc_url($post_data['post_link']) . '">' : '') . $post_data['post_title'] . (!isset($post_options['links']) || $post_options['links'] ? '</a>' : '') . '</' . esc_attr($title_tag) . '>' . $reviews_summary;
        if (axiom_sc_param_is_on($post_options['scroll']) || $post_options['dir'] == 'horizontal' && $post_options['columns_count'] > 0) {
            ?>
			<div class="<?php 
            echo 'column-1_' . esc_attr($post_options['columns_count']) . ' column_item_' . esc_attr($post_options['number']);
            echo ($post_options['number'] % 2 == 1 ? ' odd' : ' even') . ($post_options['number'] == 1 ? ' first' : '') . ($post_options['number'] == $post_options['posts_on_page'] ? ' last' : '');
            //. (axiom_sc_param_is_on($post_options['scroll']) ? ' sc_scroll_slide swiper-slide' : '');
            ?>
">
			<?php 
        }
        ?>
		
		<div class="post_item post_item_news sc_blogger_item<?php 
        echo $post_options['number'] == $post_options['posts_on_page'] && !axiom_sc_param_is_on($post_options['loadmore']) ? ' sc_blogger_item_last' : '';
        //. (axiom_sc_param_is_on($post_options['scroll']) && $post_options['dir'] == 'vertical' ? ' sc_scroll_slide swiper-slide' : '');
        ?>
">
			<?php 
        if ($post_data['post_video'] || $post_data['post_audio'] || $post_data['post_thumb'] || $post_data['post_gallery']) {
            ?>
				<div class="post_featured">
					<?php 
            require axiom_get_file_dir('templates/parts/post-featured.php');
            ?>
				</div>
				<?php 
        }
        echo $title;
        ?>
			
			<div class="post_content sc_blogger_content">
				<?php 
        if (axiom_sc_param_is_on($post_options['info'])) {
            $info_parts = array('author' => false);
            require axiom_get_file_dir('templates/parts/post-info.php');
        }
        if ($post_options['descr'] > 0) {
            ?>
					<div class="post_descr">
					<?php 
            if ($post_data['post_protected']) {
                echo $post_data['post_excerpt'];
            } else {
                if ($post_data['post_excerpt']) {
                    echo in_array($post_data['post_format'], array('quote', 'link', 'chat', 'aside', 'status')) ? $post_data['post_excerpt'] : '<p>' . trim(axiom_strshort($post_data['post_excerpt'], isset($post_options['descr']) ? $post_options['descr'] : axiom_get_custom_option('post_excerpt_maxlength_masonry'))) . '</p>';
                }
                if (empty($post_options['readmore'])) {
                    $post_options['readmore'] = __('READ MORE', 'axiom');
                }
                if (!axiom_sc_param_is_off($post_options['readmore']) && !in_array($post_data['post_format'], array('quote', 'link', 'chat', 'aside', 'status'))) {
                    echo do_shortcode('[trx_button link="' . esc_url($post_data['post_link']) . '"]' . $post_options['readmore'] . '[/trx_button]');
                }
            }
            ?>
					</div>
					<?php 
        }
        if (empty($post_options['readmore'])) {
            $post_options['readmore'] = __('READ MORE', 'axiom');
        }
        if (!axiom_sc_param_is_off($post_options['readmore']) && !in_array($post_data['post_format'], array('quote', 'link', 'chat', 'aside', 'status'))) {
            echo do_shortcode('[trx_button link="' . esc_url($post_data['post_link']) . '"]' . $post_options['readmore'] . '[/trx_button]');
        }
        ?>

			</div>	<!-- /.post_content -->

		</div>		<!-- /.post_item -->
		<?php 
        if (axiom_sc_param_is_on($post_options['scroll']) || $post_options['dir'] == 'horizontal' && $post_options['columns_count'] > 0) {
            ?>
			</div>	<!-- /.column-1_x -->
			<?php 
        }
    }
コード例 #19
0
ファイル: core.theme.php プロジェクト: pcuervo/odc
 function axiom_wp_title($title, $sep)
 {
     global $page, $paged;
     if (is_feed()) {
         return $title;
     }
     // Add the blog name
     $title .= get_bloginfo('name');
     // Add the blog description for the home/front page.
     if (is_home() || is_front_page()) {
         $site_description = axiom_get_custom_option('logo_slogan');
         if (empty($site_description)) {
             $site_description = get_bloginfo('description', 'display');
         }
         if ($site_description) {
             $title .= " {$sep} {$site_description}";
         }
     }
     // Add a page number if necessary:
     if ($paged >= 2 || $page >= 2) {
         $title .= " {$sep} " . sprintf(__('Page %s', 'axiom'), max($paged, $page));
     }
     return $title;
 }
コード例 #20
0
ファイル: comments.php プロジェクト: pcuervo/odc
<?php

//===================================== Comments =====================================
if (axiom_get_custom_option("show_post_comments") == 'yes') {
    if (comments_open() || get_comments_number() != 0) {
        comments_template();
    }
}
コード例 #21
0
ファイル: widgets-posts.php プロジェクト: pcuervo/odc
            $post_counters_icon = 'post_counters_likes icon-heart-1';
        } else {
            if (axiom_strpos($show_counters, 'stars') !== false || axiom_strpos($show_counters, 'rating') !== false) {
                $post_counters = axiom_reviews_marks_to_display(get_post_meta($post_id, $post_rating, true));
                $post_counters_icon = 'post_counters_rating icon-star-1';
            } else {
                $post_counters = get_comments_number($post_id);
                $post_counters_icon = 'post_counters_comments icon-comment-1';
            }
        }
    }
    if (axiom_strpos($show_counters, 'stars') !== false && $post_counters > 0) {
        if (axiom_strpos($post_counters, '.') === false) {
            $post_counters .= '.0';
        }
        if (axiom_get_custom_option('show_reviews') == 'yes') {
            $output .= '<div class="post_rating reviews_summary blog_reviews">' . '<div class="criteria_summary criteria_row">' . trim(axiom_reviews_get_summary_stars($post_counters, false, false, 5)) . '</div>' . '</div>';
        }
    }
}
if ($show_date || $show_counters || $show_author) {
    $output .= '<div class="post_info">';
    $post_date = date("M d, Y", strtotime($post_date));
    if ($show_date) {
        $output .= '<span class="post_info_item post_info_posted">' . ($post_link ? '<a href="' . esc_url($post_link) . '" class="post_info_date">' : '') . $post_date . ($post_link ? '</a>' : '') . '</span>';
    }
    if ($show_author) {
        $post_author_id = $post->post_author;
        $post_author_name = get_the_author_meta('display_name', $post_author_id);
        $post_author_url = get_author_posts_url($post_author_id, '');
        $output .= '<span class="post_info_item post_info_posted_by">' . __('by', 'axiom') . ' ' . ($post_link ? '<a href="' . esc_url($post_author_url) . '" class="post_info_author">' : '') . $post_author_name . ($post_link ? '</a>' : '') . '</span>';
コード例 #22
0
ファイル: post-featured.php プロジェクト: pcuervo/odc
<?php

if ($post_data['post_video']) {
    echo trim(axiom_get_video_frame($post_data['post_video'], $post_data['post_video_image'] ? $post_data['post_video_image'] : $post_data['post_thumb']));
} else {
    if ($post_data['post_audio']) {
        echo trim(axiom_get_audio_frame($post_data['post_audio'], $post_data['post_audio_image'] ? $post_data['post_audio_image'] : $post_data['post_thumb_url']));
    } else {
        if ($post_data['post_thumb'] && ($post_data['post_format'] != 'gallery' || !$post_data['post_gallery'] || axiom_get_custom_option('gallery_instead_image') == 'no')) {
            ?>
						<div class="post_thumb" data-image="<?php 
            echo esc_url($post_data['post_attachment']);
            ?>
" data-title="<?php 
            echo esc_attr($post_data['post_title']);
            ?>
">
						<?php 
            if ($post_data['post_format'] == 'link' && $post_data['post_url'] != '') {
                echo '<a class="hover_icon hover_icon_link" href="' . esc_url($post_data['post_url']) . '"' . ($post_data['post_url_target'] ? ' target="' . esc_attr($post_data['post_url_target']) . '"' : '') . '>' . $post_data['post_thumb'] . '</a>';
            } else {
                if ($post_data['post_link'] != '') {
                    echo '<a class="hover_icon hover_icon_link" href="' . esc_url($post_data['post_link']) . '">' . $post_data['post_thumb'] . '</a>';
                } else {
                    echo trim($post_data['post_thumb']);
                }
            }
            ?>
						</div>
						<?php 
        } else {
コード例 #23
0
ファイル: left-panel.php プロジェクト: pcuervo/odc
<?php

if (axiom_get_custom_option('show_menu_user') == 'no') {
    if (axiom_get_custom_option('top_panel_position') == 'hide') {
        ?>
	<div id="sidemenu_button" class="top_panel_hidden"><i class="icon-menu-1"></i></div>
<?php 
    } else {
        ?>
	<div id="sidemenu_button"><i class="icon-menu-1"></i></div>
<?php 
    }
}
?>

<div class="sidemenu_wrap swpLeftPos">
	<div class="menuTranform">
		<div id="sidemenu_scroll" class="co_options sc_scroll sc_scroll_vertical">
			<div class="sc_scroll_wrapper swiper-wrapper">
				<div class="sc_scroll_slide swiper-slide">
					<div id="popup_menu" class="popup_wrapper">
						<nav role="navigation" class="sidemenu_area">
							<?php 
if (empty($AXIOM_GLOBALS['menu_panel'])) {
    $AXIOM_GLOBALS['menu_panel'] = axiom_get_nav_menu('menu_panel');
}
if (empty($AXIOM_GLOBALS['menu_panel'])) {
    $AXIOM_GLOBALS['menu_panel'] = axiom_get_nav_menu();
}
echo $AXIOM_GLOBALS['menu_panel'];
?>
コード例 #24
0
ファイル: single-team.php プロジェクト: pcuervo/odc
<?php

/*
Template Name: Team member
*/
get_header();
$single_style = 'single-team';
//axiom_get_custom_option('single_style');
while (have_posts()) {
    the_post();
    // Move axiom_set_post_views to the javascript - counter will work under cache system
    if (axiom_get_custom_option('use_ajax_views_counter') == 'no') {
        axiom_set_post_views(get_the_ID());
    }
    //axiom_sc_clear_dedicated_content();
    axiom_show_post_layout(array('layout' => $single_style, 'sidebar' => !axiom_sc_param_is_off(axiom_get_custom_option('show_sidebar_main')), 'content' => axiom_get_template_property($single_style, 'need_content'), 'terms_list' => axiom_get_template_property($single_style, 'need_terms')));
}
get_footer();
コード例 #25
0
ファイル: single-team.php プロジェクト: pcuervo/odc
    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');
    }
コード例 #26
0
ファイル: sidebar.php プロジェクト: pcuervo/odc
$sidebar_show = axiom_get_custom_option('show_sidebar_main');
$sidebar_parts = explode(' ', $sidebar_show);
$sidebar_tint = !empty($sidebar_parts[0]) ? $sidebar_parts[0] : 'light';
$sidebar_style = !empty($sidebar_parts[1]) ? $sidebar_parts[1] : $sidebar_tint;
if (!axiom_sc_param_is_off($sidebar_show)) {
    ?>
	<div class="sidebar widget_area bg_tint_<?php 
    echo esc_attr($sidebar_tint);
    ?>
 sidebar_style_<?php 
    echo esc_attr($sidebar_style);
    ?>
" role="complementary">
		<?php 
    do_action('before_sidebar');
    global $AXIOM_GLOBALS;
    if (!empty($AXIOM_GLOBALS['reviews_markup'])) {
        echo '<aside class="column-1_1 widget widget_reviews">' . $AXIOM_GLOBALS['reviews_markup'] . '</aside>';
    }
    $AXIOM_GLOBALS['current_sidebar'] = 'main';
    if (is_active_sidebar(axiom_get_custom_option('sidebar_main'))) {
        //remove it so SB can work
        if (!dynamic_sidebar(axiom_get_custom_option('sidebar_main'))) {
            // Put here html if user no set widgets in sidebar
        }
    }
    do_action('after_sidebar');
    ?>
	</div> <!-- /.sidebar -->
	<?php 
}
コード例 #27
0
ファイル: portfolio.php プロジェクト: pcuervo/odc
    function axiom_template_portfolio_output($post_options, $post_data)
    {
        $show_title = !in_array($post_data['post_format'], array('aside', 'chat', 'status', 'link', 'quote'));
        $parts = explode('_', $post_options['layout']);
        $style = $parts[0];
        $columns = max(1, min(4, empty($parts[1]) ? 1 : (int) $parts[1]));
        $tag = axiom_sc_in_shortcode_blogger(true) ? 'div' : 'article';
        if ($post_options['hover'] == 'square effect4') {
            $post_options['hover'] = 'square effect5';
        }
        $link_start = !isset($post_options['links']) || $post_options['links'] ? '<a href="' . esc_url($post_data['post_link']) . '">' : '';
        $link_end = !isset($post_options['links']) || $post_options['links'] ? '</a>' : '';
        ?>
			<div class="isotope_item isotope_item_<?php 
        echo esc_attr($style);
        ?>
 isotope_item_<?php 
        echo esc_attr($post_options['layout']);
        ?>
 isotope_column_<?php 
        echo esc_attr($columns);
        ?>
						<?php 
        if ($post_options['filters'] != '') {
            if ($post_options['filters'] == 'categories' && !empty($post_data['post_terms'][$post_data['post_taxonomy']]->terms_ids)) {
                echo ' flt_' . join(' flt_', $post_data['post_terms'][$post_data['post_taxonomy']]->terms_ids);
            } else {
                if ($post_options['filters'] == 'tags' && !empty($post_data['post_terms'][$post_data['post_taxonomy_tags']]->terms_ids)) {
                    echo ' flt_' . join(' flt_', $post_data['post_terms'][$post_data['post_taxonomy_tags']]->terms_ids);
                }
            }
        }
        ?>
">
				<<?php 
        echo $tag;
        ?>
 class="post_item post_item_<?php 
        echo esc_attr($style);
        ?>
 post_item_<?php 
        echo esc_attr($post_options['layout']);
        ?>
					<?php 
        echo 'post_format_' . esc_attr($post_data['post_format']) . ($post_options['number'] % 2 == 0 ? ' even' : ' odd') . ($post_options['number'] == 0 ? ' first' : '') . ($post_options['number'] == $post_options['posts_on_page'] ? ' last' : '');
        ?>
">
	
					<div class="post_content isotope_item_content ih-item colored<?php 
        echo ($post_options['hover'] ? ' ' . esc_attr($post_options['hover']) : '') . ($post_options['hover_dir'] ? ' ' . esc_attr($post_options['hover_dir']) : '');
        ?>
">
						<?php 
        if ($post_options['hover'] == 'circle effect1') {
            ?>
<div class="spinner"></div><?php 
        }
        if ($post_options['hover'] == 'square effect4') {
            ?>
<div class="mask1"></div><div class="mask2"></div><?php 
        }
        if ($post_options['hover'] == 'circle effect8') {
            ?>
<div class="img-container"><?php 
        }
        ?>
						<div class="post_featured img">
							<?php 
        /*
        if ($post_data['post_video'] || $post_data['post_audio'] || $post_data['post_thumb'] ||  $post_data['post_gallery']) {
        	require(axiom_get_file_dir('templates/parts/post-featured.php'));
        }
        */
        echo $link_start . $post_data['post_thumb'] . $link_end;
        ?>
						</div>
						<?php 
        if ($post_options['hover'] == 'circle effect8') {
            ?>
							</div>	<!-- .img-container -->
							<div class="info-container">
							<?php 
        }
        ?>
	
						<div class="post_info_wrap info"><div class="info-back">
	
							<?php 
        if ($show_title) {
            ?>
<h4 class="post_title"><?php 
            echo $link_start . $post_data['post_title'] . $link_end;
            ?>
</h4><?php 
        }
        /*
        if (!$post_data['post_protected'] && $post_options['info']) {
        	$info_parts = array('counters'=>false, 'terms'=>false);
        	require(axiom_get_file_dir('templates/parts/post-info.php'));
        }
        */
        ?>
	
							<div class="post_descr">
							<?php 
        if ($post_data['post_protected']) {
            echo $link_start . $post_data['post_excerpt'] . $link_end;
        } else {
            if ($post_data['post_excerpt']) {
                echo in_array($post_data['post_format'], array('quote', 'link', 'chat', 'aside', 'status')) ? $link_start . $post_data['post_excerpt'] . $link_end : '<p>' . $link_start . trim(axiom_strshort($post_data['post_excerpt'], isset($post_options['descr']) ? $post_options['descr'] : axiom_get_custom_option('post_excerpt_maxlength_masonry'))) . $link_end . '</p>';
            }
            echo $link_start;
            ?>
									<span class="hover_icon icon-plus-2"></span>
									<?php 
            echo $link_end;
        }
        ?>
							</div>
						</div></div>	<!-- /.info-back /.info -->
						<?php 
        if ($post_options['hover'] == 'circle effect8') {
            ?>
						</div>			<!-- /.info-container -->
						<?php 
        }
        ?>
					</div>				<!-- /.post_content -->
				</<?php 
        echo $tag;
        ?>
>	<!-- /.post_item -->
			</div>						<!-- /.isotope_item -->
			<?php 
    }
コード例 #28
0
ファイル: core.wp.php プロジェクト: pcuervo/odc
 function axiom_get_nav_menu($slug = '', $custom_walker = false)
 {
     $menu = !empty($slug) ? axiom_get_custom_option($slug) : '';
     $args = array('menu' => empty($menu) || $menu == 'default' || axiom_is_inherit_option($menu) ? '' : $menu, 'container' => '', 'container_class' => '', 'container_id' => '', 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>', 'menu_class' => (!empty($slug) ? $slug : 'menu_main') . '_nav', 'menu_id' => !empty($slug) ? $slug : 'menu_main', 'echo' => false, 'fallback_cb' => '', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'depth' => 11);
     if (!empty($slug)) {
         $args['theme_location'] = $slug;
     }
     if ($custom_walker && class_exists('axiom_custom_menu_walker') && axiom_get_theme_option('custom_menu') == 'yes') {
         $args['walker'] = new axiom_custom_menu_walker();
     }
     return wp_nav_menu($args);
 }
コード例 #29
0
ファイル: single-standard.php プロジェクト: pcuervo/odc
    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');
    }
コード例 #30
0
ファイル: user-panel.php プロジェクト: pcuervo/odc
"><?php 
    _e('Add bookmark', 'axiom');
    ?>
</a></li>
			<?php 
    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