| Server IP : 89.248.107.232 / Your IP : 216.73.217.70 Web Server : Apache System : Linux host2.kasilh.com 5.14.0-687.36.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Aug 7 05:40:49 EDT 2026 x86_64 User : seg ( 10005) PHP Version : 7.4.33 Disable Function : opcache_get_status MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/vhosts/seg-sa.es/peyco.es/wp-content/plugins/gk-nsp/article_wrappers/events/ |
Upload File : |
<?php
if(!class_exists('GK_NSP_Article_Wrapper_events')) {
class GK_NSP_Article_Wrapper_events {
/*
* Method used to generate the number of necessary articles
*/
static function number_of_articles($config) {
// total amount of the posts
return $config['events_cols'] * $config['events_rows'];
}
/*
* Method used to generate the date of event
*/
static function event_date($i, $generator, $results) {
global $wp_locale;
$date_start = new DateTime(get_post_meta( $results[$i]->ID, 'gkevent_date_start', true ));
$datemonth = $wp_locale->get_month($date_start->format('m') );
//
return '<span>' . __( 'When: ','gk-nsp' ) .''. $date_start->format('j ') . $datemonth . $date_start->format(' Y '). ' @ ' .$date_start->format('g:i a'). '<span class="gk-events-list-progress"></span></span>';
}
/*
* Method used to generate the date event block
*/
static function event_dateblock($i, $generator, $results) {
global $wp_locale;
$date_start = new DateTime(get_post_meta( $results[$i]->ID, 'gkevent_date_start', true ));
$event_start = new DateTime(get_post_meta( $results[$i]->ID, 'gkevent_counter_start', true ));
$dateweekday = $wp_locale->get_weekday( $date_start->format('w') );
$dateweekday_abbrev = $wp_locale->get_weekday_abbrev( $dateweekday );
$datemonth = $wp_locale->get_month($date_start->format('m') );
$datemonth_abbrev = $wp_locale->get_month_abbrev( $datemonth );
//
return '<time datetime="' . $date_start->format('c'). '" data-start="'. $event_start->format('c') .'">' . $dateweekday_abbrev . '<small>' . $datemonth_abbrev .' '. $date_start->format('j') . '</small></time>';
}
/*
* Method used to generate the article output
*/
static function article_output($i, $generator, $config) {
//
$art_output = '';
$art_title = $generator->art_title($i, true);
$art_url = $generator->art_readmore($i, true);
$art_output .= '<h3><a href="' .$art_url. '" title="'.$art_title.'"> ' . $art_title .'</a></h3>';
//
return $art_output;
}
}
}
// EOF