Skip to content

Commit

Permalink
Merge pull request #32 from SaltusDev/release/1.1.2
Browse files Browse the repository at this point in the history
Release/1.1.2
  • Loading branch information
LC43 authored Dec 10, 2024
2 parents d05f5af + ec613b0 commit dff0acf
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Saltus Framework helps you develop WordPress plugins that are based on Custom Po

We built it to make things easier and faster for developers with different skills. Add metaboxes, settings pages and other enhancements with just a few lines of code.

**Version 1.1.1**
**Version 1.1.2**

### Features
* Create Custom Post Types easily
Expand Down
2 changes: 1 addition & 1 deletion src/Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Saltus Framework
*
* @version 1.1.1
* @version 1.1.2
*/
namespace Saltus\WP\Framework;

Expand Down
13 changes: 13 additions & 0 deletions src/Modeler.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,23 @@ protected function load( $path ) {
$path_dir = new \RecursiveDirectoryIterator( $path );
$path_dir_iter = new \RecursiveIteratorIterator( $path_dir );

$files = [];
foreach ( $path_dir_iter as $filename => $file ) {
if ( ! in_array( pathinfo( $file, PATHINFO_EXTENSION ), [ 'json', 'php', 'yml', 'yaml' ], true ) ) {
continue;
}
$files[] = $file; // Collect valid files
}

// sort by ascending names so it loads in the desired order
usort(
$files,
function ( $a, $b ) {
return strcmp( $a->getFilename(), $b->getFilename() );
}
); // Sort by filename

foreach ( $files as $file ) { // Iterate over sorted files
$config = new Config( $file );
( $this->is_multiple( $config ) ?
$this->iterate_multiple( $config ) :
Expand Down

0 comments on commit dff0acf

Please sign in to comment.