PHP code example of collizo4sky / persist-admin-notices-dismissal

1. Go to this page and download the library: Download collizo4sky/persist-admin-notices-dismissal 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/ */

    

collizo4sky / persist-admin-notices-dismissal example snippets



add_action( 'admin_init', array( 'PAnD', 'init' ) );

function sample_admin_notice__success() {
	

function sample_admin_notice__success() {
	if ( ! PAnD::is_admin_notice_active( 'disable-done-notice-forever' ) ) {
		return;
	}

	

add_action( 'admin_init', array( 'PAnD', 'init' ) );

function sample_admin_notice__success1() {
	if ( ! PAnD::is_admin_notice_active( 'notice-one-forever' ) ) {
		return;
	}

	

add_filter( 'pand_theme_loader', '__return_true' );

add_filter(
	'pand_dismiss_notice_js_url',
	function( $js_url, $composer_path ) {
		return get_stylesheet_directory_uri() . $composer_path;
	},
	10,
	2
);