kompass/includes/frontend-functions.php

45 lines
1.2 KiB
PHP
Raw Normal View History

2023-12-30 14:28:21 +01:00
<?php
add_action('admin_enqueue_scripts', 'bdp_update_dashboard_style');
add_action('login_enqueue_scripts', 'bdp_update_login_style');
function bdp_update_login_style() {
$css = file_get_contents(BDP_LV_PLUGIN_DIR . 'assets/dashboard.style.css.tpl');
echo str_replace('%%BDP_LV_PLUGIN_URL%%', BDP_LV_PLUGIN_URL, $css);
}
function bdp_update_dashboard_style() {
wp_enqueue_style('custom-dashboard-styles', BDP_LV_PLUGIN_URL . '/assets/wordpress-bdp.css');
wp_enqueue_style('custom-calendar-styles', BDP_LV_PLUGIN_URL . '/assets/calendar.css');
wp_enqueue_style('custom-security-styles', BDP_LV_PLUGIN_URL . '/assets/security.css');
}
function bdp_add_menu_mein_lv() {
$location = BDP_LV_PLUGIN_DIR . '/modules/';
$mainSlug = $location . 'index.php';
$moduleLoad = get_admin_url() . 'admin.php?page=' . BDP_LV_PLUGIN_SLUG . '/modules/index.php&loadmodule=';
add_menu_page(
2024-02-26 14:47:51 +01:00
'Mein BdP',
2023-12-30 14:28:21 +01:00
'BdP',
'show_bdp',
2023-12-30 14:28:21 +01:00
$mainSlug,
'',
BDP_LV_PLUGIN_URL . '/icon.png',
3
);
add_submenu_page($mainSlug,
'Über',
'Über',
'show_bdp',
2023-12-30 14:28:21 +01:00
$moduleLoad . 'about'
);
}
function bdp_create_menu_structure()
{;
2023-12-30 14:28:21 +01:00
bdp_add_menu_mein_lv();
}