PHP code example of wpplex / wp-notify

1. Go to this page and download the library: Download wpplex/wp-notify library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

wpplex / wp-notify example snippets


$id = 'notif-xxy';
$content = 'some random notif text';
$type = 'error';
$hide_button = true;
$notify->add_notification( $id, $content, $type, $hide_button );

$id = 'notif-xxy';
$display_count = 20; // times
$notify->display_notification( $id, $display_count );

$id = 'notif-xxy';
$notify->hide_notification( $id );