<commit_before><?php
/**
 * Plugin Name:       	Geo Query
 * Description:       	Modify the WP_Query to support the geo_query parameter. Uses the Haversine SQL implementation by Ollie Jones.
 * Plugin URI:        	https://github.com/birgire/geo-query
 * GitHub Plugin URI: 	https://github.com/birgire/geo-query.git
 * Author:	      		<NAME> (birgire)
 * Version:           	0.0.5
 * Licence:           	MIT
 */

namespace Birgir\Geo;

/**
 * Autoload
 */

add_action( 'plugins_loaded', function()
{
    require __DIR__ . '/vendor/autoload.php';
});


/**
 * Init
 */

add_action( 'init', function()
{    
    if ( file_exists( __DIR__ . '/vendor/autoload.php' ) )
    {
		// Composer autoload
		
        require __DIR__ . '/vendor/autoload.php';
    }
    else
    {
		// Fallback for those who don't use Composer
		
        require_once  __DIR__ . '/src/GeoQueryAbstract.php';
        require_once  __DIR__ . '/src/GeoQueryInterface.php';
        require_once  __DIR__ . '/src/GeoQueryContext.php';
        require_once  __DIR__ . '/src/GeoQueryHaversineOptimized.php';
        require_once  __DIR__ . '/src/GeoQueryHaversine.php';
    }

    if( class_exists( __NAMESPACE__ . '\\GeoQueryContext' ) )
    {
     	$o = new GeoQueryContext();
        $o->setup( $GLOBALS['wpdb'] )->activate();
    }

});
<commit_msg>Adjust autoload fallback<commit_after><?php
/**
 * Plugin Name:       	Geo Query
 * Description:       	Modify the WP_Query to support the geo_query parameter. Uses the Haversine SQL implementation by Ollie Jones.
 * Plugin URI:        	https://github.com/birgire/geo-query
 * GitHub Plugin URI: 	https://github.com/birgire/geo-query.git
 * Author:	      		<NAME> (birgire)
 * Version:           	0.0.5
 * Licence:           	MIT
 */

namespace Birgir\Geo;

/**
 * Init
 */

add_action( 'init', function()
{    
	// Load classes
	
    if ( file_exists( __DIR__ . '/vendor/autoload.php' ) )
    {
		// Composer autoload
		
        require __DIR__ . '/vendor/autoload.php';
    }
    else
    {
		// Fallback for those who don't use Composer
		
        require_once  __DIR__ . '/src/GeoQueryAbstract.php';
        require_once  __DIR__ . '/src/GeoQueryInterface.php';
        require_once  __DIR__ . '/src/GeoQueryContext.php';
        require_once  __DIR__ . '/src/GeoQueryHaversine.php';
        require_once  __DIR__ . '/src/GeoQueryHaversineOptimized.php';
    }

	// Active
    if( class_exists( __NAMESPACE__ . '\\GeoQueryContext' ) )
    {
     	$o = new GeoQueryContext();
        $o->setup( $GLOBALS['wpdb'] )->activate();
    }

});

{'fraction_non_alphanumeric': 0.13335940555338288, 'fraction_numerical': 0.0023464998044583495, 'mean_word_length': 2.3134715025906734, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6907420', 'n_tokens_mistral': 919, 'n_tokens_neox': 891, 'n_words': 180}