/wp-content/themes/lifeline/framework/helpers/shortcodes.php
PHP | 2876 lines | 2546 code | 153 blank | 177 comment | 265 complexity | 834353c4d733dc37f5b571ce0c749483 MD5 | raw file
Possible License(s): GPL-3.0, MIT, BSD-3-Clause, LGPL-2.1, GPL-2.0, Apache-2.0
Large files files are truncated, but you can click here to view the full file
- <?php
- class SH_Shortcodes
- {
- protected $keys;
- protected $toggle_count = 0;
- function __construct()
- {
- $GLOBALS['sh_toggle_count'] = 0;
- add_action('init', array($this, 'add'));
- }
- function add()
- {
- include(SH_FRW_DIR . 'resource/shortcodes.php');
- $this->keys = array_keys($options);
- foreach ($this->keys as $k) {
- if (method_exists($this, $k)) add_shortcode('sh_' . $k, array($this, $k));
- }
- }
- function recent_news($atts, $content = null)
- {
- extract(shortcode_atts(array(
- 'number' => '',
- 'title' => __('Recent News', SH_NAME),
- 'category' => '',
- 'sort_by' => 'date',
- 'sorting_order' => 'DESC',
- 'heading_style' => 'simple',
- ), $atts)
- );
-
- $News = $Thumb = '';
- wp_reset_query();
- $args = array('post_type' => 'post', 'posts_per_page' => $number, 'orderby' => $sort_by, 'order' => $sorting_order, 'cat' => (int)$category);
- //if($category != '') $args['category'] = array($category);
- $query = new WP_Query($args);
- //printr($query);
- $i = 1;
- if ($query->have_posts()): while ($query->have_posts()): $query->the_post();
- $Settings = get_post_meta(get_the_ID(), '_post_settings', true);
- if ($video_link = sh_set($Settings, 'video_link')) {
- $opt = get_post_meta(get_the_ID(), '_dictate_gal_videos', true);
- $video_data = sh_grab_video($video_link, $opt);
- $PostMedia = '<div class="image">
- <img src="' . sh_set($video_data, 'thumb') . '" style="width:261px; height:207px;" alt="' . sh_set($video_data, 'title') . '" />
- <a class="html5lightbox" rel="prettyPhoto" href="' . $video_link . '" title="' . sh_set($video_data, 'title') . '">
- <span><i class="icon-play"></i></span>
- </a>
- </div>';
- $CarouselThumb = '<img src="' . sh_set($video_data, 'thumb') . '" style="width:131px; height:78px;" alt="' . sh_set($video_data, 'title') . '" />';
- } else {
- $PostAttchment = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'large');
- $PostMedia = '<div class="image">
- ' . get_the_post_thumbnail(get_the_ID(), '370x252') . '
- <a title="" href="' . sh_set($PostAttchment, 0) . '" rel="prettyPhoto" class="html5lightbox"><i class="icon-picture"></i></a>
- </div>';
- $CarouselThumb = get_the_post_thumbnail(get_the_ID(), '270x155');
- }
- $News .= '<div id="news' . $i . '">
- <div class="row">
- <div class="col-md-6 desc">
- <h3><a href="' . get_permalink() . '" title="">' . sh_character_limit(35, get_the_title()) . '</a></h3>
- <p>' . sh_character_limit(340, get_the_content()) . '</p>
- </div>
- <div class="col-md-6">
- ' . $PostMedia . '
- </div>
- </div>
- </div>';
- $Thumb .= '<a href="#news' . $i . '">' . $CarouselThumb . '<span class="carusal-our-news">' . sh_character_limit(17, get_the_title()) . '</span></a>';
- $i++;
- endwhile;
- endif;
- wp_reset_query();
- wp_enqueue_script('carofredcsel');
- $output = '';
-
-
- $output .= '<div class="carusal-slider">
- <div id="carousel-wrapper">
- <div id="carousel">
- ' . $News . '
- </div>
- </div>
- <div id="thumbs-wrapper">
- <div id="thumbs">' . $Thumb . '</div>
- <a id="prev" href="#"><i class="icon-angle-left"></i></a> <a id="next" href="#"><i class="icon-angle-right"></i></a> </div>
- </div>
- <script>
- jQuery(document).ready(function($){
- $(\'#carousel\').carouFredSel({
- responsive: true,
- circular: false,
- auto: false,
- items: {
- visible: 1,
- width: 20,
- },
- scroll: {
- fx: \'directscroll\'
- }
- });
- $(\'#thumbs\').carouFredSel({
- responsive: true,
- circular: false,
- infinite: false,
- auto: false,
- prev: \'#prev\',
- next: \'#next\',
- items: {
- visible: {
- min: 1,
- max: 6
- },
- width: 200,
- height: \'80%\'
- }
- });
- $(\'#thumbs a\').click(function() {
- $(\'#carousel\').trigger(\'slideTo\', \'#\' + this.href.split(\'#\').pop() );
- $(\'#thumbs a\').removeClass(\'selected\');
- $(this).addClass(\'selected\');
- return false;
- });
- });
- </script>
- ';
-
- return $output;
- }
- function our_causes($atts, $content = null)
- {
- extract(shortcode_atts(array(
- 'number' => '',
- 'title' => __('Our Causes', SH_NAME),
- 'cat' => '',
- 'sort_by' => 'date',
- 'sorting_order' => 'ASC',
- 'donate_sec' => '',
- 'heading_style' => 'simple',
-
- ), $atts)
- );
- $paypal_res = '';
- $single_page = (sh_set($_SESSION, 'sh_causes_page')) ? sh_set($_SESSION, 'sh_causes_page') : false;
- if ($single_page == true) unset($_SESSION['sh_causes_page']);
- if (isset($_GET['recurring_pp_return']) && $_GET['recurring_pp_return'] == 'return') {
- $paypal_res = require_once(get_template_directory() . '/framework/modules/pp_recurring/review.php');
- }
- $return_url = (is_home()) ? home_url() : get_permalink();
-
- $args = array('post_type' => 'post', 'posts_per_page' => $number, 'orderby' => $sort_by, 'order' => $sorting_order);
- if ($cat != '') $args['tax_query'] = array(array('taxonomy' => 'category', 'field' => 'id', 'terms' => (int)$cat));
- $Posts = query_posts($args);
-
- $chunk_num = ($donate_sec == 'true') ? 3 : 4;
- $col_class_outer = ($donate_sec == 'true') ? 'col-md-9' : 'col-md-12';
- $col_class_inner = ($donate_sec == 'true') ? 'col-md-4' : 'col-md-4';
- $postdate =
-
- $chunk = array_chunk($Posts, $chunk_num);
- $output = '';
-
- $output .= '<div class="row"><div class="' . $col_class_outer . '">';
- $output .= '<div class="our-causes">
-
- <ul class="slides">';
- foreach ($chunk as $p) {
- $output .= '<li><div class="row">';
- foreach ($p as $pos) {
-
- $output .= '<div class="' . $col_class_inner . '">
- <div class="causes-image">'
- . get_the_post_thumbnail(sh_set($pos, 'ID'), '') . '
- <div class="cause-heading">
- <h3>' . sh_excerpt(sh_set($pos, 'post_title'), 50) . '</h3>
- <div class="meta-news">' .mysql2date('d F Y', sh_set($pos, 'post_date')). '</div>
- </div>
- <a href="' . get_permalink(sh_set($pos, 'ID')) . '" title="' . sh_set($pos, 'post_title') . '">
- <div class="our-causes-hover">
-
- <h3>' . sh_excerpt(sh_set($pos, 'post_title'), 27) . '</h3>
- <div class="meta-news">' .mysql2date('d F Y', sh_set($pos, 'post_date')). '</div>
- <p>' . sh_excerpt($pos, 150) . '</p>
-
- </div>
- </a>
- </div>
- </div>';
- }
- $output .= '</div></li>
- <script>
- jQuery(document).ready(function($){
- if( $(\'.our-causes\').length ){
- $(\'.our-causes\').flexslider({
- animation: "slide",
- animationLoop: false,
- controlNav: true,
- maxItems: 1,
- pausePlay: false,
- mousewheel:false,
- start: function(slider){
- $(\'body\').removeClass(\'loading\');
- }
- });
- }
- });
- </script>
- ';
- }
- wp_reset_query();
- $paypal = $GLOBALS['_sh_base']->donation;
- if ($notif = $paypal->_paypal->handleNotification()) $paypal_res = $paypal->single_pament_result($notif);
- $output .= '</ul></div></div>';
- $donation_data = get_option(SH_NAME);
- $percent = (sh_set($donation_data, 'paypal_target')) ? (int)str_replace(',', '', sh_set($donation_data, 'paypal_raised')) / (int)str_replace(',', '', sh_set($donation_data, 'paypal_target')) : 0;
- $donation_percentage = $percent * 100;
- $symbol = (sh_set($donation_data, 'paypal_currency')) ? sh_set($donation_data, 'paypal_currency') : '$';
- $donation = '<div class="col-md-3">';
- $donation .= '<div class="donate-us-box">
- <h5>' . __('Give Your Donations', SH_NAME) . '</h5>
- <span>' . __('Donation Needed', SH_NAME) . '</span> <span class="amount-figures"><strong>' . $symbol . '</strong> ' . sh_set($donation_data, 'paypal_target') . '!</span> <span>' . __('Collected Donation', SH_NAME) . '</span> <span class="amount-figures coloured"><strong>' . $symbol . '</strong> ' . sh_set($donation_data, 'paypal_raised') . '!</span>
- <span class="cell"><i class="icon-phone"></i>' . sh_set($donation_data, 'paypal_contact') . '</span>';
- if (sh_set($donation_data, 'donate_method') == 'true') {
- $donation .= '<a data-toggle="modal" data-target="#myModal" class="donate-btn" title="">Donate Us</a>';
- } else {
- $donation .= $paypal->button(array('currency_code' => sh_set($donation_data, 'paypal_currency_code'), 'item_name' => get_bloginfo('name'), 'return' => $return_url));
- }
- $donation .= '</div>
- </div>';
- $output .= ($donate_sec == 'true') ? $donation : '';
-
- $output .= '<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">';
- if (isset($_GET['recurring_pp_return']) && $_GET['recurring_pp_return'] == 'return') {
- $output .= '<div class="donate-popup">' . $paypal_res . '</div>';
- $output .= '<script>
- jQuery(document).ready(function($){
- $(".donate-us-box a.donate-btn").trigger("click");
-
- });
- </script>';
- } elseif ($notif = $paypal->_paypal->handleNotification() && isset($notif->ok)) {
- $output .= '<div class="donate-popup">' . $paypal_res . '</div>';
- $output .= '<script>
- jQuery(document).ready(function($){
- $(".donate-us-box a.donate-btn").trigger("click");
-
- });
- </script>';
- } else {
- $Settings = get_option(SH_NAME);
- //printr($Settings);
- $value = sh_set($Settings, 'transactions_detail');
- $output .= '<div class="donate-popup">
- <div class="cause-bar">
- <div class="cause-box"><h3><span>' . $symbol . '</span>' . sh_set($donation_data, 'paypal_target') . '</h3><i>' . __('NEEDED DONATION', SH_NAME) . '</i></div>
- <div class="cause-progress">
- <div class="progress-report">
- <h6>' . __('PHASES', SH_NAME) . '</h6>
- <span>' . $donation_percentage . '%</span>
- <div class="progress pattern">
- <div class="progress-bar" style="width: ' . $donation_percentage . '%"></div>
- </div>
- </div>
- </div>
- <div class="cause-box"><h3><span>' . $symbol . '</span>' . sh_set($donation_data, 'paypal_raised') . '</h3><i>' . __('COLLECTED DONATION', SH_NAME) . '</i></div>
- <div class="cause-box donate-drop-btn"><h4>' . __('DONATE NOW', SH_NAME) . '</h4></div>
- </div>
- <div class="donate-drop-down">
- <div class="recursive-periods" align="center">';
- if ($value) {
- foreach ($value as $val) {
- $output .= '<a style="cursor:pointer;">' . ucwords(str_replace('_', ' ', $val)) . '</a>';
- }
- }
- $output .= '</div>
- <div class="amount-btns">';
- if (intval(sh_set($Settings, 'pop_up_1st_value')) != '') $output .= '<a style="cursor:pointer;">' . $symbol . '<span>' . sh_set($Settings, 'pop_up_1st_value') . '</span></a>';
- if (intval(sh_set($Settings, 'pop_up_2nd_value')) != '') $output .= '<a style="cursor:pointer;">' . $symbol . '<span>' . sh_set($Settings, 'pop_up_2nd_value') . '</span></a>';
- if (intval(sh_set($Settings, 'pop_up_3rd_value')) != '') $output .= '<a style="cursor:pointer;">' . $symbol . '<span>' . sh_set($Settings, 'pop_up_3rd_value') . '</span></a>';
- if (intval(sh_set($Settings, 'pop_up_4th_value')) != '') $output .= '<a style="cursor:pointer;">' . $symbol . '<span>' . sh_set($Settings, 'pop_up_4th_value') . '</span></a>';
- if (intval(sh_set($Settings, 'pop_up_5th_value')) != '') $output .= '<a style="cursor:pointer;">' . $symbol . '<span>' . sh_set($Settings, 'pop_up_5th_value') . '</span></a>';
- $output .= '</div><div class="other-amount">
- ' . $paypal->button(array('item_name' => get_bloginfo('name'), 'amount' => 30, 'return' => $return_url)) . '
- </div>';
- if (!is_user_logged_in()) {
- $output .= '<form id="login" action="" method="post">
- <h1>Please Login OR Register first to make recursive donation</h1>
- <p class="status"></p>
- <label for="username">Username</label>
- <input id="username" type="text" name="username">
- <label for="password">Password</label>
- <input id="password" type="password" name="password">
- <a class="lost" href="' . wp_registration_url() . '">Register Now</a>
- <input class="submit_button" type="submit" value="Login" name="submit">
- <a class="close" href="">(close)</a>
- ' . wp_nonce_field('ajax-login-nonce', 'security') . '
- </form>';
- }
- $output .= '</div>
- </div>
- </div></div>';
- }
- return $output;
- }
- function our_causes_2($atts, $content = null)
- {
- extract(shortcode_atts(array(
- 'number' => '',
- 'title' => 'Our Causes',
- 'bg' => '',
- 'blackish' => '',
- 'cat' => '',
- 'sort_by' => 'date',
- 'heading_style' => 'simple',
- 'sorting_order' => 'ASC'), $atts)
- );
- wp_enqueue_script('layersliderscript1');
- wp_enqueue_script('layersliderscript2');
- $args = array('post_type' => 'dict_causes', 'posts_per_page' => $number, 'orderby' => $sort_by, 'order' => $sorting_order);
- if ($cat != '') $args['tax_query'] = array(array('taxonomy' => 'causes_category', 'field' => 'id', 'terms' => $cat));
- $black_layer = ($blackish) ? 'blackish' : '';
- $Posts = query_posts($args);
- $attach = ($bg) ? wp_get_attachment_image_src($bg, 'large') : '';
- $bgimg = ($attach) ? sh_set($attach, 0) : get_template_directory_uri() . '/images/moving-bg.png';
- $output = '';
- $output .= '<div class="posts-carousel">
- <ul class="slides">';
- $chunk = array_chunk($Posts, 4);
- foreach ($chunk as $p) {
- $output .= '<li><div class="row">';
- foreach ($p as $pos) {
- $Settings = get_post_meta(sh_set($pos, 'ID'), '_dict_causes_settings', true);
- if (sh_set($Settings, 'video_link') && sh_set($Settings, 'video_link') != '') {
- $video_link = sh_set($Settings, 'video_link');
- $video_data = sh_grab_video($video_link, $Settings);
- $PostMedia = '<div class="carou-post-img">
- <img src="' . sh_set($video_data, 'thumb') . '" style="width:277px; height:190px;" alt="' . sh_set($video_data, 'title') . '" />
- <a title="' . sh_set($video_data, 'title') . '" href="' . $video_link . '" class="html5lightbox"><i class="icon-play"></i></a>
- </div>';
- } else if (sh_set($Settings, 'gallery')) {
- $GalleryAttachments = get_posts(array('post_type' => 'attachment', 'post__in' => explode(',', sh_set($Settings, 'gallery'))));
- $Slides = '';
- foreach ($GalleryAttachments as $Attachment) {
- $Thumb = sh_set(wp_get_attachment_image_src($Attachment->ID, '370x252'), '0');
- $LargeImage = sh_set(wp_get_attachment_image_src($Attachment->ID, 'large'), '0');
- $Slides .= '<li data-masterspeed="500" data-slotamount="7" data-transition="curtain-1">
- <img data-bgrepeat="no-repeat" data-bgposition="left top" data-bgfit="cover" alt="slidebg1" src="' . $Thumb . '" draggable="false"> </li>';
- //$i++;
- }
- $PostMedia = '<div class="carou-post-img"><div class="tp-banner2">
- <ul>
- ' . $Slides . '
- </ul>
- </div></div>';
- } else {
- $PostAttchment = wp_get_attachment_image_src(get_post_thumbnail_id(sh_set($pos, 'ID')), 'large');
- $PostMedia = '<div class="carou-post-img">
- ' . get_the_post_thumbnail(sh_set($pos, 'ID'), '370x252') . '
- <a title="" href="' . sh_set($PostAttchment, 0) . '" class="html5lightbox"><i class="icon-picture"></i></a>
- </div>';
- }
- $output .= '<div class="col-md-3">
- <div class="carou-post">
- ' . $PostMedia . '
- <h4>' . substr(strip_tags(sh_set($pos, 'post_title')), 0, 30) . '</h4>
- <p>' . substr(strip_tags(sh_set($pos, 'post_content')), 0, 200) . '</p>
- <a href="' . get_permalink(sh_set($pos, 'ID')) . '" title="">' . __('Read More', SH_NAME) . '</a>
- </div>
- </div>';
- }
- $output .= '</div></li>';
- }
- $output .= ' </ul>
- </div>
- </div>
- <script>
- jQuery(document).ready(function($){
- if( $(".posts-carousel").length > 0 ){
- $(".posts-carousel").flexslider({
- animation: "slide",
- animationLoop: false,
- controlNav: false,
- maxItems: 1,
- pausePlay: false,
- mousewheel:false,
- start: function(slider){
- $("body").removeClass("loading");
- }
- });
- }
- });
- </script>
- ';
- wp_reset_query();
- return $output;
- }
- function our_causes_3($atts, $content = null)
- {
- extract(shortcode_atts(array(
- 'number' => '',
- 'title' => 'Our Causes',
- 'cat' => '',
- 'sort_by' => 'date',
- 'sorting_order' => 'ASC',
- 'heading_style' => 'simple',
- ), $atts)
- );
- wp_enqueue_script(array('bootstrap'));
-
- $args = array('post_type' => 'dict_causes', 'posts_per_page' => $number, 'orderby' => $sort_by, 'order' => $sorting_order);
- if ($cat != '') $args['tax_query'] = array(array('taxonomy' => 'causes_category', 'field' => 'id', 'terms' => $cat));
- $Posts = query_posts($args);
- $i = 1;
- $Cause = '';
- $PostNav = '';
- if (have_posts()): while (have_posts()): the_post();
- $PostClass = ($i == 1) ? 'tab-pane fade in active' : 'tab-pane fade';
- $NavClass = ($i == 1) ? 'active' : '';
- $Settings = get_post_meta(get_the_ID(), '_dict_causes_settings', true);
- $Cause .= '<div id="tab' . $i . '" class="' . $PostClass . '">
-
- <div class="cause-image">
- ' . get_the_post_thumbnail(get_the_ID(), '1170x312') . '
- <div class="meta"> <span>' . __('In', SH_NAME) . ' <i>' . sh_set($Settings, 'location') . '</i></span> </div>
- <div class="cause-title">
- <h2><a href="' . get_permalink() . '">' . sh_excerpt(get_the_title(), 100) . '</a></h2>
- </div>
- </div>
- <div class="details">
- <div class="needed-amount">
- <h5><i>' . sh_set($Settings, 'currency_symbol') . '</i>' . sh_set($Settings, 'donation_needed') . '<span>' . __('Donation Needed', SH_NAME) . '</span></h5>
- </div>
- <p>' . sh_excerpt(get_the_content(), 500) . '</p>
- </div>
- </div>';
- $PostNav[] = '<li class="col-md-4"> <a data-toggle="tab" href="#tab' . $i . '"> ' . get_the_post_thumbnail(get_the_ID(), '1170x455') . ' <span>' . sh_excerpt(get_the_title(), 35) . '</span> </a> </li>';
- $i++;
- endwhile;
- endif;
- wp_reset_query();
- $nav = '';
- if ($PostNav) {
- foreach (array_chunk($PostNav, 3) as $chunk) {
- $nav .= '<li>
- <ul class="nav nav-tabs cause-tabber">';
- if (is_array($chunk)) {
- foreach ($chunk as $ch) {
- $nav .= $ch;
- }
- }
- $nav .= '</ul>
- </li>';
- }
- }
- $output = '';
-
- $output .= '<div class="our-cause-sec">';
-
- $output .= '<div class="tab-content" id="myTabContent">' . $Cause . '</div>
-
- <div class="causes-carousel">
- <ul class="slides">
- ' . $nav . '
- </ul>
- </div>
-
- </div>
- <script>
- jQuery(document).ready(function($){
- if( $(\'.causes-carousel\').length > 0 )
- {
- $(\'.causes-carousel\').flexslider({
- animation: "slide",
- animationLoop: false,
- controlNav: false,
- pausePlay: false,
- mousewheel:false,
- start: function(slider){
- $(\'body\').removeClass(\'loading\');
- }
- });
- }
- });
- </script>
- ';
-
- return $output;
- }
- function our_causes_4($atts, $content = null)
- {
- extract(shortcode_atts(array(
- 'number' => '',
- 'title' => 'Our Causes',
- 'cat' => '',
- 'sort_by' => 'date',
- 'sorting_order' => 'ASC',
- 'heading_style' => 'simple',
- ), $atts)
- );
-
- $args = array('post_type' => 'dict_causes', 'posts_per_page' => $number, 'orderby' => $sort_by, 'order' => $sorting_order);
- if ($cat != '') $args['tax_query'] = array(array('taxonomy' => 'causes_category', 'field' => 'id', 'terms' => $cat));
- $Posts = query_posts($args);
- $TotalPosts = count($Posts);
- $PostBatch = 2;
- $EndingTagAppended = FALSE;
- $StrtingTag = '<div class="col-md-4">';
- $CloseTag = '</div>';
- $i = 1;
- $Cause = '';
- $NextBatch = TRUE;
- if (have_posts()): while (have_posts()): the_post();
- $NewSecStrtTag = ($TotalPosts < $PostBatch || $i == 1 || $EndingTagAppended === TRUE) ? $StrtingTag : '';
- if (!empty($NewSecStrtTag) && $NextBatch === TRUE) {
- $ImageSize = '370x491';
- $NextBatch = FALSE;
- $AlterStyle = TRUE;
- } else if (!empty($NewSecStrtTag) && $NextBatch === FALSE) {
- $ImageSize = '370x252';
- $NextBatch = TRUE;
- $AlterStyle = FALSE;
- } else if (empty($NewSecStrtTag) && $AlterStyle === TRUE) {
- $ImageSize = '370x252';
- $AlterStyle = FALSE;
- } else if (empty($NewSecStrtTag) && $AlterStyle === FALSE) {
- $ImageSize = '370x491';
- $AlterStyle = TRUE;
- }
- $NewSecCloseTag = ($i == $TotalPosts || ($TotalPosts < $PostBatch && $i == $TotalPosts) || ($i % $PostBatch == 0 && $i !== 1)) ? $CloseTag : '';
- $EndingTagAppended = ($i == $TotalPosts || ($TotalPosts < $PostBatch && $i == $TotalPosts) || ($i % $PostBatch == 0 && $i !== 1)) ? TRUE : FALSE;
- $Cause .= $NewSecStrtTag .
- '<div class="portfolio" data-cat="' . $i . '">
- <a href="' . get_permalink() . '">' . get_the_post_thumbnail(get_the_ID(), $ImageSize) . '</a>
- <div class="port-desc">
- <h4><a href="' . get_permalink() . '" title="' . get_the_title() . '">' . sh_excerpt(get_the_title(), 40) . '</a></h4>
- <p>' . sh_excerpt(get_the_content(), 300) . '</p>
- </div>
- </div>'
- . $NewSecCloseTag;
- $i++;
- endwhile;
- endif;
- wp_reset_query();
- $output = '';
- $output .= '
- <div id="Grid">
- <div class="row">
- ' . $Cause . '
- </div>
- </div>';
-
- return $output;
- }
- function donation($atts, $content = null)
- {
- extract(shortcode_atts(array(
- 'title' => 'Donate Us',
- 'heading_style' => 'simple',
-
- ), $atts));
- $paypal = $GLOBALS['_sh_base']->donation;
-
- $donation_data = get_option(SH_NAME);
- $output = '';
- $output .= '<div class="pull-right">';
-
- $output .= '
- <div class="donate-us-box">
- <h5>' . __('Give Your Donations', SH_NAME) . '</h5>
- <span>' . __('Donation Needed', SH_NAME) . '</span> <span class="amount-figures"><strong>' . sh_set($donation_data, 'paypal_currency') . '</strong>
- ' . sh_set($donation_data, 'paypal_target') . '!</span> <span>' . __('Collection Donation', SH_NAME) . '</span>
- <span class="amount-figures coloured"><strong>' . sh_set($donation_data, 'paypal_currency') . '</strong>
- ' . sh_set($donation_data, 'paypal_raised') . '!</span> <span class="cell"><i class="icon-phone"></i>
- ' . sh_set($donation_data, 'paypal_contact') . '</span>
- <a data-toggle="modal" data-target="#myModal" class="donate-btn" title="">Donate Us</a>
- </div>
- </div>';
- return $output;
- }
- function donation_2($atts, $content = null)
- {
- extract(shortcode_atts(array(
-
- ), $atts));
- $paypal = $GLOBALS['_sh_base']->donation;
- $paypal_res = '';
- $single_page = (sh_set($_SESSION, 'sh_causes_page')) ? sh_set($_SESSION, 'sh_causes_page') : false;
- if ($single_page == true) unset($_SESSION['sh_causes_page']);
- if (isset($_GET['recurring_pp_return']) && $_GET['recurring_pp_return'] == 'return') {
- $paypal_res = require_once(get_template_directory() . '/framework/modules/pp_recurring/review.php');
- }
-
- $donation_data = get_option(SH_NAME);
- if ($notif = $paypal->_paypal->handleNotification()) $paypal_res = $paypal->single_pament_result($notif);
- $return_url = (is_home()) ? home_url() : get_permalink();
- $percent = (sh_set($donation_data, 'paypal_target')) ? (int)str_replace(',', '', sh_set($donation_data, 'paypal_raised')) / (int)str_replace(',', '', sh_set($donation_data, 'paypal_target')) : 0;
- $donation_percentage = $percent * 100;
- $symbol = (sh_set($donation_data, 'paypal_currency')) ? sh_set($donation_data, 'paypal_currency') : '$';
- $output = '';
-
- $output .= '<div class="donation-bar">
- <div class="amount pull-left">
- <p>' . __('Dontaions Needed', SH_NAME) . '</p>
- <span><strong>' . sh_set($donation_data, 'paypal_currency') . '</strong> ' . sh_set($donation_data, 'paypal_target') . '!</span> </div>
- <div class="donate-now">';
- if (sh_set($donation_data, 'donate_method') == 'true') {
- $output .= '<a data-toggle="modal" data-target="#myModal" class="donate-btn" title="">Donate Us</a>';
- } else {
- $output .= $paypal->button(array('currency_code' => sh_set($donation_data, 'paypal_currency_code'), 'item_name' => get_bloginfo('name'), 'return' => $return_url));
- }
- $output .= '</div>
- <div class="amount pull-right">
- <p>' . __('Collected Donations', SH_NAME) . '</p>
- <span><strong>' . sh_set($donation_data, 'paypal_currency') . '</strong> ' . sh_set($donation_data, 'paypal_raised') . '!</span>
- </div>
- </div>';
-
- $output .= '<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">';
- if (isset($_GET['recurring_pp_return']) && $_GET['recurring_pp_return'] == 'return') {
- $output .= '<div class="donate-popup">' . $paypal_res . '</div>';
- $output .= '<script>
- jQuery(document).ready(function($){
- $(".donation-bar a.donate-btn").trigger("click");
-
- });
- </script>';
- } elseif ($notif = $paypal->_paypal->handleNotification() && isset($notif->ok)) {
- $output .= '<div class="donate-popup">' . $paypal_res . '</div>';
- $output .= '<script>
- jQuery(document).ready(function($){
- $(".donation-bar a.donate-btn").trigger("click");
-
- });
- </script>';
- } else {
- $output .= '<div class="donate-popup">
- <div class="cause-bar">
- <div class="cause-box"><h3><span>' . $symbol . '</span>' . sh_set($donation_data, 'paypal_target') . '</h3><i>' . __('NEEDED DONATION', SH_NAME) . '</i></div>
- <div class="cause-progress">
- <div class="progress-report">
- <h6>' . __('PHASES', SH_NAME) . '</h6>
- <span>' . $donation_percentage . '%</span>
- <div class="progress pattern">
- <div class="progress-bar" style="width: ' . $donation_percentage . '%"></div>
- </div>
- </div>
- </div>
- <div class="cause-box"><h3><span>' . $symbol . '</span>' . sh_set($donation_data, 'paypal_raised') . '</h3><i>' . __('COLLECTED DONATION', SH_NAME) . '</i></div>
- <div class="cause-box donate-drop-btn"><h4>' . __('DONATE NOW', SH_NAME) . '</h4></div>
- </div>
- <div class="donate-drop-down">
- <div class="recursive-periods">';
- $Settings = get_option(SH_NAME);
- $value = sh_set($Settings , 'transactions_detail');
- if($value)
- {
- foreach($value as $val )
- {
- $txt = ucwords(str_replace('_', ' ', $val));
- $output .= '<a style="cursor:pointer;">'.__( $txt, SH_NAME ).'</a>';
- }
- }
- $output .='</div>
- <div class="amount-btns">';
- if( intval ( sh_set($Settings , 'pop_up_1st_value') ) != '') $output .= '<a style="cursor:pointer;">'.$symbol.'<span>'.sh_set($Settings , 'pop_up_1st_value').'</span></a>';
- if(intval ( sh_set($Settings , 'pop_up_2nd_value') ) != '') $output .= '<a style="cursor:pointer;">'.$symbol.'<span>'.sh_set($Settings , 'pop_up_2nd_value').'</span></a>';
- if(intval ( sh_set($Settings , 'pop_up_3rd_value') ) != '') $output .= '<a style="cursor:pointer;">'.$symbol.'<span>'.sh_set($Settings , 'pop_up_3rd_value').'</span></a>';
- if(intval ( sh_set($Settings , 'pop_up_4th_value') ) != '') $output .= '<a style="cursor:pointer;">'.$symbol.'<span>'.sh_set($Settings , 'pop_up_4th_value').'</span></a>';
- if(intval ( sh_set($Settings , 'pop_up_5th_value') ) != '') $output .= '<a style="cursor:pointer;">'.$symbol.'<span>'.sh_set($Settings , 'pop_up_5th_value').'</span></a>';
- $output .= '</div>';
- $output .= '<div class="other-amount">
- ' . $paypal->button(array('item_name' => get_bloginfo('name'), 'amount' => 30, 'return' => $return_url)) . '
- </div>';
- if (!is_user_logged_in()) {
- $output .= '<form id="login" action="" method="post">
- <h1>Please Login OR Register first to make recursive donation</h1>
- <p class="status"></p>
- <label for="username">Username</label>
- <input id="username" type="text" name="username">
- <label for="password">Password</label>
- <input id="password" type="password" name="password">
- <a class="lost" href="' . wp_registration_url() . '">Register Now</a>
- <input class="submit_button" type="submit" value="Login" name="submit">
- <a class="close" href="">(close)</a>
- ' . wp_nonce_field('ajax-login-nonce', 'security') . '
- </form>';
- }
- $output .= '</div>
- </div>';
- }
- $output .= '</div>';
- return $output;
- }
- function donation_3($atts, $content = null)
- {
- extract(shortcode_atts(array(
- 'title' => '',
-
- ), $atts));
- $paypal_res = '';
- $single_page = (sh_set($_SESSION, 'sh_causes_page')) ? sh_set($_SESSION, 'sh_causes_page') : false;
- if ($single_page == true) unset($_SESSION['sh_causes_page']);
- if (isset($_GET['recurring_pp_return']) && $_GET['recurring_pp_return'] == 'return') {
- $paypal_res = require_once(get_template_directory() . '/framework/modules/pp_recurring/review.php');
- }
- $paypal = $GLOBALS['_sh_base']->donation;
- if ($notif = $paypal->_paypal->handleNotification()) $paypal_res = $paypal->single_pament_result($notif);
- $return_url = (is_home()) ? home_url() : get_permalink();
-
- $donation_data = get_option(SH_NAME);
- $percent = (sh_set($donation_data, 'paypal_target')) ? (int)str_replace(',', '', sh_set($donation_data, 'paypal_raised')) / (int)str_replace(',', '', sh_set($donation_data, 'paypal_target')) : 0;
- $donation_percentage = $percent * 100;
- $symbol = (sh_set($donation_data, 'paypal_currency')) ? sh_set($donation_data, 'paypal_currency') : '$';
- $output = '';
-
- $output .= '<div class="donate-us">
- <h3>' . sh_character_limit(20, $title) . '</h3>
- <span><i class="icon-phone"></i>' . sh_set($donation_data, 'paypal_contact') . '</span>
- <div class="collected">
- <p>' . __('Collected Dontaions', SH_NAME) . '</p>
- <span><strong>' . sh_set($donation_data, 'paypal_currency') . '</strong> ' . sh_set($donation_data, 'paypal_raised') . '!</span> </div>
- <div class="d-now">';
- if (sh_set($donation_data, 'donate_method') == 'true') {
- $output .= '<a data-toggle="modal" data-target="#myModal" class="donate-btn" title="">Donate Us</a>';
- } else {
- $output .= $paypal->button(array('currency_code' => sh_set($donation_data, 'paypal_currency_code'), 'item_name' => get_bloginfo('name'), 'return' => $return_url));
- }
- $output .= '</div>
- </div>';
-
- $output .= '<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">';
- if (isset($_GET['recurring_pp_return']) && $_GET['recurring_pp_return'] == 'return') {
- $output .= '<div class="donate-popup">' . $paypal_res . '</div>';
- $output .= '<script>
- jQuery(document).ready(function($){
- $(".donate-us a.donate-btn").trigger("click");
-
- });
- </script>';
- } elseif ($notif = $paypal->_paypal->handleNotification() && isset($notif->ok)) {
- $output .= '<div class="donate-popup">' . $paypal_res . '</div>';
- $output .= '<script>
- jQuery(document).ready(function($){
- $(".donate-us a.donate-btn").trigger("click");
-
- });
- </script>';
- } else {
- $output .= '<div class="donate-popup">
- <div class="cause-bar">
- <div class="cause-box"><h3><span>' . $symbol . '</span>' . sh_set($donation_data, 'paypal_target') . '</h3><i>' . __('NEEDED DONATION', SH_NAME) . '</i></div>
- <div class="cause-progress">
- <div class="progress-report">
- <h6>' . __('PHASES', SH_NAME) . '</h6>
- <span>' . $donation_percentage . '%</span>
- <div class="progress pattern">
- <div class="progress-bar" style="width: ' . $donation_percentage . '%"></div>
- </div>
- </div>
- </div>
- <div class="cause-box"><h3><span>' . $symbol . '</span>' . sh_set($donation_data, 'paypal_raised') . '</h3><i>' . __('COLLECTED DONATION', SH_NAME) . '</i></div>
- <div class="cause-box donate-drop-btn"><h4>' . __('DONATE NOW', SH_NAME) . '</h4></div>
- </div>
- <div class="donate-drop-down">
- <div class="recursive-periods">';
- $Settings = get_option(SH_NAME);
- $value = sh_set($Settings , 'transactions_detail');
- if($value)
- {
- foreach($value as $val )
- {
- $txt = ucwords(str_replace('_', ' ', $val));
- $output .= '<a style="cursor:pointer;">'.__( $txt, SH_NAME ).'</a>';
- }
- }
- $output .= '</div>
- <div class="amount-btns">';
- if( intval ( sh_set($Settings , 'pop_up_1st_value') ) != '') $output .= '<a style="cursor:pointer;">'.$symbol.'<span>'.sh_set($Settings , 'pop_up_1st_value').'</span></a>';
- if(intval ( sh_set($Settings , 'pop_up_2nd_value') ) != '') $output .= '<a style="cursor:pointer;">'.$symbol.'<span>'.sh_set($Settings , 'pop_up_2nd_value').'</span></a>';
- if(intval ( sh_set($Settings , 'pop_up_3rd_value') ) != '') $output .= '<a style="cursor:pointer;">'.$symbol.'<span>'.sh_set($Settings , 'pop_up_3rd_value').'</span></a>';
- if(intval ( sh_set($Settings , 'pop_up_4th_value') ) != '') $output .= '<a style="cursor:pointer;">'.$symbol.'<span>'.sh_set($Settings , 'pop_up_4th_value').'</span></a>';
- if(intval ( sh_set($Settings , 'pop_up_5th_value') ) != '') $output .= '<a style="cursor:pointer;">'.$symbol.'<span>'.sh_set($Settings , 'pop_up_5th_value').'</span></a>';
- $output .= '</div>';
- $output .= '<div class="other-amount">
- ' . $paypal->button(array('item_name' => get_bloginfo('name'), 'amount' => 30, 'return' => $return_url)) . '
- </div>';
- if (!is_user_logged_in()) {
- $output .= '<form id="login" action="" method="post">
- <h1>Please Login OR Register first to make recursive donation</h1>
- <p class="status"></p>
- <label for="username">Username</label>
- <input id="username" type="text" name="username">
- <label for="password">Password</label>
- <input id="password" type="password" name="password">
- <a class="lost" href="' . wp_registration_url() . '">Register Now</a>
- <input class="submit_button" type="submit" value="Login" name="submit">
- <a class="close" href="">(close)</a>
- ' . wp_nonce_field('ajax-login-nonce', 'security') . '
- </form>';
- }
- $output .= '</div>
- </div>';
- }
- $output .= '</div>';
- return $output;
- }
- function start_regular_donation($atts, $content = null)
- {
- extract(shortcode_atts(array(
- 'title' => '',
- 'sub_title' => '',
- 'image' => '',
- 'currency' => '$',
- 'donation_needed' => '',
- 'link_caption' => '',
- 'text' => '',
- 'heading_style' => 'simple',
-
- ), $atts));
-
- $title = sh_character_limit(25, $title);
- $SubTitle = (!empty($sub_title)) ? '<h5>' . sh_character_limit(26, $sub_title) . '</h5>' : '';
- $DonationNeeded = (!empty($donation_needed) || !empty($currency)) ? '<span>' . $currency . $donation_needed . ' </span>' : '';
- $output = '';
-
-
- $output .= '
- <div class="donate-message">
- ' . wp_get_attachment_image($image, '270x155') . '
- ' . $SubTitle . '
- <p>' . $DonationNeeded . sh_character_limit(100, $text) . '</p>
- <a href="" title="">' . sh_character_limit(25, $link_caption) . '</a>
- </div>
- ';
-
- return $output;
- }
- function ceo_message($atts, $content = null)
- {
- extract(shortcode_atts(array(
- 'number' => '',
- 'category' => '',
- 'sort_by' => 'date',
- 'sorting_order' => 'ASC',
- 'overlap' => '',
- ), $atts)
- );
- $args = array('post_type' => 'dict_testimonials', 'posts_per_page' => $number, 'orderby' => $sort_by, 'order' => $sorting_order);
- if ($category != '') $args['tax_query'] = array(array('taxonomy' => 'testimonial_category', 'field' => 'id', 'terms' => $category));
- //$Query = 'post_type=dict_testimonials&posts_per_page='.$number.'&orderby='.$sort_by.'&order='.$sorting_order;
- //$Query .= (!empty( $category ) ) ? '&testimonial_category='.$category: '';
- $Posts = query_posts($args);
- $i = 1;
- $Message = $MessageNav = '';
- if (have_posts()): while (have_posts()): the_post();
- $Settings = get_post_meta(get_the_ID(), '_dict_testimonials_settings', true);
- $Message .= '<li>
- <div class="carusal-image-thumb">
- ' . get_the_post_thumbnail(get_the_ID(), '150x150') . '
- <strong>' . sh_set($Settings, 'name') . ',</strong>
- <span class="carusal-image-thumb-name"> ' . sh_set($Settings, 'designation') . ' </span>
- </div>
- <p>' . get_the_content() . '</p></a>
- </li>';
- $i++;
- endwhile;
- endif;
- wp_reset_query();
- $output = '';
- $output .= '<div class="testimonial';
- if( $overlap == 'true' ): $output .= ' overlap'; endif;
- $output .= '">
- <div class="slideshow">
- <ul class="slides">
- ' . $Message . '
- </ul>
- </div>
- </div>
- <script>
- jQuery(document).ready(function($){
- if( $(\'.slideshow\').length ){
- $(\'.slideshow\').flexslider({
- animation: "fade",
- animationLoop: false,
- slideShow:false,
- controlNav: true,
- maxItems: 1,
- pausePlay: false,
- mousewheel:false,
- start: function(slider){
- $(\'body\').removeClass(\'loading\');
- }
- });
- }
- });
- </script>';
- return $output;
- }
- /*function recent_news( $atts, $content = null )
- {
- extract( shortcode_atts( array(
- 'number' => '',
- 'title' => __('Recent News', SH_NAME),
- 'category' => '',
- 'sort_by' => 'date',
- 'sorting_order' => 'DESC',
- 'heading_style' => 'simple' ,
- 'margins' =>'' ), $atts )
- );
- $marginsarr = explode(',' , $margins);
-
- $News = $Thumb = '';
- wp_reset_query();
- $args = array('post_type' => 'post' , 'posts_per_page'=> $number , 'orderby' => $sort_by , 'order' => $sorting_order, 'category' => $category);
- //if($category != '') $args['category'] = array($category);
-
- $query = new WP_Query($args);
- //printr($query);
-
- $i = 1;
-
- if( $query->have_posts()): while( $query->have_posts() ): $query->the_post();
-
- $Settings = get_post_meta( get_the_ID(), '_post_settings', true );
-
- if( $video_link = sh_set( $Settings, 'video_link' ) )
- {
- $opt = get_post_meta( get_the_ID(), '_dictate_gal_videos', true );
- $video_data = sh_grab_video( $video_link, $opt );
-
- $PostMedia = '<div class="image">
- <img src="'.sh_set( $video_data, 'thumb').'" style="width:261px; height:207px;" alt="'.sh_set( $video_data, 'title' ).'" />
- <a class="html5lightbox" rel="prettyPhoto" href="'.$video_link.'" title="'.sh_set( $video_data, 'title' ).'">
- <span><i class="icon-play"></i></span>
- </a>
- </div>';
- $CarouselThumb = '<img src="'.sh_set( $video_data, 'thumb').'" style="width:131px; height:78px;" alt="'.sh_set( $video_data, 'title' ).'" />';
- }
- else
- {
- $PostAttchment = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ), 'large' );
- $PostMedia = '<div class="image">
- '.get_the_post_thumbnail( get_the_ID(), '370x252' ).'
- <a title="" href="'.sh_set( $PostAttchment, 0 ).'" rel="prettyPhoto" class="html5lightbox"><i class="icon-picture"></i></a>
- </div>';
- $CarouselThumb = get_the_post_thumbnail( get_the_ID(), '270x155' );
- }
-
- $News .= '<div id="news'.$i.'">
- <div class="row">
- <div class="col-md-6 desc">
- <h3><a href="'.get_permalink().'" title="">'.sh_character_limit( 35, get_the_title() ).'</a></h3>
- <p>'.sh_character_limit( 340, get_the_content() ).'</p>
- </div>
- <div class="col-md-6">
- '.$PostMedia.'
- </div>
- </div>
- </div>';
- $Thumb .= '<a href="#news'.$i.'">'.$CarouselThumb.'<span class="carusal-our-news">'.sh_character_limit( 17, get_the_title() ).'</span></a>';
- $i++;
- endwhile;
- endif;
- wp_reset_query();
- wp_enqueue_script('carofredcsel');
- $output = '' ;
- $output.= ( in_array('top' , (array)$marginsarr)) ? '<div class="block"></div>' : '';
- $output .= ($heading_style == 'underline')? '<div class="sec-heading">
- '.sh_get_title( $title, 'h2', 'strong', TRUE ).'
- </div>' : '' ;
- $output .= ($heading_style == 'modern')? '<div class="sec-title">
- '.sh_get_title( $title, 'h1', 'span', FALSE ).'
- </div>' : '' ;
- $output .= ($heading_style == 'simple')? '<div class="sec-heading2">
- '.sh_get_title( $title, 'h2', 'strong', TRUE ).'
- </div>' : '' ;
-
- $output .= '<div class="carusal-slider">
- <div id="carousel-wrapper">
- <div id="carousel">
- '.$News.'
- </div>
- </div>
- <div id="thumbs-wrapper">
- <div id="thumbs">'.$Thumb.'</div>
- <a id="prev" href="#"><i class="icon-angle-left"></i></a> <a id="next" href="#"><i class="icon-angle-right"></i></a> </div>
- </div>
- <script>
- jQuery(document).ready(function($){
- $(\'#carousel\').carouFredSel({
- responsive: true,
- circular: false,
- auto: false,
- items: {
- visible: 1,
- width: 20,
- },
- scroll: {
- fx: \'directscroll\'
- }
- });
- $(\'#thumbs\').carouFredSel({
- responsive: true,
- circular: false,
- infinite: false,
- auto: false,
- prev: \'#prev\',
- next: \'#next\',
- items: {
- visible: {
- min: 1,
- max: 6
- },
- width: 200,
- height: \'80%\'
- }
- });
- $(\'#thumbs a\').click(function() {
- $(\'#carousel\').trigger(\'slideTo\', \'#\' + this.href.split(\'#\').pop() );
- $(\'#thumbs a\').removeClass(\'selected\');
- $(this).addClass(\'selected\');
- return false;
- });
- });
- </script>
- ';
- $output.= ( in_array('bottom' , (array)$marginsarr)) ? '<div class="block"></div>' : '';
- return $output ;
- }
- */
- function recent_events($atts, $content = null)
- {
- extract(shortcode_atts(array(
- 'title' => 'Recent Events',
- 'number' => '',
- 'category' => '',
- 'sort_by' => 'date',
- 'sorting_order' => 'ASC',
- 'heading_style' => 'simple',
- ), $atts)
- );
-
- $args = array('post_type' => 'dict_event', 'posts_per_page' => $number, 'orderby' => $sort_by, 'order' => $sorting_order);
- if ($category) $args['tax_query'] = array(array('taxonomy' => 'event_category', 'field' => 'id', 'terms' => $category));
- query_posts($args);
- $Events = '';
- $i = 1;
- if (have_posts()): while (have_posts()): the_post();
- $Settings = get_post_meta(get_the_ID(), '_dict_event_settings', true);
- $PostThumbSize1 = ($i == 1) ? 'style="width:570px; height:184px;"' : 'style="width:100px; height:100px;"';
- $PostThumbSize2 = ($i == 1) ? '570x220' : '150x150';
- $EventOrganizer = ($i == 1 && sh_set($Settings, 'organizer')) ? '<li><a href="#" title=""><i class="icon-user"></i>' . __('by', SH_NAME) . ' ' . sh_set($Settings, 'organizer') . '</a></li>' : '';
- $EventdateDetails = '';
- if (sh_set($Settings, 'video_link')) {
- $video_link = sh_set($Settings, 'video_link');
- $video_data = sh_grab_video($video_link, $Settings);
- $PostMedia = '<div class="carou-post-img">
- <img src="' . sh_set($video_data, 'thumb') . '" ' . $PostThumbSize1 . ' alt="' . sh_set($video_data, 'title') . '" />
- <a title="' . sh_set($video_data, 'title') . '" href="' . $video_link . '" class="html5lightbox"><i class="icon-play"></i></a>
- </div>';
- } else {
- //$PostMedia = get_the_post_thumbnail( get_the_ID(), $PostThumbSize );
- $PostAttchment = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'large');
- $PostMedia = '<div class="carou-post-img">
- ' . get_the_post_thumbnail(get_the_ID(), $PostThumbSize2) . '
- <a title="" href="' . sh_set($PostAttchment, 0) . '" class="html5lightbox"><i class="icon-picture"></i></a>
- </div>';
- }
- if (!empty($Settings['start_date'])) {
- $Eventdate = new DateTime($Settings['start_date']);
- $EventdateDetails = '<li><a href="' . get_permalink() . '" title=""><i class="icon-calendar-empty"></i><span>' . $Eventdate->format('F') . '</span> ' . $Eventdate->format('d, Y') . '</a></li>';
- } else if (!empty($Settings['end_date'])) {
- $Eventdate = new DateTime($Settings['end_date']);
- $EventdateDetails = '<li><a href="' . get_permalink() . '" title=""><i class="icon-calendar-empty"></i><span>' . $Eventdate->format('F') . '</span> ' . $Eventdate->format('d, Y') . '</a></li>';
- }
- $Class = ($i == 1) ? 'recent-event' : 'recent-event previous-event';
- $md_class = ($i == 1) ? 'col-md-12' : 'col-md-6';
- $Location = (sh_set($Settings, 'location')) ? '<li><a href="' . get_permalink() . '" title=""><i class="icon-map-marker"></i>in ' . sh_set($Settings, 'location') . '</a></li>' : '';
- $TitleLength = ($i == 1) ? 35 : 20;
- $Events .= '<div class="' . $md_class . '">
- <div class="' . $Class . '">
- <div class="recent-event-img">…
Large files files are truncated, but you can click here to view the full file