2017 © Pedro Peláez
 

library wp-flash-message

A PHP Composer library for WordPress to make front-end flash messaging easy.

image

rnaby/wp-flash-message

A PHP Composer library for WordPress to make front-end flash messaging easy.

  • Monday, November 13, 2017
  • by rnaby
  • Repository
  • 1 Watchers
  • 1 Stars
  • 51 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

WP Flash Message

A PHP Composer library for WordPress to make front-end flash messaging easy., (*1)

Table Of Contents

Coding styles and technique

  • All input data escaped and validated.
  • PSR-4 autoloading used.
  • Developed as Composer package.
  • YODA condition check applied.
  • Maintained Right Margin carefully. Usually that is 80 characters.
  • Used true, false and null in stead of TRUE, FALSE and NULL.
  • INDENTATION: TABS has been used in stead of SPACES.
  • PHP Codesniffer checked.
  • WordPress VIP coding standard followed mostly.

Installation

The best way to use this package is through Composer:, (*2)

$ composer require codemascot/wp-flash-message

Usage

Step 1

Instantiate the FlashMessage class object like below-, (*3)

$flash_message = new \CodeMascot\WPFlashMessage\FlashMessage();

Step 2

Turn on the SESSION in PHP like below-, (*4)

$flash_message->start_session();

Step 3

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()
);

Step 4

Display the SESSION message like below-, (*6)

// Display the messages
$flash_message->display();

Step 5

Write CSS style as you want to style the message., (*7)

Crafted by Khan

I'm Khan AKA CodeMascot a professional web developer and I've written this script for my personal usage., (*8)

License

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)

Contributing

All feedback / bug reports / pull requests are welcome., (*11)

The Versions

13/11 2017

dev-master

9999999-dev

A PHP Composer library for WordPress to make front-end flash messaging easy.

  Sources   Download

MIT

by Khan M Rashedun-Naby

13/11 2017

1.0.0

1.0.0.0

A PHP Composer library for WordPress to make front-end flash messaging easy.

  Sources   Download

MIT

by Khan M Rashedun-Naby