Example #1
0
<ul class="list-unstyled <?php 
echo $connected;
?>
 box-list">
<?php 
foreach ($services as $post) {
    setup_postdata($post);
    global $more;
    // Declare global $more (before the loop).
    $more = 0;
    $link = oxy_get_slide_link($post);
    $link_target = get_post_meta($post->ID, THEME_SHORT . '_link_target', true);
    ?>
    <li class="row">
        <div class="col-md-3">
        <?php 
    echo oxy_create_shaped_featured_image($post, $image_shape, $image_size, $image_shadow === 'show', $link);
    ?>
        </div>
        <div class="col-md-9">
        <?php 
    if ('show' === $show_titles) {
        ?>
            <h2 class="bordered small-screen-center">
            <?php 
        if ('on' === $link_titles) {
            ?>
                <a href="<?php 
            echo $link;
            ?>
">
Example #2
0
 function oxy_create_service($service_post, $atts)
 {
     extract(shortcode_atts(array('service' => '', 'text_color' => 'text-normal', 'image_shape' => 'round', 'image_size' => 'big', 'icon_colour' => '', 'icon_animation' => 'bounce', 'background_colour' => '', 'overlay_grid' => '0', 'show_title' => 'show', 'tag_title' => 'h3', 'link_title' => 'on', 'show_image' => 'show', 'link_image' => 'on', 'show_excerpt' => 'show', 'align' => 'center', 'show_readmore' => 'hide', 'readmore_text' => 'read more', 'extra_classes' => '', 'margin_top' => '20', 'margin_bottom' => '20', 'scroll_animation' => 'none', 'scroll_animation_delay' => '0', 'hidden_on_large' => 'off', 'hidden_on_medium' => 'off', 'hidden_on_small' => 'off', 'hidden_on_xsmall' => 'off'), $atts));
     global $post;
     $post = $service_post;
     setup_postdata($post);
     // get services data
     $icon = get_post_meta($post->ID, THEME_SHORT . '_icon', true);
     $link_target = get_post_meta($post->ID, THEME_SHORT . '_target', true);
     $animation = $icon_animation;
     // get link
     $link = oxy_get_slide_link($post);
     // get image
     $img_size = $image_shape === 'round' ? 'square-image' : $image_shape . '-image';
     $image_src = '';
     $featured_image_id = get_post_thumbnail_id($post->ID);
     if (!empty($featured_image_id)) {
         $image = wp_get_attachment_image_src($featured_image_id, $img_size);
         if (isset($image[0])) {
             $image_src = $image[0];
         }
     }
     // setup surrounding dic classes
     $classes = array();
     $classes[] = oxy_add_extra_shortcode_classes($atts);
     $classes[] = $text_color;
     $classes[] = 'element-top-' . $margin_top;
     $classes[] = 'element-bottom-' . $margin_bottom;
     $classes[] = 'text-' . $align;
     if ($scroll_animation !== 'none') {
         $classes[] = 'os-animation';
     }
     // setup image classes
     $figure_classes = array('box-' . $image_shape);
     if ($image_size != 'none') {
         $figure_classes[] = 'box-' . $image_size;
     }
     $figure_classes[] = 'box-simple';
     $shape_background_color = empty($background_colour) ? '' : ' style="background-color:' . esc_attr($background_colour) . ';"';
     $icon_colour_attr = empty($icon_colour) ? '' : ' style="color:' . esc_attr($icon_colour) . ';"';
     $overlay_classes = array('grid-overlay-' . $overlay_grid);
     ob_start();
     include locate_template('partials/shortcodes/services/service.php');
     $output = ob_get_contents();
     ob_end_clean();
     return $output;
 }
Example #3
0
    $caption_title .= ' <span>' . $position . '</span>';
}
?>
<div class="<?php 
echo implode(' ', $classes);
?>
" data-os-animation="<?php 
echo $scroll_animation;
?>
" data-os-animation-delay="<?php 
echo $scroll_animation_delay;
?>
s">

    <?php 
echo oxy_section_vc_single_image(array('image' => get_post_thumbnail_id($post->ID), 'size' => $item_size, 'alt' => get_the_title($post->ID), 'link' => oxy_get_slide_link($post), 'link_target' => $item_link_target, 'item_link_type' => $item_link_type, 'captions_below' => $item_captions_below, 'captions_below_link_type' => $captions_below_link_type, 'caption_title' => $caption_title, 'caption_text' => get_the_excerpt(), 'caption_align' => $item_caption_align, 'hover_filter' => $item_hover_filter, 'hover_filter_invert' => $hover_filter_invert, 'overlay' => $item_overlay, 'overlay_caption_vertical' => $item_caption_vertical, 'overlay_animation' => $item_overlay_animation, 'overlay_grid' => $item_overlay_grid, 'overlay_icon' => $item_overlay_icon, 'margin_top' => 'no-top', 'margin_bottom' => 'no-bottom', 'scroll_animation' => 'none', 'scroll_animation_delay' => 0, 'portfolio_item' => false));
if ($show_social === 'show') {
    ?>
        <ul class="social-icons element-short-top element-short-bottom text-<?php 
    echo $item_caption_align;
    ?>
">  <?php 
    for ($i = 0; $i < 5; $i++) {
        $icon = isset($custom_fields[THEME_SHORT . '_icon' . $i]) ? $custom_fields[THEME_SHORT . '_icon' . $i][0] : '';
        $url = isset($custom_fields[THEME_SHORT . '_link' . $i]) ? $custom_fields[THEME_SHORT . '_link' . $i][0] : '';
        if ($url !== '') {
            ?>
                <li>
                    <a href="<?php 
            echo $url;
            ?>
Example #4
0
function oxy_shortcode_service($atts, $content = '')
{
    extract(shortcode_atts(array('service' => '', 'image_shape' => 'round', 'image_size' => 'big', 'icon_colour' => '#000000', 'icon_animation' => 'bounce', 'icon_effect' => 'on', 'background_colour' => '#e9e9e9', 'hover_effect' => '#e9e9e9', 'overlay_grid' => '0', 'show_title' => 'show', 'link_title' => 'on', 'title_size' => 'normal', 'title_weight' => 'regular', 'title_underline' => 'underline', 'title_underline_size' => 'bordered-normal', 'show_image' => 'show', 'link_image' => 'on', 'show_excerpt' => 'show', 'align' => 'center', 'show_readmore' => 'show', 'readmore_text' => 'read more', 'extra_classes' => '', 'margin_top' => 'normal-top', 'margin_bottom' => 'normal-bottom', 'scroll_animation' => 'none', 'scroll_animation_delay' => '0'), $atts));
    $query = array('post_type' => 'oxy_service', 'numberposts' => 1, 'name' => $service, 'post_status' => 'publish');
    // get the service
    $service = get_posts($query);
    if (count($service) > 0) {
        global $post;
        $post = $service[0];
        setup_postdata($post);
        // get services data
        $fa_icon = get_post_meta($post->ID, THEME_SHORT . '_fa_icon', true);
        $svg_icon = get_post_meta($post->ID, THEME_SHORT . '_svg_icon', true);
        $link_target = get_post_meta($post->ID, THEME_SHORT . '_target', true);
        $animation = $icon_animation;
        // get link
        $link = oxy_get_slide_link($post);
        // get image
        $img_size = $image_shape === 'round' ? 'square-image' : $image_shape . '-image';
        $image_src = '';
        $featured_image_id = get_post_thumbnail_id($post->ID);
        if (!empty($featured_image_id)) {
            $image = wp_get_attachment_image_src($featured_image_id, $img_size);
            if (isset($image[0])) {
                $image_src = $image[0];
            }
        }
        // setup surrounding dic classes
        $classes = array();
        $classes[] = $extra_classes;
        $classes[] = 'element-' . $margin_top;
        $classes[] = 'element-' . $margin_bottom;
        $classes[] = 'text-' . $align;
        if ($scroll_animation !== 'none') {
            $classes[] = 'os-animation';
        }
        $header_classes = array();
        $header_classes[] = $title_size;
        $header_classes[] = $title_weight;
        $header_classes[] = $title_underline;
        $header_classes[] = $title_underline_size;
        // setup image classes
        $figure_classes = array('box-' . $image_shape);
        if ($image_size != 'none') {
            $figure_classes[] = 'box-' . $image_size;
        }
        if ($icon_effect != 'on') {
            $figure_classes[] = 'box-simple';
        }
        $overlay_classes = array('grid-overlay-' . $overlay_grid);
        ob_start();
        include locate_template('partials/shortcodes/services/service.php');
        $output = ob_get_contents();
        ob_end_clean();
    }
    // reset post data because we are all done here
    wp_reset_postdata();
    return $output;
}
Example #5
0
<div class="figure fade-none <?php 
echo esc_attr(implode(' ', $classes));
?>
" data-os-animation="<?php 
echo esc_attr($scroll_animation);
?>
" data-os-animation-delay="<?php 
echo esc_attr($scroll_animation_delay);
?>
s">
    <a href="<?php 
echo esc_url(oxy_get_slide_link($post));
?>
" class="figure-image">
        <?php 
if (!empty($src)) {
    ?>
            <img src="<?php 
    echo esc_url($src);
    ?>
" alt="<?php 
    echo get_the_title($post->ID);
    ?>
">
        <?php 
}
?>
        <div class="figure-overlay">
            <div class="figure-overlay-container">
                <div class="figure-caption">
                    <<?php 
Example #6
0
            <div class="masonry-item portfolio-item <?php 
    echo implode(' ', $post->classes);
    ?>
" data-menu-order="<?php 
    echo $post->menu_order;
    ?>
" data-date="<?php 
    echo get_the_date('c');
    ?>
" data-title="<?php 
    the_title();
    ?>
" data-comments="<?php 
    echo $post->comment_count;
    ?>
">
                <?php 
    echo oxy_complex_image(array('image' => get_post_thumbnail_id($post->ID), 'size' => $item_size, 'title' => $title, 'alt' => get_the_title($post->ID), 'link' => oxy_get_slide_link($post), 'link_target' => $item_link_target, 'item_link_type' => $item_link_type, 'magnific_link' => $magnific_link, 'magnific_popup_caption' => $magnific_popup_caption, 'magnific_type' => $magnific_type, 'captions_below' => $item_captions_below, 'captions_below_link_type' => $captions_below_link_type, 'caption_title' => get_the_title($post->ID), 'caption_text' => get_the_excerpt(), 'caption_align' => $item_caption_align, 'hover_filter' => $item_hover_filter, 'hover_filter_invert' => $hover_filter_invert, 'overlay' => $item_overlay, 'button_text_zoom' => oxy_get_option('portfolio_button_text_zoom'), 'button_text_details' => oxy_get_option('portfolio_button_text_details'), 'overlay_caption_vertical' => $item_caption_vertical, 'overlay_animation' => $item_overlay_animation, 'overlay_grid' => $item_overlay_grid, 'overlay_icon' => $item_overlay_icon, 'margin_top' => 0, 'margin_bottom' => 0, 'scroll_animation' => $item_scroll_animation, 'portfolio_item' => true, 'scroll_animation_delay' => $item_scroll_animation_delay));
    ?>
            </div>
            <?php 
    if ($item_scroll_animation_timing === 'staggered') {
        $item_scroll_animation_delay += $item_delay;
    }
}
?>
</div>
<?php 
if ($pagination !== 'none') {
    oxy_portfolio_pagination($pagination);
}