Closed Mte90 closed 2 years ago
private function scandir( string $folder ) { $temp_files = \scandir( $folder ); $files = array(); if ( \is_array( $temp_files ) ) { foreach( $temp_files as $key => $file ) { if ( \strpos( $file, '~' ) === false ) { $files[] = $file; } } } return \array_diff( $files, array( '..', '.', 'index.php' ) ); }
https://github.com/WPBP/WordPress-Plugin-Boilerplate-Powered/blob/master/plugin-name/engine/Initialize.php
https://github.com/WPBP/WordPress-Plugin-Boilerplate-Powered/blob/master/plugin-name/engine/Initialize.php