Code Cleanups
This commit is contained in:
@ -26,17 +26,6 @@ function add_custom_admin_bar_item() {
|
||||
// Ü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' => get_admin_url() . 'admin.php?page=kompass-groups',
|
||||
|
||||
];
|
||||
|
||||
// Das benutzerdefinierte Element zur Admin-Leiste hinzufügen
|
||||
$wp_admin_bar->add_node( $args );
|
||||
|
||||
$args = [
|
||||
'id' => 'kompass_events',
|
||||
'title' => '<span class="ab-icon dashicons-tickets-alt"></span>' .
|
||||
|
@ -1,9 +1,6 @@
|
||||
<?php
|
||||
namespace Bdp\Libs;
|
||||
|
||||
use Bdp\Modules\EventParticipants\Controllers\MainController;
|
||||
use Bdp\Modules\EventParticipants\Models\EventGroup;
|
||||
|
||||
class CommonModel extends \stdClass {
|
||||
protected string $_tablename;
|
||||
|
||||
@ -34,8 +31,4 @@ class CommonModel extends \stdClass {
|
||||
$compare = date_diff($today, $obj_birthday);
|
||||
return $compare->y;
|
||||
}
|
||||
|
||||
public function get_group() : CommonModel {
|
||||
return EventGroup::load_by_id(MainController::KOMPASS_EVENTS_GROUPS, $this->gruppe_id);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user