Search by

baxtian / wp_requirements

baxtian

Library to set a list of plugins required to be installed.

Package info

bitbucket.org/baxtian/wp_requirements

pkg:composer/baxtian/wp_requirements

Statistics

Installs: 1 138

Dependents: 0

Suggesters: 0

0.3.15 2026-10-18 13:09 UTC

This package is auto-updated.

Last update: 2026-10-18 13:10:14 UTC


README

Object to define the Requirements for a theme or plugin.

Usage:

<?php

 use Baxtian\WP_Requirements as WP_Requirements;

 // Do we miss a requirement
 if (WP_Requirements::requirements(
 	'Theme or Plugin Name', 
 	[
 		[
 			'name' => 'Timber',
 			'slug' => 'timber-library/timber.php',
 			'zip'=> 'https://downloads.wordpress.org/plugin/timber-library.latest-stable.zip',
 			'check' => ['self::has_timber', ''], // To detect if your theme has timber.
 		],
 		[
 			'name' => 'SCSS-Library',
 			'slug' => 'scss-library/scss-library.php',
 			'zip'=> 'https://downloads.wordpress.org/plugin/scss-library.latest-stable.zip',
 			'check' => ['class_exists', 'ScssLibrary\ScssLibrary'], // You can use here also 'function_exists'.
 		],
 		[
 			'name' => 'Font Awesome',
 			'slug' => 'font-awesome/font-awesome.php',
 			'zip'=> 'https://downloads.wordpress.org/plugin/font-awesome.latest-stable.zip',
 			'check' => ['class_exists', 'FortAwesome\FontAwesome_Loader'],
 		],
 	]
 )) {

	// Code to be displayed if there are missing requirements
	...
	
 	// Finish your theme execution? It's up to you.
 	return;
 }

Mantainers

Juan Sebastián Echeverry baxtian.echeverry@gmail.com

Changelog

See CHANGELOG.md.