summaryrefslogtreecommitdiffstats
path: root/includes/giglogadmin-shortcodes.php
blob: 5070a3e31a190db73fcec50241e22bb362719b09 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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' );
}