Skip to content

Commit

Permalink
setup performance module with features
Browse files Browse the repository at this point in the history
  • Loading branch information
circlecube committed May 8, 2024
1 parent 81a641c commit 549c8f2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,4 +202,5 @@ function () {

// These shouldn't be needed once the autoloader is properly running in tagged releases
require_once BLUEHOST_PLUGIN_DIR . '/vendor/newfold-labs/wp-module-staging/includes/StagingFeature.php';
require_once BLUEHOST_PLUGIN_DIR . '/vendor/newfold-labs/wp-module-performance/includes/PerformanceFeature.php';
require_once BLUEHOST_PLUGIN_DIR . '/vendor/newfold-labs/wp-module-features/includes/functions.php';
4 changes: 2 additions & 2 deletions inc/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public static function subpages() {
'bluehost#/marketplace' => __( 'Marketplace', 'wp-plugin-bluehost' ),
);
// wp-cloud adjustment
$performance = ( 'atomic' === getContext( 'platform' ) )
$performance = isEnabled( 'performance' )
? array(
'bluehost#/performance' => __( 'Performance', 'wp-plugin-bluehost' ),
)
Expand Down Expand Up @@ -203,7 +203,7 @@ public static function assets( $hook ) {
\wp_register_script(
'bluehost-script',
BLUEHOST_BUILD_URL . '/index.js',
array_merge( $asset['dependencies'], array( 'nfd-runtime' ) ),
array_merge( $asset['dependencies'], array( 'newfold-features', 'nfd-runtime' ) ),
$asset['version'],
true
);
Expand Down
2 changes: 1 addition & 1 deletion src/app/data/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export const routes = [
title: __( 'Performance', 'wp-plugin-bluehost' ),
Component: Performance,
Icon: BoltIcon,
condition: 'atomic' !== window.NewfoldRuntime.context.platform,
condition: window.NewfoldRuntime.features.performance,
},
{
name: '/settings',
Expand Down

0 comments on commit 549c8f2

Please sign in to comment.