[], 'version' => $version, ]; $scriptAsset = file_exists($scriptAssetPath) ? require $scriptAssetPath : $fallback; foreach ($scriptAsset['dependencies'] as $style) { \wp_enqueue_style($style); } \wp_enqueue_script( Config::$slug . '-help-center-scripts', EXTENDIFY_BASE_URL . 'public/build/' . Config::$assetManifest['extendify-help-center.js'], array_merge([Config::$slug . '-shared-scripts'], $scriptAsset['dependencies']), $scriptAsset['version'], true ); $partnerData = PartnerData::getPartnerData(); \wp_add_inline_script( Config::$slug . '-help-center-scripts', 'window.extHelpCenterData = ' . \wp_json_encode([ 'supportUrl' => isset($partnerData['supportUrl']) ? \esc_attr($partnerData['supportUrl']) : '', 'userData' => [ 'tourData' => \wp_json_encode(TourController::get()->get_data()), 'supportArticlesData' => \wp_json_encode(SupportArticlesController::get()->get_data()), 'routerData' => \wp_json_encode(RouterController::get()->get_data()), ], ]), 'before' ); \wp_set_script_translations( Config::$slug . '-help-center-scripts', 'extendify-local', EXTENDIFY_PATH . 'languages/js' ); \wp_enqueue_style( Config::$slug . '-help-center-styles', EXTENDIFY_BASE_URL . 'public/build/' . Config::$assetManifest['extendify-help-center.css'], [], Config::$version, 'all' ); } }