<?php

/**
 * WSAL Freemius SDK
 *
 * Freemius SDK initialization file for WSAL.
 *
 * @since 2.7.0
 * @package Wsal
 */
// Exit if accessed directly.
if ( !defined( 'ABSPATH' ) ) {
    exit;
}

if ( file_exists( dirname( __FILE__ ) . '/freemius/start.php' ) ) {
    /**
     * Freemius SDK
     *
     * Create a helper function for easy SDK access.
     *
     * @return array
     * @author Ashar Irfan
     * @since  2.7.0
     */
    function wsal_freemius()
    {
        global  $wsal_freemius ;
        
        if ( !isset( $wsal_freemius ) ) {
            define( 'WP_FS__PRODUCT_94_MULTISITE', true );
            // Include Freemius SDK.
            require_once dirname( __FILE__ ) . '/freemius/start.php';
            // Check anonymous mode.
            $freemius_state = get_site_option( 'wsal_freemius_state', 'anonymous' );
            $is_anonymous = 'anonymous' === $freemius_state || 'skipped' === $freemius_state;
            $is_premium = true;
            $is_anonymous = ( $is_premium ? false : $is_anonymous );
            $wsal_freemius = fs_dynamic_init( array(
                'id'              => '94',
                'slug'            => 'wp-security-audit-log',
                'type'            => 'plugin',
                'public_key'      => 'pk_d602740d3088272d75906045af9fa',
                'is_premium'      => true,
                'has_addons'      => false,
                'has_paid_plans'  => true,
                'trial'           => array(
                'days'               => 7,
                'is_require_payment' => false,
            ),
                'has_affiliation' => false,
                'menu'            => array(
                'slug'        => 'wsal-auditlog',
                'support'     => false,
                'affiliation' => false,
                'network'     => true,
            ),
                'anonymous_mode'  => $is_anonymous,
                'is_live'         => true,
            ) );
        }
        
        return $wsal_freemius;
    }
    
    // Init Freemius.
    wsal_freemius();
    // Signal that SDK was initiated.
    do_action( 'wsal_freemius_loaded' );
}
