From: Anthony Talarico Date: Mon, 22 Aug 2016 15:24:30 +0000 (-0400) Subject: removed shortcodes from post content in the dropdown hover map X-Git-Tag: v1.0.0^2~102 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=40ee0b5b1ad877e58c7b6365964940a852b086dc;p=WP-Themes%2Fpetoskeyarea.git removed shortcodes from post content in the dropdown hover map --- diff --git a/css/app.css b/css/app.css index 49fd7d3..07b4ce8 100644 --- a/css/app.css +++ b/css/app.css @@ -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 { diff --git a/parts/community-map.php b/parts/community-map.php index 0c074ad..eea29d6 100644 --- a/parts/community-map.php +++ b/parts/community-map.php @@ -7,8 +7,11 @@
- - post_content),0, 300)); ?> + + + post_content),0, 300); ?> + +

@@ -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 '
', print_r($sites) , '
'; @@ -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('post_title; ?>'); - regionData.find(".map-image-container").css("height","200px").css("width", "300px").css("background", "url(' ')no-repeat center center").css("background-position", "cover"); + regionData.find(".map-image-container").css("height","175px").css("width", "300px").css("background", "url(' ')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 () { diff --git a/scss/_topbar.scss b/scss/_topbar.scss index 62eb6dd..3790e47 100644 --- a/scss/_topbar.scss +++ b/scss/_topbar.scss @@ -249,7 +249,7 @@ text-align: left; height: auto; padding-left: 5px; - line-height: 1.4; + line-height: 1.2; } .map-page-link { display: inline-block;