admin_notice.php 518 B

123456789101112131415161718192021
  1. <?php
  2. /**
  3. * A persistent admin notice to be displayed on all admin pages until cleared.
  4. */
  5. if (isset($vars['entity']) && elgg_instanceof($vars['entity'], 'object', 'admin_notice')) {
  6. $notice = $vars['entity'];
  7. $message = $notice->description;
  8. $delete = elgg_view('output/url', array(
  9. 'href' => "action/admin/delete_admin_notice?guid=$notice->guid",
  10. 'text' => elgg_view_icon('delete'),
  11. 'is_action' => true,
  12. 'class' => 'elgg-admin-notice',
  13. 'is_trusted' => true,
  14. ));
  15. echo "<p>$delete$message</p>";
  16. }