nldx/wp-plugin-update-checker-class

A class that allows checking for updates in a self hosted scenario.

v2.1.3 2025-06-14 19:46 UTC

This package is auto-updated.

Last update: 2025-07-14 20:00:37 UTC


README

Getting started

composer require nldx/wp-plugin-update-checker-class

Usage


define( 'NLDX_BOOTSTRAP_BLOCKS_VERSION', '1.0.0' );
define( 'NLDX_BOOTSTRAP_BLOCKS_FILE', __FILE__ );
define( 'NLDX_BOOTSTRAP_BLOCKS_DIR', plugin_dir_path( __FILE__ ) );
define( 'NLDX_BOOTSTRAP_BLOCKS_SLUG', dirname ( plugin_basename( __FILE__ ) ) );
define( 'NLDX_BOOTSTRAP_BLOCKS_INFO', 'https://example.domain.com/example-plugin/info.json');

/**
 * Include classes.
 */
 
if ( !class_exists( \NLDX\UpdateChecker::class ) ) {
	require_once NLDX_BOOTSTRAP_BLOCKS_DIR . 'vendor/nldx/wp-plugin-update-checker-class/class-update-checker.php';
}

/**
 * Check for updates.
 */

use NLDX\UpdateChecker;
new UpdateChecker(
	NLDX_BOOTSTRAP_BLOCKS_SLUG,
	NLDX_BOOTSTRAP_BLOCKS_VERSION,
	NLDX_BOOTSTRAP_BLOCKS_INFO
);