Skip to content

Commit

Permalink
Merge pull request #185 from RRZE-Webteam/dev
Browse files Browse the repository at this point in the history
v2.0.13
  • Loading branch information
cassandre authored Dec 5, 2023
2 parents 3b03740 + 50a3090 commit 8816119
Show file tree
Hide file tree
Showing 7 changed files with 94 additions and 6 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "rrze/rrze-calendar",
"description": "RRZE WordPress Plugin",
"version": "2.0.12",
"version": "2.0.13",
"type": "wordpress-plugin",
"license": "GPL",
"require": {
Expand Down
3 changes: 2 additions & 1 deletion includes/Templates.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ class Templates
'FAU-Natfak'
],
'fau-events' => [
'FAU-Events'
'FAU-Events',
'FAU-Events-UTN',
],
'rrze' => [
'rrze-2019'
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rrze-calendar",
"version": "2.0.12",
"version": "2.0.13",
"main": "rrze-calendar.php",
"scripts": {
"start": "webpack --mode=development --watch",
Expand Down
2 changes: 1 addition & 1 deletion rrze-calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Plugin Name: RRZE Calendar
Plugin URI: https://github.com/RRZE-Webteam/rrze-calendar
Description: Import and output of FAU public events.
Version: 2.0.12
Version: 2.0.13
Author: RRZE Webteam
Author URI: https://blogs.fau.de/webworking/
License: GNU General Public License v3.0
Expand Down
4 changes: 2 additions & 2 deletions templates/cpt/single-event.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
<div class="content-container">
<div class="content-row">
<main>
<article class="rrze-event" itemscope itemtype="https://schema.org/Event">
<article class="rrze-event" itemscope itemtype="https://schema.org/Event">

<header class="entry-header">
<?php the_title('<h1 class="entry-title itemprop="name">', '</h1>'); ?>
<?php the_title('<h1 class="entry-title" itemprop="name">', '</h1>'); ?>
</header><!-- .entry-header -->

<div class="rrze-event-main">
Expand Down
42 changes: 42 additions & 0 deletions templates/cpt/themes/fau-events/archive-event.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php
/**
* The template for displaying archive pages
*/

use RRZE\Calendar\Shortcodes\Events;

if (isset($_GET['format']) && $_GET['format'] == 'embedded') {
get_template_part('template-parts/archive', 'embedded');
return;
}
get_header();
global $wp_query;

?>

<div class="content-wrap">
<div id="blog-wrap" class="blog-wrap cf">
<div id="primary" class="site-content cf" role="main">

<header class="archive-header">
<h1 class="archive-title" ><?php _e('Events', 'rrze-calendar'); ?></h1>
</header><!-- end .archive-header -->

<?php
$atts = [];
$queryVars = $wp_query->query_vars;
if (isset($queryVars['rrze-calendar-category']) && $queryVars['rrze-calendar-category'] != '') {
$atts['categories'] = sanitize_title($queryVars['rrze-calendar-category']);
$atts['abonnement_link'] = '1';
$atts['number'] = '99';
}
echo Events::shortcode($atts);
?>

</div><!-- end #primary -->
<?php get_sidebar(); ?>
</div><!-- end .blog-wrap -->
</div><!-- end .content-wrap -->

<?php
get_footer();
45 changes: 45 additions & 0 deletions templates/cpt/themes/fau-events/single-event.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php
/**
* The template for displaying a single post.
*/

use RRZE\Calendar\CPT\CalendarEvent;

wp_enqueue_style('rrze-calendar-sc-events');
wp_enqueue_style( 'dashicons' );

get_header();

$id = get_the_ID();
$data = CalendarEvent::getEventData($id);

while (have_posts()) : the_post(); ?>

<div id="singlepost-wrap" class="singlepost-wrap cf">
<article class="rrze-event" itemscope itemtype="https://schema.org/Event">

<header class="entry-header">
<?php the_title('<h1 class="entry-title" itemprop="name">', '</h1>'); ?>
</header><!-- .entry-header -->

<div class="rrze-event-main">

<?php if (has_post_thumbnail() && !post_password_required()) { ?>
<figure class="post-thumbnail wp-caption alignright">
<?php the_post_thumbnail('medium'); ?>
<figcaption class="wp-caption-text"><?php echo get_the_post_thumbnail_caption(); ?></figcaption>
</figure>
<?php } ?>

<?php CalendarEvent::displayEventMain($data); ?>

</div>

<?php CalendarEvent::displayEventDetails($data); ?>

</article>
</div>

<?php endwhile;

get_footer();

0 comments on commit 8816119

Please sign in to comment.