About this plugin
This is a very simple WordPress plugin for creating frontend notices server side or client side. There are 4 notice types by default success, error, warning, general or you can create custom notice types. Server side notices are stored in the session until displayed.
This plugin hopes to one day solve the problem of complex WordPress sites with multiple plugins all having their own Notices that all require styling.
But for now, the Notices API is useful tool for developers creating custom functionality in their theme.
Server Side Usage
>
Client Side Usage
ready(function($){
warning( title, message, scroll_to, timer, callback );
render_notice( type, title, message, scroll_to, timer, callback );
log( $notice ); });
});
Options
add_filter( 'notice_api_options', 'customize_notice_options' );
function customize_notice_options( $options ) { $options = array( 'prepend_selector' => '#content', 'container_class' => 'notices-container', 'before_title' => '<strong>', 'after_title' => ':</strong> ', 'scrolling_speed' => 500, ); return $options; }