{"id":973043,"date":"2015-06-25T16:41:16","date_gmt":"2015-06-25T23:41:16","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-embedded-map-js-url-to-theme-folder\/"},"modified":"2015-07-13T14:21:06","modified_gmt":"2015-07-13T21:21:06","slug":"change-embedded-map-js-url-to-theme-folder","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-embedded-map-js-url-to-theme-folder\/","title":{"rendered":"Change embedded-map.js URL to theme folder"},"content":{"rendered":"<p>Hi, I&#8217;m trying to change the js file on the single events page that appears when tribe_get_embedded_map(); is echoed. <\/p>\n<p>&lt;script src=&#8221;\/app\/plugins\/the-events-calendar\/resources\/embedded-map.js&#8221;&gt;&lt;\/script&gt;<\/p>\n<p>I would like to change the url to one that is inside of my theme folder.<br \/>\n&lt;script src=&#8221;\/app\/themes\/mywebsite\/assets\/scripts\/embedded-map.js&#8221;&gt;&lt;\/script&gt;<\/p>\n<p>I found this inside of the Embedded_Maps.php in the src\/Tribe folder. <\/p>\n<pre><code>\tprotected function enqueue_map_scripts() {\n\t\t\/\/ Setup Google Maps API\n\t\t$url = apply_filters( &#039;tribe_events_google_maps_api&#039;, &#039;\/\/maps.googleapis.com\/maps\/api\/js&#039; );\n\t\twp_enqueue_script( &#039;tribe_events_google_maps_api&#039;, $url, array(), false, true );\n\n\t\t\/\/ Setup our own script used to initialize each map\n\t\t$url = Tribe__Events__Template_Factory::getMinFile( tribe_events_resource_url( &#039;embedded-map.js&#039; ), true );\n\t\twp_enqueue_script( self::MAP_HANDLE, $url, array( &#039;tribe_events_google_maps_api&#039; ), false, true );\n\n\t\t$this-&gt;map_script_enqueued = true;\n\t}<\/code><\/pre>\n<p>I have creaeted this function, but it adds a &#8216;\/wp\/&#8217; before my link<\/p>\n<pre><code>add_action( &#039;wp_enqueue_scripts&#039;, &#039;replace_embedded_maps_js&#039; );\nfunction replace_embedded_maps_js(){\n  $url = apply_filters( &#039;tribe_events_google_maps_api&#039;, &#039;\/app\/themes\/mysite\/assets\/scripts\/embedded-map.js&#039; );\n  wp_enqueue_script( &#039;tribe_events_embedded_map&#039;, $url, array(&#039;tribe_events_google_maps_api&#039;), [], null, true ); \n}\n<\/code><\/pre>\n","protected":false},"template":"","class_list":["post-973043","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Change embedded-map.js URL to theme folder -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-embedded-map-js-url-to-theme-folder\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Change embedded-map.js URL to theme folder -\" \/>\n<meta property=\"og:description\" content=\"Hi, I&#8217;m trying to change the js file on the single events page that appears when tribe_get_embedded_map(); is echoed. &lt;script src=&#8221;\/app\/plugins\/the-events-calendar\/resources\/embedded-map.js&#8221;&gt;&lt;\/script&gt; I would like to change the url to one that is inside of my theme folder. &lt;script src=&#8221;\/app\/themes\/mywebsite\/assets\/scripts\/embedded-map.js&#8221;&gt;&lt;\/script&gt; I found this inside of the Embedded_Maps.php in the src\/Tribe folder. protected function enqueue_map_scripts() { \/\/ [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-embedded-map-js-url-to-theme-folder\/\" \/>\n<meta property=\"article:modified_time\" content=\"2015-07-13T21:21:06+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-embedded-map-js-url-to-theme-folder\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-embedded-map-js-url-to-theme-folder\/\",\"name\":\"Change embedded-map.js URL to theme folder -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2015-06-25T23:41:16+00:00\",\"dateModified\":\"2015-07-13T21:21:06+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-embedded-map-js-url-to-theme-folder\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-embedded-map-js-url-to-theme-folder\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-embedded-map-js-url-to-theme-folder\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Calendar Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Events Calendar PRO\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Change embedded-map.js URL to theme folder\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Change embedded-map.js URL to theme folder -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-embedded-map-js-url-to-theme-folder\/","og_locale":"en_US","og_type":"article","og_title":"Change embedded-map.js URL to theme folder -","og_description":"Hi, I&#8217;m trying to change the js file on the single events page that appears when tribe_get_embedded_map(); is echoed. &lt;script src=&#8221;\/app\/plugins\/the-events-calendar\/resources\/embedded-map.js&#8221;&gt;&lt;\/script&gt; I would like to change the url to one that is inside of my theme folder. &lt;script src=&#8221;\/app\/themes\/mywebsite\/assets\/scripts\/embedded-map.js&#8221;&gt;&lt;\/script&gt; I found this inside of the Embedded_Maps.php in the src\/Tribe folder. protected function enqueue_map_scripts() { \/\/ [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-embedded-map-js-url-to-theme-folder\/","article_modified_time":"2015-07-13T21:21:06+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-embedded-map-js-url-to-theme-folder\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-embedded-map-js-url-to-theme-folder\/","name":"Change embedded-map.js URL to theme folder -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2015-06-25T23:41:16+00:00","dateModified":"2015-07-13T21:21:06+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-embedded-map-js-url-to-theme-folder\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-embedded-map-js-url-to-theme-folder\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-embedded-map-js-url-to-theme-folder\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Calendar Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/"},{"@type":"ListItem","position":4,"name":"Events Calendar PRO","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/"},{"@type":"ListItem","position":5,"name":"Change embedded-map.js URL to theme folder"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/973043","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/973043\/revisions"}],"predecessor-version":[{"id":973152,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/973043\/revisions\/973152"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=973043"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}