summaryrefslogtreecommitdiffstats
path: root/includes/giglogadmin-shortcodes.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/giglogadmin-shortcodes.php')
-rw-r--r--includes/giglogadmin-shortcodes.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/includes/giglogadmin-shortcodes.php b/includes/giglogadmin-shortcodes.php
new file mode 100644
index 0000000..5070a3e
--- /dev/null
+++ b/includes/giglogadmin-shortcodes.php
@@ -0,0 +1,30 @@
+<?php
+/**
+ * Shortcodes for GiglogAdmin.
+ *
+ * @package giglogadmin
+ *
+ * SPDX-FileCopyrightText: 2022 Andrea Chirulescu <andrea.chirulescu@gmail.com>
+ * SPDX-FileCopyrightText: 2022 Harald Eilertsen <haraldei@anduin.net>
+ *
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+declare(strict_types=1);
+
+if ( ! function_exists( 'giglogadmin_shortcode_public' ) ) {
+
+ /**
+ * Shortcode that displays the public concert list.
+ *
+ * Usage: `[getconcerts]`
+ *
+ * This shortcode does not have any attributes.
+ */
+ function giglogadmin_shortcode_public() : string {
+ $c = new GiglogAdmin_ConcertsTable();
+ return $c->render();
+ }
+
+ add_shortcode( 'getconcerts', 'giglogadmin_shortcode_public' );
+}