From f2c8c10eb5ef7c9bb9707c4787b65f31c8b56292 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sat, 11 Sep 2021 18:43:53 +0200 Subject: Change how we load the plugin. Since we now have code that should be available, both on the public blog and in the admin section, we need to be more graular when loading the various parts of the plugin. We still try to avoid loading admin-only parts for the public blog, but allways load the parts that we need in either case. Also avoid running the db migrations when running unit tests, as the schema is copied over from the dev environment it just caues problems. Finally, don't hardcode unit tests to always be in_admin, but rather determine that for each test. --- includes/giglog_visitor_display.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'includes') diff --git a/includes/giglog_visitor_display.php b/includes/giglog_visitor_display.php index 8177cb8..567bf41 100644 --- a/includes/giglog_visitor_display.php +++ b/includes/giglog_visitor_display.php @@ -1,13 +1,8 @@ render(); - return ($html); + $c = new GiglogAdmin_ConcertsTable(); + return $c->render(); } add_shortcode('getconcerts', 'display_giglog'); -- cgit v1.2.3