get_users( array( 'orderby' => 'ID', 'order' => 'DESC' ) ); $output = array(); $output[] = array( __( "Name", 'complianz-gdpr' ), __( "Email", 'complianz-gdpr' ) ); foreach ( $users as $user ) { $output[] = array( $user->name, $user->email ); } return $output; } function find_wordpress_base_path() { $path = dirname(__FILE__); do { //it is possible to check for other files here if (file_exists($path . "/wp-config.php")) { //check if the wp-load.php file exists here. If not, we assume it's in a subdir. if ( file_exists( $path . '/wp-load.php') ) { return $path; } else { //wp not in this directory. Look in each folder to see if it's there. if ( file_exists( $path ) && $handle = opendir( $path ) ) { while ( false !== ( $file = readdir( $handle ) ) ) { if ( $file != "." && $file != ".." ) { $file = $path .'/' . $file; if ( is_dir( $file ) && file_exists( $file . '/wp-load.php') ) { $path = $file; break; } } } closedir( $handle ); } } return $path; } } while ($path = realpath("$path/..")); return false; }