Skip to content

Commit

Permalink
removed(admin): control panel widget has been removed
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalsem committed Oct 12, 2021
1 parent 204fd65 commit 4e8d1cf
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 20 deletions.
2 changes: 1 addition & 1 deletion engine/classes/Elgg/Application/SystemEventHandlers.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public static function init() {
elgg_register_plugin_hook_handler('registeruser:validate:password', 'all', [_elgg_services()->passwordGenerator, 'registerUserPasswordValidation']);
elgg_register_plugin_hook_handler('view_vars', 'input/password', [_elgg_services()->passwordGenerator, 'addInputRequirements']);

$widgets = ['online_users', 'new_users', 'content_stats', 'banned_users', 'admin_welcome', 'control_panel', 'cron_status'];
$widgets = ['online_users', 'new_users', 'content_stats', 'banned_users', 'admin_welcome', 'cron_status'];
foreach ($widgets as $widget) {
elgg_register_widget_type(
$widget,
Expand Down
4 changes: 2 additions & 2 deletions engine/classes/Elgg/Widgets/CreateAdminWidgetsHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ public function __invoke(\Elgg\Event $event) {

// In the form column => array of handlers in order, top to bottom
$adminWidgets = [
1 => ['control_panel', 'admin_welcome'],
2 => ['online_users', 'new_users', 'content_stats'],
1 => ['admin_welcome', 'content_stats'],
2 => ['online_users', 'new_users'],
];

foreach ($adminWidgets as $column => $handlers) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,24 @@ public function getViewNames() {
'admin_welcome',
'banned_users',
'content_stats',
'control_panel',
'cron_status',
'new_users',
'online_users',
];

foreach ($widget_types as $widget_type) {
$views[] = "widgets/$widget_type/content";
$views[] = "widgets/$widget_type/edit";
$views[] = "widgets/{$widget_type}/content";
$views[] = "widgets/{$widget_type}/edit";
}

return $views;
}

public function getDefaultViewVars() {
$widget = $this->createObject([
'subtype' => 'widget',
]);
return [
'entity' => $widget,
'entity' => $this->createObject([
'subtype' => 'widget',
]),
];
}
}
10 changes: 0 additions & 10 deletions views/default/widgets/control_panel/content.php

This file was deleted.

0 comments on commit 4e8d1cf

Please sign in to comment.