• Resolved volomike

    (@volomike)


    How can I make a plugin send an alert to one’s dashboard at the top right below where the WordPress upgrade notice might normally appear?

    I imagine I need some kind of add_filter() or add_action() call in the plugins’ code.

Viewing 1 replies (of 1 total)
  • Thread Starter volomike

    (@volomike)

    <? function addDashboardAlert() { ?>
    <style type="text/css">
    .alert {
    padding-top:4px;
    padding-bottom:6px;
    padding-left:302px;
    background-color:#ebfbff;
    border-bottom:1px solid #CCC;
    display:none;
    }
    </style>
    <script type="text/javascript">
    $j = jQuery;
    $j().ready(function(){ //when page has fully loaded
      $j('h2:contains("Dashboard")').parent().prev().after('<div id="my-plugin-alert" class="alert">X Plugin 2.0 is available. <a href="">Upgrade Now!</a></div>');
      setTimeout("$j('#my-plugin-alert').fadeIn('slow');clearTimeout();",1000);
    });
    </script>
    <? } add_action('admin_head','addDashboardAlert'); ?>
Viewing 1 replies (of 1 total)
  • The topic ‘Making Dashboard Alerts’ is closed to new replies.