iandunn / admin-notice-helper

Helps WordPress plugins and themes display messages/errors to the user within the Admin Panels
GNU General Public License v2.0
33 stars 7 forks source link

Ad dismissable notices #2

Open sixtyseven-multimedia opened 9 years ago

sixtyseven-multimedia commented 9 years ago

Fantatsic Idea, I just included it in a plugin. What I would like to see in the future would be some sort of dismissable notices, this would make a perfect addition.

I got rid of the file include to have a drop_in class like this:

echo '<div class="anh_message '.esc_attr( $class ).'">'; foreach ( $this->notices[ $type ] as $notice ) { echo '<p>'; echo wp_kses( $notice, wp_kses_allowed_html( 'post' ) ); echo '</p>'; } echo '</div>'; Thanks again for your work.,

sixtyseven-multimedia commented 9 years ago

Another Idea: add two new notice types, warning and info. This would make your nice class even more flexible.