brainstrom_product_id_by_init( string $plugin_init )

BrainstormProduct Id by init.


Description


Parameters

$plugin_init

(string) (Required) Plugin init.


Source

File: admin/bsf-core/index.php

	function brainstrom_product_id_by_init( $plugin_init ) {

		$brainstrom_products = get_option( 'brainstrom_products', array() );
		$brainstorm_plugins  = isset( $brainstrom_products['plugins'] ) ? $brainstrom_products['plugins'] : array();
		$brainstorm_themes   = isset( $brainstrom_products['themes'] ) ? $brainstrom_products['themes'] : array();

		$all_products = $brainstorm_plugins + $brainstorm_themes;

		foreach ( $all_products as $key => $product ) {

			$template = isset( $product['template'] ) ? $product['template'] : '';
			if ( $plugin_init === $template ) {

				return isset( $product['id'] ) ? $product['id'] : false;
			}
		}
	}


User Contributed Notes

You must log in before being able to contribute a note or feedback.