$slide_info_attr['data-left'][] = $data['info_box_left'];
                $slide_info_attr['data-top'][] = $data['info_box_top'];
            }
            if ($data['dim_background'] == '1') {
                $slide_info_attr['class'][] = 'dim-background';
            }
            ?>
                    <article<?php 
            echo it_array_to_attributes($slide_attr);
            ?>
><?php 
            if ($data['subtitle'] || $data['title'] || $data['description'] || $data['link'] || $data['link_portfolio']) {
                ?>

                                <div<?php 
                echo it_array_to_attributes($slide_info_attr);
                ?>
>
                                    <div class="viewport">
                                        <div class="animate-1"><?php 
                if ($data['subtitle']) {
                    ?>
                                                <p class="slide-subtitle"><?php 
                    echo $data['subtitle'];
                    ?>
</p><?php 
                }
                if ($data['title']) {
                    ?>
                                                <h2 class="slide-title"><?php 
                    echo $data['title'];
Пример #2
0
        if (!$featured) {
            continue;
        }
        // We have no media on this project, nothing to show.
        $attr['class'] = 'horizontal-item project';
        if ($featured->is_image()) {
            $image = $featured->get_image_data('gp-max');
        } else {
            $image = $featured->get_video_thumbnail('gp-max');
        }
        if (!$image) {
            $image = array('src' => get_template_directory_uri() . '/images/no-portfolio-thumbnail.png', 'width' => 1920, 'height' => 1280);
        }
        ?>
                    <article <?php 
        echo it_array_to_attributes($attr);
        ?>
>

                        <div class="preview">

                            <img class="featured-image" src="<?php 
        echo esc_url($image['src']);
        ?>
" width="<?php 
        echo esc_attr($image['width']);
        ?>
" height="<?php 
        echo esc_attr($image['height']);
        ?>
" alt="<?php 
Пример #3
0
/**
 * Share widget
 */
function gp_get_social_share($args = array())
{
    if (is_404()) {
        return false;
    }
    $option = of_get_option('gp_share_enabled');
    if ($option && $option == '1') {
        $share_services = of_get_option('gp_share_services');
        $data_services = array();
        if (is_array($share_services) && count($share_services)) {
            foreach ($share_services as $key => $service) {
                if ($service) {
                    $key = $key == 'googleplus' ? 'googlePlus' : $key;
                    $data_services[] = $key;
                }
            }
        }
        if (count($data_services) == 0) {
            return false;
        }
        $defaults = array('data-url' => array(esc_url(get_permalink())), 'data-curl' => array(esc_url(get_template_directory_uri() . '/lib/sharrre.php')), 'data-services' => array(join(',', $data_services)), 'data-title' => array(__('Share', 'gp')), 'class' => array('sharrre'));
        $args = array_merge($defaults, $args);
        $html = '<div' . it_array_to_attributes($args) . '></div>';
        return $html;
    } else {
        return false;
    }
}