diff --git a/inc/Admin.php b/inc/Admin.php index e090beef9..7e611ade6 100644 --- a/inc/Admin.php +++ b/inc/Admin.php @@ -28,6 +28,7 @@ public function __construct() { \add_action( 'admin_head', array( __CLASS__, 'admin_nav_style' ) ); \add_filter('newfold-runtime', array( __CLASS__, 'add_to_runtime' ) ); + \add_filter('newfold_runtime', array( __CLASS__, 'add_to_runtime' ) ); if ( isset( $_GET['page'] ) && strpos( filter_input( INPUT_GET, 'page', FILTER_UNSAFE_RAW ), 'bluehost' ) >= 0 ) { // phpcs:ignore \add_action( 'admin_footer_text', array( __CLASS__, 'add_brand_to_admin_footer' ) ); diff --git a/inc/Data.php b/inc/Data.php index aaaf5c448..79c07c6d3 100644 --- a/inc/Data.php +++ b/inc/Data.php @@ -24,10 +24,10 @@ public static function runtime() { $runtime = array( 'isJarvis' => $bluehost_module_container->get('isJarvis'), 'plugin' => array( - 'url' => BLUEHOST_BUILD_URL, - 'version' => BLUEHOST_PLUGIN_VERSION, - 'assets' => BLUEHOST_PLUGIN_URL . 'assets/', - 'brand' => $bluehost_module_container->plugin()->brand, + 'url' => BLUEHOST_BUILD_URL, + 'version' => BLUEHOST_PLUGIN_VERSION, + 'assets' => BLUEHOST_PLUGIN_URL . 'assets/', + 'brand' => $bluehost_module_container->plugin()->brand, ), ); diff --git a/src/webpack-public-path.js b/src/webpack-public-path.js index 36da7c725..122ff2e66 100644 --- a/src/webpack-public-path.js +++ b/src/webpack-public-path.js @@ -3,7 +3,7 @@ * so that lazy-loading works correctly. This value is set in /includes/Data.php in runtime(). */ export default () => { - if ( 'undefined' !== typeof window.NewfoldRuntime && 'sdk' in window.NewfoldRuntime ) { - __webpack_public_path__ = window.NewfoldRuntime.sdk.plugin.url; + if ( 'undefined' !== typeof window.NewfoldRuntime && 'plugin' in window.NewfoldRuntime ) { + __webpack_public_path__ = window.NewfoldRuntime.plugin.url; } };