4 Comments

  1. Julien

    The idea of having notices dismissed for a given period of time is interesting. However, the process seems a bit fastidious in the sense that it is still necessary to manually create the notices.

    Also, having to add long class names, and also not forget the is-dismissible class, looks like an easy way to forget something.

    I have a similar library, available on GitHub since March, that automates most of the process. It also adds a couple more options for defining who sees what: https://github.com/julien731/WP-Dismissible-Notices-Handler

    Report

    • Collins Agbonghama

      Hi Julien, we want plugin / themes author to be able to markup and style the appearance of their admin notices while allowing the lib take care of the dismissal.

      Thanks for chiming in and your library looks great.

      Report

  2. Derek Herman

    When I originally developed dismissible admin notices with Helen my first patch added the ability to hide the notice for a period of time with JS cookies. Unfortunately, we were in beta and could only fix bugs and this functionality was an enhancement. I probably should have followed up with my original patch and then it could have been in Core already. I would likely still use only JS though. Making an Ajax call to PHP to store a transient about a notice to me seems overkill. Regardless of the difference of opinion if anyone wants this sort of functionally in Core they can always open a new Trac ticket with a patch, or comment on the original and include the patch there. Also, the earliest it would be in Core is version 4.7 because 4.6 is currently in beta.

    https://core.trac.wordpress.org/ticket/31233

    Report

Comments are closed.

%d bloggers like this: