ap_get_addon( string $file )

Description #

Return a single addon by file path.

Parameters #

  • $file
    string (Required) Main file name of addon.

Changelog #

VersionDescription
4.1.0Introduced.

Source #

File: includes/functions.php

function ap_get_addon( $file ) {
	$search = false;

	foreach ( ap_get_addons() as $f => $addon ) {
		if ( $f === $file ) {
			$search = $addon;
			break;
		}
	}

	return $search;
}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment