<?php

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


//////////////////////////////////////////////////////////////////
// Jet Smart Filters
//////////////////////////////////////////////////////////////////

if ( defined( 'WPINC' ) ) {
    define( 'JSF_QUERY_LOOP_PROVIDER_ID', 'greenshift-query-loop' );
    define( 'JSF_QUERY_LOOP_PROVIDER_NAME', 'Greenshift Query Loop' );
    add_action( 'jet-smart-filters/providers/register', function( $providers_manager ) {

        $providers_manager->register_provider(
            'JSF_Query_Loop_Provider', // Custom provider class name
            GL_DIR_PATH . 'parts/provider.php' // Path to file where this class defined
        );
    } );

    add_filter( 'jet-smart-filters/blocks/allowed-providers', function( $providers ) {
        $providers[ JSF_QUERY_LOOP_PROVIDER_ID ] = JSF_QUERY_LOOP_PROVIDER_NAME;
        return $providers;
    } );
}