Skip to content

Commit

Permalink
Merge pull request #19 from newfold-labs/add/context-module
Browse files Browse the repository at this point in the history
Add/context module
  • Loading branch information
circlecube authored Feb 27, 2024
2 parents c5da2a9 + 2255b9e commit 3d11c8d
Show file tree
Hide file tree
Showing 4 changed files with 348 additions and 4 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
composer.lock
vendor
node_modules
9 changes: 8 additions & 1 deletion bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

use function NewfoldLabs\WP\Module\Performance\getCacheLevel;
use function NewfoldLabs\WP\ModuleLoader\register;
use function NewfoldLabs\WP\Context\getContext;

if ( function_exists( 'add_action' ) ) {

Expand All @@ -21,6 +22,9 @@ function () {
'name' => 'performance',
'label' => __( 'Performance', 'newfold' ),
'callback' => function ( Container $container ) {
if ( 'atomic' === getContext( 'platform' ) ) {
return;
}
new Performance( $container );
},
'isActive' => true,
Expand All @@ -34,7 +38,10 @@ function () {
add_action(
'newfold_container_set',
function ( Container $container ) {

if ( 'atomic' === getContext( 'platform' ) ) {
return;
}

register_activation_hook(
$container->plugin()->file,
function () use ( $container ) {
Expand Down
14 changes: 12 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,19 @@
"bootstrap.php"
]
},
"repositories": [
{
"type": "composer",
"url": "https://newfold-labs.github.io/satis/",
"only": [
"newfold-labs/*"
]
}
],
"require": {
"newfold-labs/wp-module-context": "^1.0",
"wp-forge/collection": "^1.0",
"wp-forge/wp-htaccess-manager": "^1.0",
"wpscholar/url": "^1.2",
"wp-forge/collection": "^1.0"
"wpscholar/url": "^1.2"
}
}
328 changes: 328 additions & 0 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3d11c8d

Please sign in to comment.