removed shortcodes from post content in the dropdown hover map
authorAnthony Talarico <talarico@gaslightmedia.com>
Mon, 22 Aug 2016 15:24:30 +0000 (11:24 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Mon, 22 Aug 2016 15:24:30 +0000 (11:24 -0400)
css/app.css
parts/community-map.php
scss/_topbar.scss

index 49fd7d3..07b4ce8 100644 (file)
@@ -6505,7 +6505,7 @@ header {
   text-align: left;
   height: auto;
   padding-left: 5px;
-  line-height: 1.4; }
+  line-height: 1.2; }
 #interactive-map .map-page-link {
   display: inline-block; }
 #interactive-map .map-page-title-container {
index 0c074ad..eea29d6 100644 (file)
@@ -7,8 +7,11 @@
             </div>
             <div id="mapRegionData">
             <?php $community_page_object = get_page( 155 ); ?>
-           <?php  $community_page_image = wp_get_attachment_url( get_post_thumbnail_id( 155 )); ?>
-            <?php $community_page_content = json_encode(substr(strip_tags($community_page_object->post_content),0, 300)); ?>
+            <?php  $community_page_image = wp_get_attachment_url( get_post_thumbnail_id( 155 )); ?>
+           
+            <?php $community_page_content = substr(strip_tags($community_page_object->post_content),0, 300); ?>
+            <?php $community_page_content = json_encode(strip_shortcodes($community_page_content)); ?>
+               
                 <a class="map-page-link" href="#"><div class="map-image-container"></div></a>
                 <div class="map-page-title-container"><a class="map-page-link map-title-link" href="#"><h4 class="map-page-title"></h4></a></div>
                 <div class="map-page-content">  </div>
@@ -54,7 +57,12 @@ foreach ($nav_posts as $p){
     $sites[$p->ID]['url'] = get_permalink($p->ID);
     $sites[$p->ID]['title'] = get_the_title($p->ID);
     $sites[$p->ID]['image'] = wp_get_attachment_url( get_post_thumbnail_id($p->ID));
-    $sites[$p->ID]['content'] = substr(strip_tags($page_object->post_content),0, 300) . "...";
+//    $sites[$p->ID]['content'] = substr(strip_tags($page_object->post_content),0, 300) . "...";
+    $filter_content = substr(strip_tags($page_object->post_content),0, 300) . "...";
+    $filter_content = strip_shortcodes($filter_content); 
+    $sites[$p->ID]['content'] = $filter_content; 
+    
+    
 }
     $js_sites = json_encode($sites);
 //echo '<pre>', print_r($sites) , '</pre>';
@@ -75,7 +83,7 @@ foreach ($nav_posts as $p){
         // set the default data next to the dropdown community map
         function set_default_data(){
             regionData.find(".map-page-title").html('<?php echo $community_page_object->post_title; ?>');
-            regionData.find(".map-image-container").css("height","200px").css("width", "300px").css("background", "url('   <?php echo $community_page_image; ?>  ')no-repeat center center").css("background-position", "cover");
+            regionData.find(".map-image-container").css("height","175px").css("width", "300px").css("background", "url('   <?php echo $community_page_image; ?>  ')no-repeat center center").css("background-position", "cover");
             regionData.find(".map-page-content").html(default_content);
         }
         
@@ -101,7 +109,7 @@ foreach ($nav_posts as $p){
             
             regionData.find(".map-page-link").attr("href", site_array[id]['url']);
             regionData.find(".map-page-title").html(site_array[id]['title']);
-            regionData.find(".map-image-container").css("height","200px").css("width", "300px").css("background", "url('" + site_array[id]['image'] + "')no-repeat center center").css("background-position", "cover");
+            regionData.find(".map-image-container").css("height","175px").css("width", "300px").css("background", "url('" + site_array[id]['image'] + "')no-repeat center center").css("background-position", "cover");
             regionData.find(".map-page-content").html(site_array[id]['content']);
 
         }, function () {
index 62eb6dd..3790e47 100644 (file)
         text-align: left;
         height: auto;
         padding-left: 5px;
-        line-height: 1.4;
+        line-height: 1.2;
     }
     .map-page-link {
         display: inline-block;