is_search && !$query->is_page && !$query->is_archive) { $oldset = $query->get('cat'); $is_member = ''; if (!empty($oldset)) { $excludeset = $oldset.',-'.$members_post_category; } else { $excludeset = '-'.$members_post_category; } if ( !empty($current_user->ID) ) { $is_member = get_usermeta($current_user->ID,'comicpress-is-member'); } if ($is_member != 'yes' || empty($is_member)) { $query->set('cat',$excludeset); } } return $query; } function shortcode_for_comicpress_members_only( $atts, $content = null ) { global $post, $userdata, $profileuser, $current_user, $errormsg; $returninfo = '

'.__('There is Members Only content here.
To view this content you need to be a member of this site.','comicpress').'

'; if ( !empty($current_user->ID) ) { $is_member = get_usermeta($current_user->ID,'comicpress-is-member'); if ($is_member == 'yes' || current_user_can('publish_posts')) { $content = str_replace('

', '', $content); $content = str_replace('

', '', $content); $returninfo = "
\r\n

$content

\r\n
\r\n"; } } return $returninfo; } function comicpress_profile_members_only() { global $profileuser, $current_user, $errormsg; $comicpress_is_member = get_usermeta($profileuser->ID,'comicpress-is-member'); if (empty($comicpress_is_member)) $comicpress_is_member = 'no'; ?>

  
ID))) > 0); } function comicpress_is_member() { global $user_ID; if (!empty($user_ID)) { $is_member = get_usermeta($user_ID,'comicpress-is-member'); if ($is_member == 'yes' || current_user_can('publish_posts')) { return true; } } return false; } ?>