A PHP Composer library for WordPress to make front-end flash messaging easy.
A PHP Composer library for WordPress to make front-end flash messaging easy., (*1)
true
, false
and null
in stead of TRUE
, FALSE
and NULL
.The best way to use this package is through Composer:, (*2)
$ composer require codemascot/wp-flash-message
Instantiate the FlashMessage
class object like below-, (*3)
$flash_message = new \CodeMascot\WPFlashMessage\FlashMessage();
Turn on the SESSION
in PHP like below-, (*4)
$flash_message->start_session();
Set you message like below-, (*5)
$flash_message->error( __( 'Your message here', 'text-domain' ), // This is the URL where you want to redirect. home_url() );
Display the SESSION
message like below-, (*6)
// Display the messages $flash_message->display();
Write CSS
style as you want to style the message., (*7)
I'm Khan AKA CodeMascot a professional web developer and I've written this script for my personal usage., (*8)
Copyright (c) 2018 Khan M Rashedun-Naby, CodeMascot, (*9)
Good news, this plugin is free for everyone! Since it's released under the MIT License you can use it free of charge on your personal or commercial website., (*10)
All feedback / bug reports / pull requests are welcome., (*11)