function widget($args, $instance)
 {
     global $theme_option;
     $title = apply_filters('widget_title', $instance['title']);
     $category = $instance['category'];
     $thumbnail_size = $instance['thumbnail_size'];
     // Opening of widget
     echo $args['before_widget'];
     // Open of title tag
     if (!empty($title)) {
         echo $args['before_title'] . $title . $args['after_title'];
     }
     // Widget Content
     $player = get_posts(array('suppress_filters' => 0, 'name' => $category, 'post_type' => 'player', 'post_status' => 'publish', 'numberposts' => 1));
     $player_val = gdlr_lms_decode_preventslashes(get_post_meta($player[0]->ID, 'gdlr-soccer-player-settings', true));
     $player_options = empty($player_val) ? array() : json_decode($player_val, true);
     echo '<div class="feature-player-widget-wrapper">';
     echo '<div class="feature-player-widget-thumbnail">';
     echo gdlr_get_image(get_post_thumbnail_id($player[0]->ID), $thumbnail_size, true);
     echo '</div>';
     echo '<div class="feature-player-widget-title-wrapper">';
     echo '<h4 class="feature-player-widget-title">' . $player[0]->post_title . '</h4>';
     echo '<div class="feature-player-widget-position">';
     echo '<span class="gdlr-soccer-player-squad" >' . $player_options['player-info']['squad'] . '</span>';
     echo $player_options['player-info']['position'];
     echo '</div>';
     echo '</div>';
     // feature-player-widget-title
     echo '<div class="feature-player-widget-info-wrapper">';
     if (!empty($player_options['player-info']['games-played']) || $player_options['player-info']['games-played'] === "0") {
         echo '<div class="feature-player-widget-info">';
         echo '<span class="gdlr-head">' . $player_options['player-info']['games-played'] . '</span>';
         echo '<span class="gdlr-tail">' . __('Games Played', 'gdlr_translate') . '</span>';
         echo '</div>';
     }
     if (!empty($player_options['player-stats']['goals']) || $player_options['player-stats']['goals'] === "0") {
         echo '<div class="feature-player-widget-info">';
         echo '<span class="gdlr-head">' . $player_options['player-stats']['goals'] . '</span>';
         echo '<span class="gdlr-tail">' . __('Goals', 'gdlr_translate') . '</span>';
         echo '</div>';
     }
     if (!empty($player_options['player-stats']['assists']) || $player_options['player-stats']['assists'] === "0") {
         echo '<div class="feature-player-widget-info">';
         echo '<span class="gdlr-head">' . $player_options['player-stats']['assists'] . '</span>';
         echo '<span class="gdlr-tail">' . __('Assists', 'gdlr_translate') . '</span>';
         echo '</div>';
     }
     echo '</div>';
     // feature-player-widget-info
     echo '<a class="feature-player-widget-link gdlr-button with-border" href="' . get_permalink($player[0]->ID) . '" >' . __('View Profile & Stats', 'gdlr_translate') . '</a>';
     echo '</div>';
     // feature-player-widget-wrapper
     // Closing of widget
     echo $args['after_widget'];
 }
 function widget($args, $instance)
 {
     global $theme_option;
     $title = apply_filters('widget_title', $instance['title']);
     $category = $instance['category'];
     $num_fetch = $instance['num_fetch'];
     // Opening of widget
     echo $args['before_widget'];
     // Open of title tag
     if (!empty($title)) {
         echo $args['before_title'] . $title . $args['after_title'];
     }
     // Widget Content
     $current_post = array(get_the_ID());
     $query_args = array('post_type' => 'post', 'suppress_filters' => false);
     $query_args['posts_per_page'] = $num_fetch;
     $query_args['orderby'] = 'comment_count';
     $query_args['order'] = 'desc';
     $query_args['paged'] = 1;
     $query_args['category_name'] = $category;
     $query_args['ignore_sticky_posts'] = 1;
     $query_args['post__not_in'] = array(get_the_ID());
     $query = new WP_Query($query_args);
     if ($query->have_posts()) {
         echo '<div class="gdlr-recent-post-widget">';
         while ($query->have_posts()) {
             $query->the_post();
             echo '<div class="recent-post-widget">';
             $thumbnail = gdlr_get_image(get_post_thumbnail_id(), 'thumbnail');
             if (!empty($thumbnail)) {
                 echo '<div class="recent-post-widget-thumbnail"><a href="' . get_permalink() . '" >' . $thumbnail . '</a></div>';
             }
             echo '<div class="recent-post-widget-content">';
             echo '<div class="recent-post-widget-title"><a href="' . get_permalink() . '" >' . get_the_title() . '</a></div>';
             echo '<div class="recent-post-widget-info">';
             echo '<div class="blog-info blog-comment">';
             echo '<i class="icon-comment"></i>';
             comments_popup_link(__('0 Comment', 'gdlr_translate'), __('1 Comment', 'gdlr_translate'), __('% Comments', 'gdlr_translate'), '', __('Comments are Off', 'gdlr_translate'));
             echo '</div>';
             // blog-info
             echo '</div>';
             // recent-post-widget-info
             echo '</div>';
             // recent-post-widget-content
             echo '<div class="clear"></div>';
             echo '</div>';
             // recent-post-widget
         }
         echo '<div class="clear"></div>';
         echo '</div>';
     }
     wp_reset_postdata();
     // Closing of widget
     echo $args['after_widget'];
 }
 function widget($args, $instance)
 {
     global $theme_option;
     $title = apply_filters('widget_title', $instance['title']);
     $category = $instance['category'];
     $num_fetch = $instance['num_fetch'];
     $thumbnail_size = $instance['thumbnail_size'];
     // Opening of widget
     echo $args['before_widget'];
     // Open of title tag
     if (!empty($title)) {
         echo $args['before_title'] . $title . $args['after_title'];
     }
     // Widget Content
     $current_post = array(get_the_ID());
     $query_args = array('post_type' => 'portfolio', 'suppress_filters' => false);
     $query_args['posts_per_page'] = $num_fetch;
     $query_args['orderby'] = 'post_date';
     $query_args['order'] = 'desc';
     $query_args['paged'] = 1;
     $query_args['portfolio_category'] = $category;
     $query_args['ignore_sticky_posts'] = 1;
     $query_args['post__not_in'] = array(get_the_ID());
     $query = new WP_Query($query_args);
     if ($query->have_posts()) {
         echo '<div class="gdlr-post-slider-widget">';
         echo '<div class="flexslider" >';
         echo '<ul class="slides" >';
         while ($query->have_posts()) {
             $query->the_post();
             $image_id = get_post_thumbnail_id();
             if (!empty($image_id)) {
                 echo '<li>';
                 echo '<a href="' . get_permalink() . '" >';
                 echo gdlr_get_image($image_id, $thumbnail_size);
                 echo '<div class="gdlr-caption-wrapper post-slider">';
                 echo '<div class="gdlr-caption-title">';
                 echo get_the_title();
                 echo '</div>';
                 // gdlr-caption-title
                 echo '</div>';
                 // gdlr-caption-wrapper
                 echo '</a>';
                 echo '</li>';
             }
         }
         echo '</ul>';
         echo '</div>';
         echo '</div>';
         // gdlr-post-slider-widget
     }
     wp_reset_postdata();
     // Closing of widget
     echo $args['after_widget'];
 }
function gdlr_soccer_get_player_avatar($size = 'thumbnail', $link = true)
{
    if (function_exists('gdlr_get_image')) {
        if (is_single() && $link) {
            return '<div class="gdlr-soccer-player-thumbnail">' . gdlr_get_image(get_post_thumbnail_id(), $size, true) . '</div>';
        } else {
            return '<div class="gdlr-soccer-player-thumbnail">' . gdlr_get_image(get_post_thumbnail_id(), $size, array('url' => get_permalink())) . '</div>';
        }
    }
    return '';
}
function gdlr_get_session_thumbnail($size = 'thumbnail')
{
    $image_id = get_post_thumbnail_id();
    if (!empty($image_id)) {
        if (is_single()) {
            return '<div class="gdlr-session-thumbnail">' . gdlr_get_image($image_id, $size, true) . '</div>';
        } else {
            $ret = '<div class="gdlr-session-thumbnail"><a href="' . get_permalink() . '" >';
            $ret .= gdlr_get_image($image_id, $size);
            $ret .= '</a></div>';
            return $ret;
        }
    }
    return '';
}
 function widget($args, $instance)
 {
     global $theme_option;
     $title = apply_filters('widget_title', $instance['title']);
     $category = $instance['category'];
     $num_fetch = $instance['num_fetch'];
     // Opening of widget
     echo $args['before_widget'];
     // Open of title tag
     if (!empty($title)) {
         echo $args['before_title'] . $title . $args['after_title'];
     }
     // Widget Content
     $current_post = array(get_the_ID());
     $query_args = array('post_type' => 'cause', 'suppress_filters' => false);
     $query_args['posts_per_page'] = $num_fetch;
     $query_args['orderby'] = 'post_date';
     $query_args['order'] = 'desc';
     $query_args['paged'] = 1;
     $query_args['cause_category'] = $category;
     $query_args['ignore_sticky_posts'] = 1;
     $query_args['post__not_in'] = array(get_the_ID());
     $query = new WP_Query($query_args);
     if ($query->have_posts()) {
         echo '<div class="gdlr-recent-post-widget">';
         while ($query->have_posts()) {
             $query->the_post();
             echo '<div class="recent-post-widget">';
             $thumbnail = gdlr_get_image(get_post_thumbnail_id(), 'thumbnail');
             $cause_option = json_decode(gdlr_decode_preventslashes(get_post_meta(get_the_ID(), 'post-option', true)), true);
             if (!empty($thumbnail)) {
                 echo '<div class="recent-post-widget-thumbnail"><a href="' . get_permalink() . '" >' . $thumbnail . '</a></div>';
             }
             echo '<div class="recent-post-widget-content">';
             echo '<div class="recent-post-widget-title"><a href="' . get_permalink() . '" ><span class="causeWidgetLink">' . get_the_title() . '</span></a></div>';
             echo gdlr_cause_donation_amount($cause_option['goal-of-donation'], $cause_option['current-funding']);
             echo '<p>' . substr(get_the_excerpt(), 0, 90) . '...</p>';
             echo '</div>';
             echo '<div class="clear"></div>';
             echo '</div>';
         }
         echo '<div class="clear"></div>';
         echo '</div>';
     }
     wp_reset_postdata();
     // Closing of widget
     echo $args['after_widget'];
 }
 function gdlr_get_cause_thumbnail($size = 'full')
 {
     $ret = '';
     $image_id = get_post_thumbnail_id();
     if (!empty($image_id)) {
         $ret = '<div class="gdlr-cause-thumbnail" >';
         if (is_single()) {
             $ret .= gdlr_get_image($image_id, $size);
         } else {
             $ret .= '<a href="' . get_permalink() . '" >';
             $ret .= gdlr_get_image($image_id, $size);
             $ret .= '</a>';
         }
         $ret .= '</div>';
     }
     return $ret;
 }
 function widget($args, $instance)
 {
     global $theme_option;
     $title = apply_filters('widget_title', $instance['title']);
     $category = $instance['category'];
     $num_fetch = $instance['num_fetch'];
     // Opening of widget
     echo $args['before_widget'];
     // Open of title tag
     if (!empty($title)) {
         echo $args['before_title'] . $title . $args['after_title'];
     }
     // Widget Content
     $current_post = array(get_the_ID());
     $query_args = array('post_type' => 'portfolio', 'suppress_filters' => false);
     $query_args['posts_per_page'] = $num_fetch;
     $query_args['orderby'] = 'post_date';
     $query_args['order'] = 'desc';
     $query_args['paged'] = 1;
     $query_args['portfolio_category'] = $category;
     $query_args['post__not_in'] = array(get_the_ID());
     $query = new WP_Query($query_args);
     if ($query->have_posts()) {
         echo '<div class="gdlr-recent-port-widget">';
         while ($query->have_posts()) {
             $query->the_post();
             echo '<div class="recent-post-widget">';
             $thumbnail = gdlr_get_image(get_post_thumbnail_id(), 'thumbnail');
             if (!empty($thumbnail)) {
                 echo '<div class="recent-post-widget-thumbnail"><a href="' . get_permalink() . '" >' . $thumbnail . '</a></div>';
             }
             echo '<div class="recent-post-widget-content">';
             echo '<div class="recent-post-widget-title"><a href="' . get_permalink() . '" >' . get_the_title() . '</a></div>';
             echo '<div class="recent-post-widget-info">' . gdlr_get_blog_info(array('date'), false) . '</div>';
             echo '</div>';
             echo '<div class="clear"></div>';
             echo '</div>';
         }
         echo '<div class="clear"></div>';
         echo '</div>';
     }
     wp_reset_postdata();
     // Closing of widget
     echo $args['after_widget'];
 }
Beispiel #9
0
 function gdlr_get_gallery_thumbnail($settings)
 {
     $item_id = empty($settings['page-item-id']) ? '' : ' id="' . $settings['page-item-id'] . '" ';
     global $gdlr_spaces;
     $margin = !empty($settings['margin-bottom']) && $settings['margin-bottom'] != $gdlr_spaces['bottom-item'] ? 'margin-bottom: ' . $settings['margin-bottom'] . ';' : '';
     $margin_style = !empty($margin) ? ' style="' . $margin . '" ' : '';
     $ret = '<div class="gdlr-gallery-item gdlr-item gdlr-gallery-thumbnail" ' . $item_id . $margin_style . '>';
     // full image
     $ret .= '<div class="gdlr-gallery-thumbnail-container">';
     foreach ($settings['slider'] as $slide_id => $slide) {
         $ret .= '<div class="gdlr-gallery-thumbnail" data-id="' . $slide_id . '" >';
         $ret .= gdlr_get_image($slide_id);
         if ($settings['show-caption'] != 'no') {
             $ret .= '<div class="gallery-caption-wrapper">';
             $ret .= '<span class="gallery-caption">';
             $ret .= gdlr_get_attachment_info($slide_id, 'caption');
             $ret .= '</span>';
             $ret .= '</div>';
         }
         $ret .= '</div>';
     }
     $ret .= '</div>';
     // start printing gallery
     $current_size = 0;
     foreach ($settings['slider'] as $slide_id => $slide) {
         if (!empty($current_size) && $current_size % $settings['gallery-columns'] == 0) {
             $ret .= '<div class="clear"></div>';
         }
         $ret .= '<div class="gallery-column ' . gdlr_get_column_class('1/' . $settings['gallery-columns']) . '">';
         $ret .= '<div class="gallery-item" data-id="' . $slide_id . '" >';
         $ret .= gdlr_get_image($slide_id, $settings['thumbnail-size']);
         $ret .= '</div>';
         // gallery item
         $ret .= '</div>';
         // gallery column
         $current_size++;
     }
     $ret .= '<div class="clear"></div>';
     $ret .= '</div>';
     // gdlr-gallery-item
     return $ret;
 }
 function gdlr_get_modern_page_list($query, $size, $thumbnail_size, $layout = 'fitRows')
 {
     $current_size = 0;
     $ret = '<div class="gdlr-isotope" data-type="portfolio" data-layout="' . $layout . '" >';
     while ($query->have_posts()) {
         $query->the_post();
         if ($current_size % $size == 0) {
             $ret .= '<div class="clear"></div>';
         }
         $ret .= '<div class="' . gdlr_get_column_class('1/' . $size) . '">';
         $ret .= '<div class="gdlr-item gdlr-portfolio-item gdlr-modern-portfolio">';
         // overlay
         $ret .= '<div class="portfolio-thumbnail gdlr-image">';
         $ret .= gdlr_get_image(get_post_thumbnail_id(), $thumbnail_size);
         $ret .= '<a class="portfolio-overlay-wrapper" href="' . get_permalink() . '" >';
         $ret .= '<span class="portfolio-overlay" >';
         $ret .= '<span class="portfolio-icon" ><i class="icon-link" ></i></span>';
         $ret .= '</span>';
         $ret .= '<div class="portfolio-thumbnail-bar"></div>';
         $ret .= '</a>';
         // content
         $ret .= '<div class="portfolio-content-wrapper">';
         $ret .= '<div class="portfolio-content-overlay"></div>';
         $ret .= '<h3 class="portfolio-title"><a href="' . get_permalink() . '" >' . get_the_title() . '</a></h3>';
         $ret .= '</div>';
         // portfolio-content-wrapper
         $ret .= '</div>';
         // portfolio-thumbnail
         $ret .= '</div>';
         // gdlr-item
         $ret .= '</div>';
         // column class
         $current_size++;
     }
     $ret .= '</div>';
     wp_reset_postdata();
     return $ret;
 }
Beispiel #11
0
            echo gdlr_get_image($theme_option['logo-id']);
        }
    } else {
        if (empty($theme_option['logo-id'])) {
            $theme_option['logo-id'] = GDLR_PATH . '/images/logo.png';
        } else {
            if (is_numeric($theme_option['logo-id'])) {
                $image_src = wp_get_attachment_image_src($theme_option['logo-id'], 'full');
                $theme_option['logo-id'] = $image_src[0];
            }
        }
        $attr = ' data-normal="' . $theme_option['logo-id'] . '" ';
        if (empty($theme_option['logot-id'])) {
            echo gdlr_get_image(GDLR_PATH . '/images/logot.png', 'full', array(), $attr);
        } else {
            echo gdlr_get_image($theme_option['logot-id'], 'full', array(), $attr);
        }
    }
    ?>
						</a>
						<?php 
    // mobile navigation
    if (class_exists('gdlr_dlmenu_walker') && has_nav_menu('main_menu') && (empty($theme_option['enable-responsive-mode']) || $theme_option['enable-responsive-mode'] == 'enable')) {
        echo '<div class="gdlr-responsive-navigation dl-menuwrapper" id="gdlr-responsive-navigation" >';
        echo '<button class="dl-trigger">Open Menu</button>';
        wp_nav_menu(array('theme_location' => 'main_menu', 'container' => '', 'menu_class' => 'dl-menu gdlr-main-mobile-menu', 'walker' => new gdlr_dlmenu_walker()));
        echo '</div>';
    }
    ?>
					</div>
				</div>
 function gdlr_get_portfolio_thumbnail($post_option, $size = 'full')
 {
     global $gdlr_related_section;
     if (is_single() && $post_option['inside-thumbnail-type'] != 'thumbnail-type' && empty($gdlr_related_section)) {
         $type = 'inside-';
     } else {
         $type = '';
     }
     switch ($post_option[$type . 'thumbnail-type']) {
         case 'feature-image':
             $image_id = get_post_thumbnail_id();
             if (!empty($image_id)) {
                 if (!is_single() || $gdlr_related_section) {
                     $ret = gdlr_get_image($image_id, $size);
                     $ret .= '<a class="portfolio-overlay-wrapper" ' . gdlr_get_portfolio_thumbnail_link($post_option) . ' >';
                     $ret .= '<span class="portfolio-overlay" >&nbsp;</span>';
                     $ret .= '<span class="portfolio-icon" ><i class="' . gdlr_get_portfolio_icon_class($post_option) . '" ></i></span>';
                     $ret .= '</a>';
                 } else {
                     $ret = gdlr_get_image($image_id, $size, true);
                 }
             }
             break;
         case 'image':
             $ret = gdlr_get_image($post_option[$type . 'thumbnail-image'], $size, true);
             break;
         case 'video':
             if (is_single() && empty($gdlr_related_section)) {
                 $ret = gdlr_get_video($post_option[$type . 'thumbnail-video'], 'full');
             } else {
                 $ret = gdlr_get_video($post_option[$type . 'thumbnail-video'], $size);
             }
             break;
         case 'slider':
             $ret = gdlr_get_slider($post_option[$type . 'thumbnail-slider'], $size);
             break;
         case 'stack-image':
             $ret = gdlr_get_stack_images($post_option[$type . 'thumbnail-slider']);
             break;
         default:
             $ret = '';
     }
     return $ret;
 }
Beispiel #13
0
			<div class="gdlr-header-container container">
				<div class="gdlr-header-inner">
					<!-- logo -->
					<div class="gdlr-logo gdlr-align-left">
						<?php 
    echo is_front_page() ? '<h1>' : '';
    ?>
						<a href="<?php 
    echo home_url();
    ?>
" >
							<?php 
    if (empty($theme_option['logo-id'])) {
        echo gdlr_get_image(GDLR_PATH . '/images/logo.png');
    } else {
        echo gdlr_get_image($theme_option['logo-id']);
    }
    ?>
						
						</a>
						<?php 
    echo is_front_page() ? '</h1>' : '';
    ?>
						<?php 
    // mobile navigation
    if (class_exists('gdlr_dlmenu_walker') && (empty($theme_option['enable-responsive-mode']) || $theme_option['enable-responsive-mode'] == 'enable')) {
        echo '<div class="gdlr-responsive-navigation dl-menuwrapper" id="gdlr-responsive-navigation" >';
        echo '<button class="dl-trigger">Open Menu</button>';
        wp_nav_menu(array('theme_location' => 'main_menu', 'container' => '', 'menu_class' => 'dl-menu gdlr-main-mobile-menu', 'walker' => new gdlr_dlmenu_walker()));
        echo '</div>';
    }
<?php

/**
 * The template for displaying image post format
 */
global $gdlr_post_settings;
$post_format_data = '';
$content = trim(get_the_content(__('Read More', 'gdlr_translate')));
if (preg_match('#^<a.+<img.+/></a>|^<img.+/>#', $content, $match)) {
    $post_format_data = $match[0];
    $gdlr_post_settings['content'] = substr($content, strlen($match[0]));
} else {
    if (preg_match('#^https?://\\S+#', $content, $match)) {
        $post_format_data = gdlr_get_image($match[0], 'full', true);
        $gdlr_post_settings['content'] = substr($content, strlen($match[0]));
    } else {
        $gdlr_post_settings['content'] = $content;
    }
}
if (!empty($post_format_data)) {
    echo '<div class="gdlr-blog-thumbnail">';
    echo $post_format_data;
    if (!is_single() && is_sticky()) {
        echo '<div class="gdlr-sticky-banner">';
        echo '<i class="icon-bullhorn" ></i>';
        echo __('Sticky Post', 'gdlr_translate');
        echo '</div>';
    }
    echo '</div>';
}
?>
 $args['posts_per_page'] = empty($theme_option['related-post-num-fetch']) ? '4' : $theme_option['related-post-num-fetch'];
 $args['post__not_in'] = array(get_the_ID());
 $args['tax_query'] = array(array('terms' => $post_tags, 'taxonomy' => 'post_tag', 'field' => 'id'));
 $query = new WP_Query($args);
 if ($query->have_posts()) {
     $count = 0;
     echo '<div class="gdlr-related-post-wrapper">';
     echo '<span class="related-post-header">' . __('You may also like', 'gdlr_translate') . '</span>';
     echo '<div class="clear"></div>';
     while ($query->have_posts()) {
         $query->the_post();
         $count++;
         echo '<div class="related-post-widget three columns">';
         echo '<div class="related-post-widget-item">';
         $thumbnail_size = empty($theme_option['related-post-thumbnail-size']) ? 'thumbnail' : $theme_option['related-post-thumbnail-size'];
         $thumbnail = gdlr_get_image(get_post_thumbnail_id(), $thumbnail_size);
         if (!empty($thumbnail)) {
             echo '<div class="related-post-thumbnail"><a href="' . get_permalink() . '" >' . $thumbnail . '</a></div>';
         }
         echo '<div class="related-post-title"><a href="' . get_permalink() . '" >' . get_the_title() . '</a></div>';
         echo '<div class="clear"></div>';
         echo '</div>';
         echo '</div>';
         if ($count % 4 == 0) {
             echo '<div class="clear"></div>';
         }
     }
     echo '<div class="clear"></div>';
     echo '</div>';
     wp_reset_postdata();
 }
?>
</span>
					<span class="match-results-separator">-</span>
					<span class="match-results-score"><?php 
echo $match_options['away-goal'];
?>
</span>
					<span class="match-results-team"><?php 
echo $match_options['away'];
?>
</span>
					<?php 
if (!empty($match_options['away-flag'])) {
    ?>
						<span class="gdlr-team-flag"><?php 
    echo gdlr_get_image($match_options['away-flag']);
    ?>
</span>
					<?php 
}
?>
				</div>
				<div class="gdlr-soccer-match-results-info">
					<?php 
echo gdlr_soccer_get_match_info($match_options);
?>
				</div>
			</div>
		</div>
	</div>
	
function gdlr_print_league_small_table($team_list, $num_display)
{
    echo '<table class="gdlr-small-league-table" >';
    ?>
<tr class="gdlr-table-second-head">
	<th class="gdlr-table-team"><?php 
    echo __('Team', 'gdlr-soccer');
    ?>
</th>
	<th class="gdlr-table-score">W</th><th class="gdlr-table-score">D</th>
	<th class="gdlr-table-score">L</th><th class="gdlr-table-score">PTS</th>
</tr>
<?php 
    $count = 0;
    foreach ($team_list as $team_name => $team_score) {
        $count++;
        if ($count > $num_display && (empty($team_score['sticky']) || $team_score['sticky'] == 'disable')) {
            continue;
        }
        ?>
<tr <?php 
        echo !empty($team_score['sticky']) && $team_score['sticky'] == 'enable' ? 'class="gdlr-current-team"' : '';
        ?>
 >
	<td class="gdlr-table-team"><?php 
        echo '<span class="team-count">' . $count . '</span> ';
        //flag
        if (!empty($team_score['flag'])) {
            echo '<span class="gdlr-team-flag">' . gdlr_get_image($team_score['flag']) . '</span>';
        }
        echo $team_name;
        ?>
</td>
	<td class="gdlr-table-score"><?php 
        echo $team_score['overall-win'];
        ?>
</td>
	<td class="gdlr-table-score"><?php 
        echo $team_score['overall-draw'];
        ?>
</td>
	<td class="gdlr-table-score"><?php 
        echo $team_score['overall-lose'];
        ?>
</td>
	<td class="gdlr-table-score gdlr-table-pts"><?php 
        echo $team_score['pts'];
        ?>
</td>
</tr>
<?php 
    }
    echo '</table>';
}
Beispiel #18
0
 function gdlr_get_room_thumbnail_control($post_option)
 {
     $control = '';
     $slider_var = '';
     if ($post_option['inside-thumbnail-type'] == 'thumbnail-type' && $post_option['thumbnail-type'] == 'slider') {
         $slider_var = json_decode($post_option['thumbnail-slider']);
     } else {
         if ($post_option['inside-thumbnail-type'] == 'slider') {
             $slider_var = json_decode($post_option['inside-thumbnail-slider']);
         }
     }
     if (!empty($slider_var) && !empty($slider_var[0])) {
         $control .= '<ul class="gdlr-flex-thumbnail-control" id="gdlr-flex-thumbnail-control" >';
         foreach ($slider_var[0] as $thumbnail) {
             $control .= '<li>' . gdlr_get_image($thumbnail, 'thumbnail') . '</li>';
         }
         $control .= '</ul>';
     }
     return $control;
 }
Beispiel #19
0
if (!is_single()) {
    global $gdlr_post_settings;
} else {
    global $gdlr_post_settings, $theme_option, $gdlr_post_option;
}
$gdlr_post_settings['content'] = get_the_content();
if (has_post_thumbnail() && !post_password_required()) {
    ?>
		<div class="gdlr-blog-thumbnail">
			<?php 
    if (is_single()) {
        echo gdlr_get_image(get_post_thumbnail_id(), $theme_option['post-thumbnail-size'], true);
    } else {
        $temp_option = json_decode(get_post_meta(get_the_ID(), 'post-option', true), true);
        echo '<a href="' . get_permalink() . '"> ';
        echo gdlr_get_image(get_post_thumbnail_id(), $gdlr_post_settings['thumbnail-size']);
        echo '</a>';
        if (is_sticky()) {
            echo '<div class="gdlr-sticky-banner">';
            echo '<i class="fa fa-bullhorn icon-bullhorn" ></i>';
            echo __('Sticky Post', 'gdlr_translate');
            echo '</div>';
        }
    }
    ?>
		</div>
<?php 
}
?>
	
 function gdlr_get_portfolio_thumbnail($post_option, $size = 'full', $modern_style = false)
 {
     global $gdlr_related_section;
     if (is_single() && $post_option['inside-thumbnail-type'] != 'thumbnail-type' && empty($gdlr_related_section)) {
         $type = 'inside-';
     } else {
         $type = '';
     }
     switch ($post_option[$type . 'thumbnail-type']) {
         case 'feature-image':
             $image_id = get_post_thumbnail_id();
             if (!empty($image_id)) {
                 if ($modern_style) {
                     $ret = gdlr_get_image($image_id, $size);
                     $ret .= '<span class="portfolio-overlay" >&nbsp;</span>';
                     $ret .= '<div class="portfolio-overlay-content">';
                     $ret .= '<a class="portfolio-overlay-wrapper" ' . gdlr_get_portfolio_thumbnail_link($post_option) . ' >';
                     $ret .= '<span class="portfolio-icon" ><i class="' . gdlr_get_portfolio_icon_class($post_option) . '" ></i></span>';
                     $ret .= '</a>';
                     $ret .= '<h3 class="portfolio-title"><a ' . gdlr_get_portfolio_thumbnail_link($post_option, 'title') . ' >' . get_the_title() . '</a></h3>';
                     $ret .= '</div>';
                     // portfolio-overlay-content
                 } else {
                     if (!is_single() || $gdlr_related_section) {
                         $ret = gdlr_get_image($image_id, $size);
                         $ret .= '<a class="portfolio-overlay-wrapper" ' . gdlr_get_portfolio_thumbnail_link($post_option) . ' >';
                         $ret .= '<span class="portfolio-overlay" >&nbsp;</span>';
                         $ret .= '<span class="portfolio-icon" ><i class="' . gdlr_get_portfolio_icon_class($post_option) . '" ></i></span>';
                         $ret .= '</a>';
                     } else {
                         $ret = gdlr_get_image($image_id, $size, true);
                     }
                 }
             }
             break;
         case 'image':
             $ret = gdlr_get_image($post_option[$type . 'thumbnail-image'], $size, true);
             break;
         case 'video':
             if (is_single() && empty($gdlr_related_section)) {
                 $ret = gdlr_get_video($post_option[$type . 'thumbnail-video'], 'full');
             } else {
                 $ret = gdlr_get_video($post_option[$type . 'thumbnail-video'], $size);
             }
             break;
         case 'gallery':
             $settings = array();
             $settings['slider'] = $post_option['inside-thumbnail-slider'];
             $settings['thumbnail-size'] = $post_option['inside-gallery-thumbnail'];
             $settings['gallery-columns'] = $post_option['inside-gallery-columns'];
             $settings['show-caption'] = $post_option['inside-gallery-caption'];
             $settings['gallery-style'] = 'grid';
             $ret = gdlr_get_gallery_item($settings);
             break;
         case 'slider':
             $ret = gdlr_get_slider($post_option[$type . 'thumbnail-slider'], $size);
             break;
         case 'stack-image':
             $ret = gdlr_get_stack_images($post_option[$type . 'thumbnail-slider']);
             break;
         default:
             $ret = '';
     }
     return $ret;
 }
function gdlr_print_upcoming_match_item($settings)
{
    $item_id = empty($settings['page-item-id']) ? '' : ' id="' . $settings['page-item-id'] . '" ';
    global $gdlr_spaces;
    $margin = !empty($settings['margin-bottom']) && $settings['margin-bottom'] != $gdlr_spaces['bottom-item'] ? 'margin-bottom: ' . $settings['margin-bottom'] . ';' : '';
    if (!empty($settings['image-id'])) {
        $image_url = is_numeric($settings['image-id']) ? wp_get_attachment_url($settings['image-id']) : $settings['image-id'];
        $margin .= ' background-image: url(\'' . $image_url . '\'); ';
    }
    $margin_style = !empty($margin) ? ' style="' . $margin . '" ' : '';
    $current_date = date_i18n('Y-m-d H:i', current_time('timestamp'));
    // query posts section
    $args = array('post_type' => 'fixture_and_result', 'suppress_filters' => false);
    $args['posts_per_page'] = 1;
    $args['meta_key'] = 'gdlr-start-date';
    $args['orderby'] = 'meta_value';
    $args['order'] = 'asc';
    $args['paged'] = 1;
    $args['meta_query'] = array(array('key' => 'gdlr-start-date', 'value' => $current_date, 'compare' => '>'));
    if (!empty($settings['category'])) {
        $args['tax_query'] = array();
        if (!empty($settings['category'])) {
            array_push($args['tax_query'], array('terms' => explode(',', $settings['category']), 'taxonomy' => 'result_category', 'field' => 'slug'));
        }
    }
    $query = new WP_Query($args);
    while ($query->have_posts()) {
        $query->the_post();
        $match_val = gdlr_lms_decode_preventslashes(get_post_meta(get_the_ID(), 'gdlr-soccer-fixture-result-settings', true));
        $match_options = empty($match_val) ? array() : json_decode($match_val, true);
        echo '<div class="upcoming-match-item-wrapper gdlr-item" ' . $item_id . $margin_style . ' >';
        echo '<div class="upcoming-match-overlay"></div>';
        echo '<div class="gdlr-upcoming-match-team-wrapper">';
        echo '<span class="gdlr-upcoming-match-team gdlr-left">';
        echo empty($match_options['home-flag']) ? '' : '<span class="gdlr-team-flag">' . gdlr_get_image($match_options['home-flag']) . '</span>';
        echo $match_options['home'] . '</span>';
        echo '<span class="gdlr-upcoming-match-versus">' . __('VS', 'gdlr-soccer') . '</span>';
        echo '<span class="gdlr-upcoming-match-team gdlr-right">' . $match_options['away'];
        echo empty($match_options['away-flag']) ? '' : '<span class="gdlr-team-flag">' . gdlr_get_image($match_options['away-flag']) . '</span>';
        echo '</span>';
        echo '</div>';
        // upcoming-match-team
        echo gdlr_soccer_get_match_info($match_options, '<span class="upcoming-match-info-overlay"></span>');
        echo '</div>';
    }
    wp_reset_postdata();
}