<commit_before><?php
/*
Plugin Name: WP Expired Transients
Plugin URI: https://github.com/technosailor/wp-expire-transients
Author: <NAME>
Author URI: http://technosailor.com
Description: WordPress does not have a very good garbage collection system for transients when WordPress is not using an external object cache. In fact, it doesn't at all. When a transient expires, it's left in the databasee. This plugin takes care of that for you.
Version: 1.0-alpha
License: MIT
License URI: https://github.com/technosailor/wp-expire-transients/blob/master/LICENSE
*/

class WP_Expired_Transients {

	private $transients;
	public $err;
	public $msg;

	public function __construct() {
		// Object caches handle expiration properly, so no need to garbage collect. Abort mission!
		if ( wp_using_ext_object_cache() ) 
			return false;

		$this->transients = false;
		$this->err = array();
		$this->msg = false;
		$this->hooks();
	}

	public function hooks() {

		add_action( 'init', array( $this, 'purge' ),1 );
		add_action( 'admin_notices', array( $this, 'notices' ) );
	}
<commit_msg>Remove admin notices as they will annoy people<commit_after><?php
/*
Plugin Name: WP Expired Transients
Plugin URI: https://github.com/technosailor/wp-expire-transients
Author: <NAME>
Author URI: http://technosailor.com
Description: WordPress does not have a very good garbage collection system for transients when WordPress is not using an external object cache. In fact, it doesn't at all. When a transient expires, it's left in the databasee. This plugin takes care of that for you.
Version: 1.0-alpha
License: MIT
License URI: https://github.com/technosailor/wp-expire-transients/blob/master/LICENSE
*/

class WP_Expired_Transients {

	private $transients;
	public $err;
	public $msg;

	public function __construct() {
		// Object caches handle expiration properly, so no need to garbage collect. Abort mission!
		if ( wp_using_ext_object_cache() ) 
			return false;

		$this->transients = false;
		$this->err = array();
		$this->msg = false;
		$this->hooks();
	}

	public function hooks() {

		add_action( 'init', array( $this, 'purge' ),1 );
		//add_action( 'admin_notices', array( $this, 'notices' ) );
	}

{'fraction_non_alphanumeric': 0.11501597444089456, 'fraction_numerical': 0.0027384755819260614, 'mean_word_length': 4.372549019607843, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, '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': '88893', 'n_tokens_mistral': 716, 'n_tokens_neox': 676, 'n_words': 237}