exists( $this->path ) ) { return []; } // Read file content safely $contents = $wp_filesystem->get_contents( $this->path ); if ( $contents === false ) { throw new Exception( 'Error reading merges file: ' . esc_html(sanitize_text_field($this->path)) ); } // Split into lines $lines_raw = explode( "\n", $contents ); $lines = []; // Skip first line (as original code does) array_shift( $lines_raw ); foreach ( $lines_raw as $buffer ) { if ( trim( $buffer ) === '' ) { continue; } $line = array_filter( preg_split( "/(\s+)/", $buffer ), fn( $e ) => strlen( trim( $e ) ) > 0 ); if ( ! empty( $line ) ) { $lines[] = $line; } } return $lines; } }