예제 #1
0
 function render_item($item)
 {
     // if has filter for this item
     if ($html = apply_filters('screenr_slider_render_item', '', $item)) {
         return $html;
     }
     $url = screenr_get_media_url($item['media']);
     $html = '<div class="swiper-slide slide-align-' . esc_attr($item['position']) . ' slide_content slide_content_' . esc_attr($item['layout']) . '" style="background-image: url(\'' . esc_attr($url) . '\')">';
     $style = '';
     if ($item['pd_top'] != '') {
         $style .= 'padding-top: ' . floatval($item['pd_top']) . '%; ';
     }
     if ($item['pd_bottom'] != '') {
         $style .= 'padding-bottom: ' . floatval($item['pd_bottom']) . '%; ';
     }
     if ($style != '') {
         $style = ' style="' . $style . '" ';
     }
     $html .= '<div class="swiper-slide-intro">';
     $html .= '<div class="swiper-intro-inner"' . $style . '>';
     $content = isset($item['content_' . $item['layout']]) ? $item['content_' . $item['layout']] : '';
     if (!$content && $item['layout'] == 'layout_1') {
         $content = wp_kses_post('<h1><strong>' . esc_html__('Your business, your website', 'screenr') . '</strong></h1>' . "\r\n" . esc_html__('Screenr is a multiuse fullscreen WordPress theme', 'screenr') . "\r\n" . '<a class="btn btn-lg btn-theme-primary" href="#features">' . esc_html__('Get Started', 'screenr') . '</a><a class="btn btn-lg btn-secondary-outline" href="#contact">' . esc_html__('Contact Now', 'screenr') . '</a>');
     }
     if ($content) {
         $html .= apply_filters('screenr_content_text', $content);
     }
     $html .= '</div>';
     $html .= '</div>';
     $html .= '<div class="overlay"></div>';
     $html .= '</div>';
     return $html;
 }
예제 #2
0
$items = get_theme_mod('clients_items');
if (is_array($items) && !empty($items)) {
    $layout = absint(get_theme_mod('clients_layout', 5));
    if ($layout == 0) {
        $layout = 5;
    }
    ?>
            <div class="section-client-content">
                <div class="clients-wrapper client-<?php 
    echo esc_attr($layout);
    ?>
-cols">
                    <?php 
    foreach ($items as $item) {
        $item = wp_parse_args($item, array('title' => '', 'image' => '', 'url' => ''));
        $image = screenr_get_media_url($item['image']);
        if (!$image) {
            continue;
        }
        ?>
                        <div class="client-col" title="<?php 
        echo esc_attr($item['title']);
        ?>
">
                            <?php 
        if ($item['url']) {
            ?>
<a title="<?php 
            echo esc_attr($item['title']);
            ?>
" href="<?php