PHP code example of rarst / update-blocker

1. Go to this page and download the library: Download rarst/update-blocker 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/ */

    

rarst / update-blocker example snippets


array(
	'all'     => false,
	'files'   => array( '.git', '.svn', '.hg' ),
	'plugins' => array( 'update-blocker/update-blocker.php' ),
	'themes'  => array(),
	'core'    => false,
)

add_filter( 'update_blocker_blocked', function( $blocked ) {
	$blocked['plugins'][] = plugin_basename( __FILE__ ); // or just folder-name/plugin-name.php string
	return $blocked;
} );

add_filter( 'update_blocker_blocked', function( $blocked ) {
	$blocked['themes'][] = 'theme-name';
	return $blocked;
} );

add_filter( 'update_blocker_blocked', function ( $blocked ) {
	$blocked['core'] = true;
	return $blocked;
} );