Skip to content

Commit

Permalink
get context set on container
Browse files Browse the repository at this point in the history
still working out the autoloader though
  • Loading branch information
circlecube committed Feb 16, 2024
1 parent 22956a0 commit 7c4e3a0
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php
use NewfoldLabs\WP\ModuleLoader\Container;
use NewfoldLabs\WP\Module\Context\Context;
// use NewfoldLabs\WP\Module\Context\Context;

require_once BLUEHOST_PLUGIN_DIR . 'vendor/newfold-labs/wp-module-context/includes/Context.php';

if ( function_exists( 'add_action' ) ) {

Expand All @@ -23,11 +25,11 @@ function () {
function ( Container $container ) {

// Set all context on container
// $container->set(
// 'context',
// Context::all()
// );

$container->set(
'context',
\NewfoldLabs\WP\Context\Context::all()
);
// TODO: Set up a service ?
// $container->set( 'contextService', $container->service( function () { return new ContextService(); } ) );
}
Expand Down

0 comments on commit 7c4e3a0

Please sign in to comment.