Base setup for displaying groups and listing members
This commit is contained in:
@ -20,6 +20,26 @@ if (isset($_POST['save_kompass_balist_list_type'])) {
|
||||
updateBlockOrAllowList($_POST);
|
||||
}
|
||||
|
||||
function add_custom_admin_bar_item() {
|
||||
global $wp_admin_bar;
|
||||
|
||||
// Überprüfen, ob der Benutzer die erforderliche Berechtigung hat
|
||||
if ( current_user_can( 'show_groups' ) ) {
|
||||
// Das Array mit den Eigenschaften des benutzerdefinierten Elements
|
||||
$args = [
|
||||
'id' => 'kompass_gruppen',
|
||||
'title' => '<span class="ab-icon dashicons-groups"></span>' .
|
||||
'<span class="ab-label">' .__('Groups', BDP_LV_PLUGIN_SLUG) . '</span>',
|
||||
'href' => 'admin.php?page=kompass-groups',
|
||||
|
||||
add_action('wp_head', 'kompass_seo_add_verfications');
|
||||
];
|
||||
|
||||
// Das benutzerdefinierte Element zur Admin-Leiste hinzufügen
|
||||
$wp_admin_bar->add_node( $args );
|
||||
}
|
||||
}
|
||||
|
||||
// Die Funktion aufrufen, um das benutzerdefinierte Element zur Admin-Leiste hinzuzufügen
|
||||
add_action( 'admin_bar_menu', 'add_custom_admin_bar_item', 50 );
|
||||
|
||||
add_action('wp_head', 'kompass_seo_add_verifications' );
|
Reference in New Issue
Block a user