<commit_before><?php
/**
 * Created by PhpStorm.
 * User: <NAME>
 * Date: 3/14/2015
 * Time: 1:06 PM
 */

/**
 * Represents the main plugin class.
 */
class WPU_Plugin
{
    public static $textDomain = 'wp-wordpress-utilities';
    private $pluginDir;
    private $baseName;
    private $file;
    private $options;
    private $admin;

    /**
     * Initializes a new instance of the WPU_Plugin class.
     * @param $file string The full path to the main file of the plugin.
     */
    public function __construct($file)
    {
        $this->pluginDir = plugin_dir_path($file);
        $this->baseName = plugin_basename($file);
        $this->file = $file;

        register_activation_hook($this->file, array('WPU_Plugin', 'onActivate'));
        register_deactivation_hook($this->file, array('WPU_Plugin', 'onDeactivate'));

        if (!defined('WP_INSTALLING') || WP_INSTALLING == false) {
            add_action('plugins_loaded', array($this, 'onPluginsLoaded'));
            add_action('wp_enqueue_scripts', array($this, 'enqueueScripts'));
        }

        PucFactory::buildUpdateChecker(
            'https://github.com/maartenkools/wordpress/releases/download/{wp-major}.{wp-minor}.{build}.{revision}/wp-wordpress-utilities.json',
            $this->file,
            'wp-wordpress-utilities'
        );
    }

    /**
     * Gets the current instance of the WPU_Plugin class.
     * @return WPU_Plugin The current instance of the WPU_Plugin class, if initialized; otherwise, null.
     */
    public static function current()
    {
        if (!isset($GLOBALS['wpu_plugin'])) return null;

        return $GLOBALS['wpu_plugin'];
    }

    /**
     * Called by WordPress when the plugin is activated.
     */
    public static function onActivate()
    {
        do_action('wpu_activate');
    }

    /**
     * Called by WordPress when the plugin is deactivated.
     */
    public static function onDeactivate()<commit_msg>Changed the url to the json file<commit_after><?php
/**
 * Created by PhpStorm.
 * User: <NAME>
 * Date: 3/14/2015
 * Time: 1:06 PM
 */

/**
 * Represents the main plugin class.
 */
class WPU_Plugin
{
    public static $textDomain = 'wp-wordpress-utilities';
    private $pluginDir;
    private $baseName;
    private $file;
    private $options;
    private $admin;

    /**
     * Initializes a new instance of the WPU_Plugin class.
     * @param $file string The full path to the main file of the plugin.
     */
    public function __construct($file)
    {
        $this->pluginDir = plugin_dir_path($file);
        $this->baseName = plugin_basename($file);
        $this->file = $file;

        register_activation_hook($this->file, array('WPU_Plugin', 'onActivate'));
        register_deactivation_hook($this->file, array('WPU_Plugin', 'onDeactivate'));

        if (!defined('WP_INSTALLING') || WP_INSTALLING == false) {
            add_action('plugins_loaded', array($this, 'onPluginsLoaded'));
            add_action('wp_enqueue_scripts', array($this, 'enqueueScripts'));
        }

        PucFactory::buildUpdateChecker(
            'https://raw.githubusercontent.com/maartenkools/wordpress/master/updater/wp-wordpress-utilities.json',
            $this->file,
            'wp-wordpress-utilities'
        );
    }

    /**
     * Gets the current instance of the WPU_Plugin class.
     * @return WPU_Plugin The current instance of the WPU_Plugin class, if initialized; otherwise, null.
     */
    public static function current()
    {
        if (!isset($GLOBALS['wpu_plugin'])) return null;

        return $GLOBALS['wpu_plugin'];
    }

    /**
     * Called by WordPress when the plugin is activated.
     */
    public static function onActivate()
    {
        do_action('wpu_activate');
    }

    /**
     * Called by WordPress when the plugin is deactivated.
     */
    public static function onDeactivate()
{'fraction_non_alphanumeric': 0.1268733850129199, 'fraction_numerical': 0.00516795865633075, 'mean_word_length': 2.665719696969697, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 17, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5523531', 'n_tokens_mistral': 1181, 'n_tokens_neox': 1130, 'n_words': 281}