From: Laury GvR Date: Mon, 28 Sep 2015 17:39:43 +0000 (-0400) Subject: Undoing content replacement when memberdb shortcode is present X-Git-Tag: v1.0.0^2~74 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=386879eef16fe5eab8a3b2e7834d40032a967bf1;p=WP-Themes%2Fmountpleasantwow.git Undoing content replacement when memberdb shortcode is present --- diff --git a/functions.php b/functions.php index 731cf0b..39a7c70 100644 --- a/functions.php +++ b/functions.php @@ -419,13 +419,28 @@ function mytheme_search_loop() { add_action('thematic_searchloop', 'mytheme_search_loop'); // End of the Contextual/Highlight Search functions -function custom_content($content) { - global $post; - if ($_REQUEST['glm_action'] == "detail" ) { - - } - return $content; -} -add_filter('the_content', 'custom_content'); + +/* This function exists to remove the content from the top of detail pages of + * the GLm MemberDB plugin. + */ +//function custom_content($content) { +// global $post; +// if ($_REQUEST['glm_action'] == "detail" ) { +// if ( preg_match_all( '/'. get_shortcode_regex() .'/s', $post->post_content, $matches ) +// && array_key_exists( 2, $matches ) +// && in_array( 'glm-members-list', $matches[2] ) ) +// { +// $shortcode = $matches[0][0]; +// echo $shortcode; +// $content = do_shortcode($shortcode); +// return $content; +// } else { +// $content=str_replace($matches[0],"",$content); +// return $content; +// } +// } +// return $content; +//} +//add_filter('the_content', 'custom_content'); ?>