=4.0.0) translations are mature in the global repo */ add_filter( 'load_textdomain_mofile', [ 'ADBC_Admin_Init', 'prioritize_plugin_translations' ], 10, 2 ); // Declare compliance with consent level API $plugin = plugin_basename( __FILE__ ); add_filter( "wp_consent_api_registered_{$plugin}", '__return_true' ); } /** * Load the class file. * * @param string $class_name The name of the class to load. * @return void */ public function loader( $class_name ) { // skip loading the classes that doesn't belong to our plugin if ( strpos( $class_name, 'ADBC_' ) !== 0 ) { return; } $class_file_name = 'class-' . str_replace( '_', '-', strtolower( $class_name ) ) . '.php'; $iterator = new RecursiveIteratorIterator( new RecursiveDirectoryIterator( __DIR__ . '/includes', FilesystemIterator::SKIP_DOTS ) ); foreach ( $iterator as $file ) { if ( $file->getFilename() === $class_file_name ) { include_once $file->getRealPath(); return; } } } } // Get instance new ADBC_Advanced_DB_Cleaner();