Tag Archives: relevanssi_post_ok

bbP Private Groups support

Private Groups is a plugin that makes bbPress forum groups private. Relevanssi, however, doesn’t understand that privacy and will show those groups in the search results. Relevanssi has means to support this, however, with the help of the relevanssi_post_ok filter. Here’s some code from Mark Wass that makes the private forum posts private in search. […]

Indexing custom post statuses

If you’re using custom post statuses, Relevanssi requires some tinkering. By default, Relevanssi only handles posts that are of status publish, pending, draft or private. Relevanssi has a filter that lets you add more statuses to the list of acceptable statuses for Relevanssi: function rlv_add_status($status_array) { $status_array[] = "new_status"; return $status_array; } add_filter(’relevanssi_valid_status’, ‘rlv_add_status’); add_filter(’relevanssi_valid_admin_status’, […]

Membermouse support for Relevanssi

If you’re using MemberMouse to manage memberships on your site, having Relevanssi co-operate with MemberMouse is easy. Just add the following code to your theme functions.php and your protected content will not be displayed to users without access to the content: add_filter(’relevanssi_post_ok’, ‘membermouse_relevanssi_ok’, 20, 2); function membermouse_relevanssi_ok($post_ok, $doc) { if (function_exists(’mm_access_decision’)) { $post_ok = mm_access_decision(array("id"=>$doc, […]

Relevanssi_post_ok filter

Versions 2.9.8 (free) and 1.5.13 (premium) added a new filter, relevanssi_post_ok, which can be used to add support for membership plugins where there is a need to restrict certain posts from certain users. By default, this filter calls relevanssi_default_post_ok(), which has built-in support for private posts, Role-Scoper and s2member. Add your own function, if you […]