<?php
//This init class is used to add the extension to the extensions list while you are developing them.
//When the extension is added to the supported list of extensions, this file is no longer needed.

if ( !class_exists( '{package}_Init' ) ) {
	class {package}_Init {

		function __construct() {
			add_filter( 'foogallery_available_extensions', array( $this, 'add_to_extensions_list' ) );
		}

		function add_to_extensions_list( $extensions ) {
			$extensions[] = array(
				'slug'=> '{slug}',
				'class'=> '{package}',
				'title'=> __('{name}', '{plugin_slug}'),
				'file'=> 'foogallery-{slug}-extension.php',
				'description'=> __('{desc}', '{plugin_slug}'),
				'author'=> '{author}',
				'author_url'=> '{author_link}',
				'thumbnail'=> {constant}_URL . '/assets/extension_bg.png',
				'tags'=> array( __('{type}', 'foogallery') ),	//use foogallery translations
				'categories'=> array( __('Build Your Own', 'foogallery') ), //use foogallery translations
				'source'=> 'generated'
			);

			return $extensions;
		}
	}

	new {package}_Init();
}