From f499d9e657fe79e4413eec9e20ae13d616fac6f5 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Thu, 19 Jan 2023 20:17:55 +0100 Subject: Rename and restructure source files to conform to common namin schemes. - Source files containing a class should only contain _one_ class. - Source files containing a class should be names class-[name of the class].php - Use dashes instead of underscores in file names. - Fix source file comments - Some nitpicking... --- includes/giglogadmin-shortcodes.php | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 includes/giglogadmin-shortcodes.php (limited to 'includes/giglogadmin-shortcodes.php') 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 @@ + + * SPDX-FileCopyrightText: 2022 Harald Eilertsen + * + * 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' ); +} -- cgit v1.2.3