| 1 |
<?php |
| 2 |
/** |
| 3 |
* Template to display Event Post widget |
| 4 |
* |
| 5 |
* To override this file copy it to <your_theme>/themify-event-post/themify-event-posts.php |
| 6 |
* |
| 7 |
* @var $mod_settings |
| 8 |
* @var $mod_name |
| 9 |
* @var $module_ID |
| 10 |
* |
| 11 |
* @package Themify Event Post |
| 12 |
*/ |
| 13 |
|
| 14 |
$fields_args = wp_parse_args( $args['mod_settings'], array( |
| 15 |
'mod_title' => '', |
| 16 |
'show' => 'mix', |
| 17 |
'layout' => 'grid3', |
| 18 |
'category' => '0', |
| 19 |
'limit' => 3, |
| 20 |
'offset' => '', |
| 21 |
'order' => 'desc', |
| 22 |
'orderby' => 'date', |
| 23 |
'display' => 'excerpt', |
| 24 |
'image' => 'yes', |
| 25 |
'image_size' => '', |
| 26 |
'img_width' => '', |
| 27 |
'img_height' => '', |
| 28 |
'unlink_image' => 'no', |
| 29 |
'title' => 'yes', |
| 30 |
'title_tag' => 'h2', |
| 31 |
'unlink_title' => 'no', |
| 32 |
'hide_event_date' => 'no', |
| 33 |
'hide_event_organizer' => 'no', |
| 34 |
'hide_event_performer' => 'no', |
| 35 |
'hide_event_meta' => 'no', |
| 36 |
'hide_event_location' => 'no', |
| 37 |
'hide_page_nav' => 'no', |
| 38 |
'animation_effect' => '', |
| 39 |
'more_link' => '', |
| 40 |
'more_text' => __( 'More →', 'themify-event-post' ), |
| 41 |
'css' => '' |
| 42 |
) ); |
| 43 |
unset($args['mod_settings']); |
| 44 |
$animation_effect = self::parse_animation_effect( $fields_args['animation_effect'] ); |
| 45 |
$container_class = apply_filters( 'themify_builder_module_classes', array( |
| 46 |
'module', 'module-' . $args['mod_name'], $args['module_ID'], $animation_effect, $fields_args['css'] |
| 47 |
), $args['mod_name'], $args['module_ID'], $fields_args); |
| 48 |
if(!empty($args['element_id'])){ |
| 49 |
$container_class[] = 'tb_'.$args['element_id']; |
| 50 |
} |
| 51 |
$container_props = apply_filters( 'themify_builder_module_container_props', array( |
| 52 |
'id' => $args['module_ID'], |
| 53 |
'class' => implode(' ', $container_class) |
| 54 |
), $fields_args, $args['mod_name'], $args['module_ID'] ); |
| 55 |
|
| 56 |
$fields_args['more_link'] = $fields_args['more_link'] === 'y'; |
| 57 |
?> |
| 58 |
<div <?php echo self::get_element_attributes( $container_props ); ?>> |
| 59 |
<?php |
| 60 |
|
| 61 |
if(method_exists('Themify_Builder_Component_Base','add_inline_edit_fields')){ |
| 62 |
echo Themify_Builder_Component_Module::get_module_title($fields_args,'mod_title'); |
| 63 |
} |
| 64 |
do_action( 'themify_builder_before_template_content_render' ); |
| 65 |
|
| 66 |
echo Themify_Event_Post::get_instance()->shortcode( $fields_args ); |
| 67 |
|
| 68 |
do_action( 'themify_builder_after_template_content_render' ); |
| 69 |
?> |
| 70 |
</div> |
| 71 |
|