Skip to content

Commit

Permalink
Merge pull request #4221 from Codeinwp/fix/survey-deps
Browse files Browse the repository at this point in the history
fix: remove survey from dash deps
  • Loading branch information
preda-bogdan authored Mar 29, 2024
2 parents 6fa26d4 + eea3e0e commit 32b7896
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions inc/admin/dashboard/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,20 +299,19 @@ public function enqueue() {

$build_path = get_template_directory_uri() . '/assets/apps/dashboard/build/';
$dependencies = ( include get_template_directory() . '/assets/apps/dashboard/build/dashboard.asset.php' );

$survey_handler = apply_filters( 'themeisle_sdk_dependency_script_handler', 'survey' );
do_action( 'themeisle_sdk_dependency_enqueue_script', 'survey' );

wp_register_style( 'neve-dash-style', $build_path . 'style-dashboard.css', [ 'wp-components', 'neve-components' ], $dependencies['version'] );
wp_style_add_data( 'neve-dash-style', 'rtl', 'replace' );
wp_enqueue_style( 'neve-dash-style' );
wp_register_script( 'neve-dash-script', $build_path . 'dashboard.js', array_merge( $dependencies['dependencies'], [ 'updates', $survey_handler ] ), $dependencies['version'], true );
wp_register_script( 'neve-dash-script', $build_path . 'dashboard.js', array_merge( $dependencies['dependencies'], [ 'updates' ] ), $dependencies['version'], true );
wp_localize_script( 'neve-dash-script', 'neveDash', apply_filters( 'neve_dashboard_page_data', $this->get_localization() ) );
wp_enqueue_script( 'neve-dash-script' );

if ( function_exists( 'wp_set_script_translations' ) ) {
wp_set_script_translations( 'neve-dash-script', 'neve' );
}

do_action( 'themeisle_sdk_dependency_enqueue_script', 'survey' );
}

/**
Expand Down

0 comments on commit 32b7896

Please sign in to comment.