aboutsummaryrefslogtreecommitdiff
path: root/actions/admin/delete_admin_notice.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/admin/delete_admin_notice.php')
-rw-r--r--actions/admin/delete_admin_notice.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/actions/admin/delete_admin_notice.php b/actions/admin/delete_admin_notice.php
new file mode 100644
index 000000000..a9c3b8758
--- /dev/null
+++ b/actions/admin/delete_admin_notice.php
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Removes an admin notice.
+ */
+
+$guid = get_input('guid');
+$notice = get_entity($guid);
+
+if (!(elgg_instanceof($notice, 'object', 'admin_notice') && $notice->delete())) {
+ register_error(elgg_echo("admin:notices:could_not_delete"));
+}
+
+forward(REFERER); \ No newline at end of file