diff --git a/bootstrap.php b/bootstrap.php new file mode 100644 index 0000000..690cf7a --- /dev/null +++ b/bootstrap.php @@ -0,0 +1,12 @@ + 'Underpin\Options\Loaders\Options', +] ) ); diff --git a/composer.json b/composer.json index caa0da8..24fd700 100644 --- a/composer.json +++ b/composer.json @@ -13,8 +13,9 @@ "underpin/underpin": "^2.0" }, "autoload": { + "psr-4": {"Underpin\\Options\\": "lib/"}, "files": [ - "options.php" + "bootstrap.php" ] } } diff --git a/lib/abstracts/Option.php b/lib/Abstracts/Option.php similarity index 98% rename from lib/abstracts/Option.php rename to lib/Abstracts/Option.php index 2783655..6e53024 100644 --- a/lib/abstracts/Option.php +++ b/lib/Abstracts/Option.php @@ -7,7 +7,7 @@ */ -namespace Underpin_Options\Abstracts; +namespace Underpin\Options\Abstracts; use Underpin\Traits\Feature_Extension; use WP_Error; diff --git a/lib/factories/Option_Instance.php b/lib/Factories/Option_Instance.php similarity index 74% rename from lib/factories/Option_Instance.php rename to lib/Factories/Option_Instance.php index 18d24ce..c74ebdc 100644 --- a/lib/factories/Option_Instance.php +++ b/lib/Factories/Option_Instance.php @@ -1,10 +1,10 @@ function ( Underpin $plugin ) { - require_once( plugin_dir_path( __FILE__ ) . 'lib/abstracts/Option.php' ); - require_once( plugin_dir_path( __FILE__ ) . 'lib/loaders/Options.php' ); - require_once( plugin_dir_path( __FILE__ ) . 'lib/factories/Option_Instance.php' ); - $plugin->loaders()->add( 'options', [ - 'class' => 'Underpin_Options\Loaders\Options', - ] ); - }, -] ) );