ap_addon_has_options( string $file )

Description #

Check if addon has options.

Parameters #

  • $file
    string (Required) Addon main file.

Changelog #

VersionDescription
4.1.8Introduced.

Source #

File: includes/functions.php

function ap_addon_has_options( $file ) {
	$addon = ap_get_addon( $file );

	$form_name = str_replace( '.php', '', $addon['id'] );
	$form_name = str_replace( '/', '_', $form_name );

	if ( anspress()->form_exists( 'addon-' . $form_name ) ) {
		return true;
	}

	return false;
}

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