apply_filters( 'relevanssi_multisite_public_status', bool $public_status, int $blogid )
If this filter returns true
, the multisite site is considered public and available for searching.
Parameters
$public_status
(bool) If true
, this blog is public and can be searched. Default value: the value from get_blog_status( $blogid, 'public' )
.
$blogid
(int) The current subsite ID.
More information
By default Relevanssi requires blogs to be public so they can be searched in the multisite search (single site search doesn’t care about the blog status). If you want results from a non-public blog in the search results, make this filter return true
for that blog.
add_filter( 'relevanssi_multisite_public_status', 'rlv_allow_blog_4', 10, 2 ); function rlv_allow_blog_4( $public, $blogid ) { if ( 4 === $blogid ) { $public = true; } return $public; }
This would make blog ID 4 appear public even if it really isn’t.