From 59fdea3d5a7385d06327a81c0c8fecc964d48a07 Mon Sep 17 00:00:00 2001 From: eduardohumberto Date: Wed, 21 Mar 2018 14:11:24 -0300 Subject: [PATCH] insert repository maps on javascript wordpress object --- src/admin/class-tainacan-admin.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/admin/class-tainacan-admin.php b/src/admin/class-tainacan-admin.php index 6e587f738..c8c46faa7 100644 --- a/src/admin/class-tainacan-admin.php +++ b/src/admin/class-tainacan-admin.php @@ -126,7 +126,14 @@ class Admin { 'user_prefs' => $prefs, 'base_url' => $TAINACAN_BASE_URL ]; - + + $settings['maps'] = [ + 'collections' => $Tainacan_Collections->get_map(), + 'fields' => $Tainacan_Fields->get_map(), + 'filters' => $Tainacan_Filters->get_map(), + 'items' => $Tainacan_Items->get_map(), + 'taxonomies' => $Tainacan_Taxonomies->get_map(), + ]; wp_localize_script( 'tainacan-user-admin', 'tainacan_plugin', $settings );