Skip to content
Snippets Groups Projects
Commit 29027616 authored by Maximilian Giller's avatar Maximilian Giller
Browse files

Fixed incorrect handle for 3d graph

parent d5f4daff
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,7 @@ function ks_add_graph($atts = []): string
$script_path = 'build' . DIRECTORY_SEPARATOR . $GLOBALS['build'] . DIRECTORY_SEPARATOR . 'graph.js';
wp_enqueue_script("ks-display-js", plugins_url($script_path, __FILE__), array('jquery'), false);
ks_localize();
ks_localize("ks-display-js");
return $div;
}
......@@ -25,12 +25,12 @@ function ks_echo_graph($atts = []): void
echo ks_add_graph($atts);
}
function ks_localize()
function ks_localize($handle)
{
$space_id = kg_get_space_id_from_atts($atts);
$plugin_dir = plugin_dir_url(__FILE__);
wp_localize_script(
'ks-editor-js',
$handle,
'ks_global',
array(
'ajax_url' => admin_url('admin-ajax.php'),
......@@ -43,7 +43,7 @@ function ks_localize()
function ks_add_editor($atts = [])
{
ks_add_editor_dependencies();
ks_localize();
ks_localize("ks-editor-js");
require_once(__DIR__ . '/editor/editor.php');
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment