Esempio n. 1
0
		<?php 
			foreach($teams as $team):
                            
                            if(in_array("customer", $team->roles)){ continue; }
                            if(in_array("shop_manager", $team->roles)){ continue; }
                            //print_r($team);
				$profileImage = (get_the_author_meta("image_medium", $team->ID) != "") ? get_the_author_meta("image_medium", $team->ID) : false;		
				//$firstName = (get_the_author_meta("first_name", $team->ID) != "") ? get_the_author_meta("first_name", $team->ID) : get_the_author_meta("display_name", $team->ID);
			   ?>
				<div class="col-xs-12 col-sm-3 anim-section">
					<div class="thumbnail">
						<?php 
						if(!empty($profileImage)):
						?>
						<figure>
							<img src="<?php echo esc_url(charity_resize($profileImage, 263, 272));?>" alt="<?php echo esc_attr($team->display_name);?>">
						</figure>
						<?php endif;?>
						<div class="caption">
							<h3><?php echo esc_attr($team->display_name);?></h3>
							<?php charity_author_social_link($team->ID); ?>
						</div>
					</div>
				</div>
				<?php
				endforeach;
			?>			
			</div>
		</div>
	</div>
</div>
Esempio n. 2
0
    function video() {
        global $post,$charityHomeNews;

        $metaValueVideoImage = vp_metabox('video_meta.video_image');
        $charity_you_tube_url = vp_metabox('video_meta.charity_you_tube_url');
        $charity_viemo_url = vp_metabox('video_meta.charity_viemo_url');
		
		if ($charityHomeNews == "latestNewsSection"){ $width=600; $height=400; }
		elseif ($charityHomeNews == "twoSection"){ $width=600; $height=400; }
		else{ $width=1140; $height=458; }

        if (!empty($metaValueVideoImage)):
            ?>
            <div class="embed-responsive embed-responsive-16by9">
                <?php
                $videoUrl = "";
                if (!empty($charity_you_tube_url)) {
                    $videoUrl = vp_metabox('video_meta.charity_you_tube_url');
                }
                if (!empty($charity_viemo_url)) {
                    $videoUrl = vp_metabox('video_meta.charity_viemo_url');
                }
                ?>
                <img  src="<?php echo esc_url(charity_resize($metaValueVideoImage, $width, $height)); ?>" alt="<?php the_title(); ?>" data-video='<?php echo esc_html($videoUrl); ?>'/>                        
            </div>
            <?php
        endif;
    }
Esempio n. 3
0
    function video()
    {
        global $post;
        $videoMeta = vp_metabox('cahrity-meta-type-settings.charity-meta-video');
        if (!empty($videoMeta[0])) {
            $src = !empty($videoMeta[0]['upload-video-image']) ? $videoMeta[0]['upload-video-image'] : false;
            if ($src) {
                $videoURL = "";
                if (!empty($videoMeta[0]['txt-youtube-video-url'])) {
                    $videoURL = $videoMeta[0]['txt-youtube-video-url'];
                } elseif (!empty($videoMeta[0]['txt-vimeo-video-url'])) {
                    $videoURL = $videoMeta[0]['txt-vimeo-video-url'];
                }
                ?>
					<div class="embed-responsive embed-responsive-16by9">
					<?php 
                if (is_single()) {
                    $src_video_img = $src;
                } else {
                    $src_video_img = charity_resize($src, 600, 400);
                }
                ?>
						<img  src="<?php 
                echo esc_url($src_video_img);
                ?>
" alt="<?php 
                esc_attr_e("Click to play", "charity");
                ?>
" data-video='<?php 
                print $videoURL;
                ?>
'/>
					</div>
				  <?php 
            }
        }
    }
Esempio n. 4
0
 *
 * @package Charity 
 * @version 1.0
 */
$authorProfileImage = get_the_author_meta("image");
$authorImageClass = "author-no-image";
if (!empty($authorProfileImage)) {
    $authorImageClass = "author-image";
    ?>
<a class="pull-left" href="<?php 
    echo get_author_posts_url(get_the_author_meta('ID'));
    ?>
">
    <figure>
        <img class="media-object" src="<?php 
    echo esc_url(charity_resize($authorProfileImage, 106, 120));
    ?>
" alt="<?php 
    the_author();
    ?>
"  width="106px" height="120px">
    </figure> </a>
<?php 
}
?>
<div class="media-body <?php 
echo esc_attr($authorImageClass);
?>
">
    <header>
        <h4 class="media-heading"><?php 
Esempio n. 5
0
        }
        if (in_array("shop_manager", $team->roles)) {
            continue;
        }
        //print_r($team);
        $profileImage = get_the_author_meta("image_medium", $team->ID) != "" ? get_the_author_meta("image_medium", $team->ID) : false;
        //$firstName = (get_the_author_meta("first_name", $team->ID) != "") ? get_the_author_meta("first_name", $team->ID) : get_the_author_meta("display_name", $team->ID);
        ?>
				<div class="col-xs-12 col-sm-3 anim-section">
					<div class="thumbnail">
						<?php 
        if (!empty($profileImage)) {
            ?>
						<figure>
							<img src="<?php 
            echo esc_url(charity_resize($profileImage, 263, 272));
            ?>
" alt="<?php 
            echo esc_attr($team->display_name);
            ?>
">
						</figure>
						<?php 
        }
        ?>
						<div class="caption">
							<h3><?php 
        echo esc_attr($team->display_name);
        ?>
</h3>
							<?php 
    public function widget($args, $instance)
    {
        $cache = array();
        if (!$this->is_preview()) {
            $cache = wp_cache_get('widget_recent_posts', 'widget');
        }
        if (!is_array($cache)) {
            $cache = array();
        }
        if (!isset($args['widget_id'])) {
            $args['widget_id'] = $this->id;
        }
        if (isset($cache[$args['widget_id']])) {
            echo $cache[$args['widget_id']];
            return;
        }
        ob_start();
        $title = !empty($instance['title']) ? $instance['title'] : __('Recent', "charity");
        /** This filter is documented in wp-includes/default-widgets.php */
        $title = apply_filters('widget_title', $title, $instance, $this->id_base);
        $number = !empty($instance['number']) ? absint($instance['number']) : 5;
        if (!$number) {
            $number = 5;
        }
        /**
         * Filter the arguments for the Recent Posts widget.
         *
         * @since 3.4.0
         *
         * @see WP_Query::get_posts()
         *
         * @param array $args An array of arguments used to retrieve the recent posts.
         */
        $latestQuery = new WP_Query(apply_filters('widget_posts_args', array('posts_per_page' => $number, 'no_found_rows' => true, 'post_status' => 'publish', 'ignore_sticky_posts' => true)));
        if ($latestQuery->have_posts()) {
            ?>

			<aside class="media">
		<h3 class="space-top"><?php 
            printf("%s", $title);
            ?>
</h3>
		<ul>
			
			<?php 
            while ($latestQuery->have_posts()) {
                $latestQuery->the_post();
                ?>
			
			<?php 
                $format = get_post_format() ? get_post_format() : "standard";
                ?>
			
			<li><a href="<?php 
                the_permalink();
                ?>
" class="pull-left">
					<figure>
						<?php 
                if ($format == "image") {
                    if (has_post_thumbnail()) {
                        the_post_thumbnail('charity-recentpost-thumb');
                    }
                }
                if ($format == "gallery") {
                    $metaValueGallery = vp_metabox('gallery_meta.gallery_group');
                    $gallery_img = $metaValueGallery[0]['gallery_image'];
                    ?>
							<img src="<?php 
                    echo esc_url(charity_resize($gallery_img, 98, 98));
                    ?>
" alt="" />		
						<?php 
                }
                if ($format == "video") {
                    $metaValueVideoImage = vp_metabox('video_meta.video_image');
                    ?>
							<img src="<?php 
                    echo esc_url(charity_resize($metaValueVideoImage, 98, 98));
                    ?>
" alt="" />	
					 <?php 
                }
                ?>
						
					</figure>
			</a>
				<div class="media-body">
					<p>
						<a href="<?php 
                the_permalink();
                ?>
"><?php 
                echo esc_html(charity_truncate_content(get_the_title(), 29));
                ?>
</a>
					</p>
					<span><?php 
                printf("%s", get_the_date("d, F'y"));
                ?>
</span>
				</div></li>
				
				<?php 
            }
            ?>
			
		</ul>

	</aside>




            <?php 
            // Reset the global $the_post as this query will have stomped on it
            wp_reset_postdata();
        }
        if (!$this->is_preview()) {
            $cache[$args['widget_id']] = ob_get_flush();
            wp_cache_set('widget_recent_posts', $cache, 'widget');
        } else {
            ob_end_flush();
        }
    }
Esempio n. 7
0
<?php
/**
 * The template for displaying blog author.
 *
 * @package Charity 
 * @version 1.0
 */

$authorProfileImage=get_the_author_meta("image");

$authorImageClass="author-no-image";
if(!empty($authorProfileImage)): $authorImageClass="author-image";
?><a class="pull-left" href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>">
    <figure>
        <img class="media-object" src="<?php echo  esc_url(charity_resize($authorProfileImage, 106, 120)) ; ?>" alt="<?php the_author(); ?>"  width="106px" height="120px">
    </figure> </a>
<?php endif; ?>
<div class="media-body <?php echo esc_attr($authorImageClass); ?>">
    <header>
        <h4 class="media-heading"><?php the_author(); ?></h4>
        <span class="date"><?php the_time('F jS, Y') ?></span>
        <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" class="btn btn-default pull-right"><?php esc_html_e("View Profile", "charity"); ?></a>
    </header>
    <p><?php the_author_meta("description"); ?></p>
    <?php do_action("charity_social_link", array("author_id" => get_the_author_meta("ID"), "section" => "single_page")); ?>
</div>
<?php