<commit_before><?php
require(get_template_directory() . '/res/functions/widgets/SilencioCategoryPosts.php');
require(get_template_directory() . '/res/functions/widgets/SilencioChildrenPages.php');

// register SilencioCategoryPosts & SilencioChildrenPages widgets
add_action('widgets_init', create_function('', 'register_widget("SilencioCategoryPosts");'));
add_action('widgets_init', create_function('', 'register_widget("SilencioChildrenPages");'));<commit_msg>Updated to autoload res/functions/widgets files<commit_after><?php
$widgetsDir = get_template_directory() . '/res/functions/widgets';

//Auto-load all widgets in res/functions/widgets
foreach (glob("$widgetsDir/*.php") as $file) {
    $widget = pathinfo($file, PATHINFO_FILENAME);

    require($file);
    add_action('widgets_init', create_function('', "register_widget('$widget');"));
}
{'fraction_non_alphanumeric': 0.16, 'fraction_numerical': 0.0, 'mean_word_length': 8.561797752808989, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '6580653', 'n_tokens_mistral': 263, 'n_tokens_neox': 245, 'n_words': 38}