2012-05-14, 22:33:53
Rene Wrote:Search result is showing content from protected pages by plugin 'Front-End User Login'.
So i've add the following filter to an existing custom plugin: add_filter('search-veto','show_result');
But now I'm stuck: what to check for in the 'show_result' function? Must I read the XML again or is this fields already in a var? The XML in protected page is:
<memberonly><![CDATA[yes]]></memberonly>
Try the following:
Code:
function show_result($item) {
$memberonly = (string) $item->memberonly;
return $memberonly == 'yes';
}