delete_admin_notice.php 264 B

12345678910111213
  1. <?php
  2. /**
  3. * Removes an admin notice.
  4. */
  5. $guid = get_input('guid');
  6. $notice = get_entity($guid);
  7. if (!(elgg_instanceof($notice, 'object', 'admin_notice') && $notice->delete())) {
  8. register_error(elgg_echo("admin:notices:could_not_delete"));
  9. }
  10. forward(REFERER);