rkvr_rate_display

Description

This filter allows for more detailed placement of ratings, usually when targeting specific taxonomies.

Usage

Function to exclude display on “my tag”

function rk_exclude_tag( $display ) {

	if ( is_tag( 'my-tag' ) )
		$display = false;

	return $display;
}
add_filter('rkvr_rate_display', 'rk_exclude_tag');

Function to exclude display on all tags

function rk_exclude_all_tags( $display ) {

	if ( is_tag() )
		$display = false;

	return $display;
}
add_filter('rkvr_rate_display', 'rk_exclude_all_tags');

Function to display on just “my tag”

function rk_include_tag( $display ) {

	if ( ! is_tag( 'my-tag' ) )
		$display = false;

	return $display;
}
add_filter('rkvr_rate_display', 'rk_include_tag');

Function to display for just logged in users

function rk_login_only( $display ) {

	if ( !is_user_logged_in() )
		return false;

	return $display;
}
add_filter('rkvr_rate_display', 'rk_login_only');