From 8c1ffd9ddd9f3bb8026fe0af3fbba957bdd5b647 Mon Sep 17 00:00:00 2001 From: pglewis Date: Fri, 13 Jul 2018 16:41:05 -0400 Subject: [PATCH] Declare dependencies for jointjs, fixes #19 --- class-pods-visualize.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/class-pods-visualize.php b/class-pods-visualize.php index 72969e5..c7a0ad1 100644 --- a/class-pods-visualize.php +++ b/class-pods-visualize.php @@ -150,7 +150,7 @@ public function enqueue_admin_scripts() { $screen = get_current_screen(); if ( $this->plugin_screen_hook_suffix == $screen->id && function_exists( 'pods' ) ) { - wp_enqueue_script( 'jointjs', PODS_VISUALIZE_URL . 'includes/jointjs/joint.min.js' ); + wp_enqueue_script( 'jointjs', PODS_VISUALIZE_URL . 'includes/jointjs/joint.min.js', array( 'jquery', 'backbone', 'underscore' ) ); wp_enqueue_script( 'jointjs-pods', PODS_VISUALIZE_URL . 'includes/js/jointjs-pods.js', array( 'jquery', 'jointjs' ), Pods_Visualize::VERSION ); wp_enqueue_script( $this->plugin_slug . '-admin-script', PODS_VISUALIZE_URL . 'includes/js/pods-visualize.js', array( 'jquery', 'jointjs' ), Pods_Visualize::VERSION ); @@ -227,7 +227,7 @@ private function get_data() { $related_pod_name = $check[ 'pod' ][ 'name' ]; } else { - + $related_pod_name = $check[ 'object_name' ]; } }