File "module.php"

Full Path: /home/fmpomerode/public_html/wp-content/plugins/powerpack-lite-for-elementor/modules/formidable-forms/module.php
File size: 1.21 KB
MIME-type: text/x-c++; charset=us-ascii
Charset: utf-8

<?php
namespace PowerpackElementsLite\Modules\FormidableForms;

use PowerpackElementsLite\Base\Module_Base;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

class Module extends Module_Base {

	public function __construct() {
		parent::__construct();

		add_action( 'elementor/frontend/after_register_styles', [ $this, 'register_styles' ] );
	}

	/**
	 * Module is active or not.
	 *
	 * @since 1.3.3
	 *
	 * @access public
	 *
	 * @return bool true|false.
	 */
	public static function is_active() {
		if ( class_exists( 'FrmHooksController' ) ) {
			return true;
		}
		return false;
	}

	/**
	 * Get Module Name.
	 *
	 * @since 1.3.3
	 *
	 * @access public
	 *
	 * @return string Module name.
	 */
	public function get_name() {
		return 'pp-formidable-forms';
	}

	/**
	 * Get Widgets.
	 *
	 * @since 1.3.3
	 *
	 * @access public
	 *
	 * @return array Widgets.
	 */
	public function get_widgets() {
		return [
			'Formidable_Forms',
		];
	}

	/**
	 * Register styles.
	 *
	 * @return void
	 */
	public function register_styles() {
		wp_register_style(
			'widget-pp-formidable-forms',
			$this->get_css_assets_url( 'widget-formidable-forms', null, true, true ),
			[],
			POWERPACK_ELEMENTS_LITE_VER
		);
	}
}