<commit_before><?php

use Alpipego\WpLib\Autoload;

/**
 * Plugin Name: Dynamic Image Resizer
 * Plugin URI:  https://alpipego.com/
 * Version:     1.0.0
 * Author:      Alex
 * Author URI:  http://alpipego.com/
 */

new Autoload(__DIR__, 'Alpipego');

add_filter('upload_dir', function($uploads) {
	$uploads['path'] = realpath($uploads['path']);
	$uploads['basedir'] = realpath($uploads['basedir']);

	while (strpos($uploads['url'], '/./')) {
		$uploads['url'] = preg_replace( '%(?:/\.{1}/)%', '/', $uploads['url'] );
	}

	while (strpos($uploads['baseurl'], '/./')) {
		$uploads['baseurl'] = preg_replace( '%(?:/\.{1}/)%', '/', $uploads['baseurl'] );
	}

	while (strpos($uploads['url'], '/../')) {
		$uploads['url'] = preg_replace( '%(?:([^/]+?)/\.{2}/)%', '', $uploads['url']);
	}

	while (strpos($uploads['baseurl'], '/../')) {
		$uploads['baseurl'] = preg_replace( '%(?:([^/]+?)/\.{2}/)%', '', $uploads['baseurl']);
	}

	return $uploads;
});<commit_msg>removed upload dir url/path resolution<commit_after><?php

use Alpipego\WpLib\Autoload;

/**
 * Plugin Name: Dynamic Image Resizer
 * Plugin URI:  https://alpipego.com/
 * Version:     1.0.0
 * Author:      Alex
 * Author URI:  http://alpipego.com/
 */

new Autoload(__DIR__, 'Alpipego');
{'fraction_non_alphanumeric': 0.27309236947791166, 'fraction_numerical': 0.008032128514056224, 'mean_word_length': 4.085714285714285, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '4601123', 'n_tokens_mistral': 491, 'n_tokens_neox': 460, 'n_words': 78}