/** * Handle the additional Rublon columns for a given user * * @param mixed $value Current column value * @param string $column_name Column name * @param int $user_id User's ID * @return string */ function rublon2factor_manage_rublon_columns($value, $column_name, $user_id) { if (RublonHelper::isSiteRegistered()) { // Retrieve Rublon users from prerender data. $rublon_mobile_users = RublonHelper::getPrerenderData(RublonHelper::PRERENDER_KEY_MOBILE_USERS); if ($column_name == 'rublon2factor_status') { $user = get_user_by('id', $user_id); $protectionType = array(RublonHelper::roleProtectionType($user), RublonHelper::userProtectionType($user)); if (RublonHelper::isPersonalEdition() && RublonHelper::isProjectOwner($user_id) || RublonFeature::isBusinessEdition() && RublonRolesProtection::isGrater(RublonHelper::getUserProtectionType($user), RublonHelper::PROTECTION_TYPE_NONE)) { $lang = RublonHelper::getBlogLanguage(); $value = sprintf('<a href="%s"', RublonHelper::rubloncomUrl()) . ' target="_blank"><img class="rublon-protected rublon-image" src="' . RUBLON2FACTOR_PLUGIN_URL . '/assets/images/rublon_logo_32x32.png' . '" title="' . __('Account protected by Rublon', 'rublon') . '" /></a>'; } } return $value; } }