diff --git a/underpin-berlin-db.php b/underpin-berlin-db.php index 4796d99..f156831 100644 --- a/underpin-berlin-db.php +++ b/underpin-berlin-db.php @@ -3,7 +3,7 @@ exit; } -add_action( 'underpin/before_setup', function ( $instance ) { +add_action( 'underpin/before_setup', function ( $file, $class ) { if ( ! defined( 'UNDERPIN_BERLIN_DB_PATH' ) ) { define( 'UNDERPIN_BERLIN_DB_PATH', trailingslashit( __DIR__ ) ); } @@ -13,7 +13,7 @@ require_once( UNDERPIN_BERLIN_DB_PATH . 'lib/factories/Database_Model_Instance.php' ); require_once( UNDERPIN_BERLIN_DB_PATH . 'lib/factories/Database_Model_With_Meta_Instance.php' ); - $instance->loaders()->add( 'berlin_db', [ + Underpin\underpin()->get( $file, $class )->loaders()->add( 'berlin_db', [ 'registry' => 'Underpin_BerlinDB\Loaders\Database' ] ); -}, 20 ); \ No newline at end of file +}, 20, 2 ); \ No newline at end of file