<commit_before><?php
namespace ReduxCore\ReduxFramework;
/* Loader.php is for loading custom extensions for redux and in 
 * accelerated-mobile-pages\includes\options\extensions folder
 * 
 * More on loading on extensions is here https://github.com/ReduxFramework/redux-extensions-loader
*/
if(!function_exists('ampforwp_register_custom_extension_loader')) :
    function ampforwp_register_custom_extension_loader($ReduxFramework) {
        $path    = AMPFORWP_PLUGIN_DIR.'/includes/options/extensions/';
            $folders = scandir( $path, 1 );
            foreach ( $folders as $folder ) {
                if ( $folder === '.' or $folder === '..' or ! is_dir( $path . $folder ) ) {
                    continue;
                }
                $extension_class = 'ReduxCore\\ReduxFramework\\ReduxFramework_extension_' . $folder;
                if ( ! class_exists( $extension_class ) ) {
                    // In case you wanted override your override, hah.
                    $class_file = $path . $folder . '/extension_' . $folder . '.php';
                    $class_file = apply_filters( 'redux/extension/' . $ReduxFramework->args['opt_name'] . '/' . $folder, $class_file );
                    if ( $class_file ) {
                        require_once( $class_file );
                    }
                }
                if ( ! isset( $ReduxFramework->extensions[ $folder ] ) ) {
                    $ReduxFramework->extensions[ $folder ] = new $extension_class( $ReduxFramework );
                }
            }
    }

    add_action("redux/extensions/redux_builder_amp/before", 'ReduxCore\\ReduxFramework\\ampforwp_register_custom_extension_loader', 0);
endif;<commit_msg>#4963 Added in 1.0.76.9<commit_after><?php
namespace ReduxCore\ReduxFramework;
/* Loader.php is for loading custom extensions for redux and in 
 * accelerated-mobile-pages\includes\options\extensions folder
 * 
 * More on loading on extensions is here https://github.com/ReduxFramework/redux-extensions-loader
*/
if(!function_exists('ampforwp_register_custom_extension_loader')) :
    function ampforwp_register_custom_extension_loader($ReduxFramework) {
        $path    = AMPFORWP_PLUGIN_DIR.'/includes/options/extensions/';
            $folders = scandir( $path, 1 );
            foreach ( $folders as $folder ) {
                if ( $folder === '.' or $folder === '..' or ! is_dir( $path . $folder ) ) {
                    continue;
                }
                $extension_class = 'ReduxCore\\ReduxFramework\\ReduxFramework_extension_' . $folder;
                if ( ! class_exists( $extension_class ) ) {
                    // In case you wanted override your override, hah.
                    $class_file = $path . $folder . '/extension_' . $folder . '.php';
                    $class_file = apply_filters( 'redux/extension/' . $ReduxFramework->args['opt_name'] . '/' . $folder, $class_file );
                    if ( $class_file ) {
                        require_once( $class_file );
                    }
                }
                if ( !class_exists('Redux_Framework_Plugin') && ! isset( $ReduxFramework->extensions[ $folder ] ) ) {
                    $ReduxFramework->extensions[ $folder ] = new $extension_class( $ReduxFramework );
                }
            }
    }

    add_action("redux/extensions/redux_builder_amp/before", 'ReduxCore\\ReduxFramework\\ampforwp_register_custom_extension_loader', 0);
endif;
{'fraction_non_alphanumeric': 0.12241930793835418, 'fraction_numerical': 0.003780168653678395, 'mean_word_length': 2.135824977210574, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, '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': '1870415', 'n_tokens_mistral': 984, 'n_tokens_neox': 935, 'n_words': 179}