Preparation fpr new mareike & solea module
This commit is contained in:
@ -40,11 +40,27 @@ class MainController
|
||||
}
|
||||
public function __construct()
|
||||
{
|
||||
global $dbHandler;
|
||||
global $dbHandler, $wpdb;
|
||||
|
||||
add_menu_page(
|
||||
__('Events', BDP_LV_PLUGIN_SLUG),
|
||||
__('Events', BDP_LV_PLUGIN_SLUG),
|
||||
$show_menu = false;
|
||||
|
||||
foreach ([self::KOMPASS_EVENTS_EVENTS] as $table) {
|
||||
$sqlTable = $wpdb->prefix . $table;
|
||||
$sql = "SHOW TABLES LIKE '$sqlTable'";
|
||||
|
||||
$result = $wpdb->get_var( $sql );
|
||||
if ( $result == $sqlTable ) {
|
||||
$show_menu = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$show_menu) {
|
||||
return;
|
||||
}
|
||||
|
||||
add_menu_page(
|
||||
__('Events (legacy)', BDP_LV_PLUGIN_SLUG),
|
||||
__('Events (legacy)', BDP_LV_PLUGIN_SLUG),
|
||||
'send_mails',
|
||||
'kompass-events',
|
||||
[$this, 'router'],
|
||||
|
Reference in New Issue
Block a user