Example #1
0
function userpro_profile_icons_noargs($user_id, $wrapper = null)
{
    global $userpro;
    $res = null;
    foreach (userpro_fields_group_by_template('social', 'default') as $key => $array) {
        $icon = $userpro->field_icon($key);
        if (userpro_profile_data($key, $user_id) && userpro_field_is_viewable_noargs($key, $user_id) && $icon) {
            $res .= '<a href="' . userpro_link_filter(userpro_profile_data($key, $user_id), $key) . '" class="userpro-profile-icon userpro-tip" title="' . $array['label'] . '" target="_blank" ><i class="userpro-icon-' . $icon . '"></i></a>';
        }
    }
    if ($res) {
        if ($wrapper) {
            echo '<div class="' . $wrapper . '">';
        }
        echo $res;
        if ($wrapper) {
            echo '</div>';
        }
    }
}
Example #2
0
File: api.php Project: Darciro/PPM
    function print_field($field, $user_id)
    {
        global $userpro;
        if ($this->field_value($field, $user_id) != '' && userpro_field_is_viewable_noargs($field, $user_id)) {
            ?>
		
		<div class="emd-user-column">
		<div class="emd-user-left"><?php 
            echo $userpro->field_label($field);
            ?>
</div>
		<div class="emd-user-right"><strong><?php 
            echo $this->field_value($field, $user_id);
            ?>
</strong></div>
		<div class="userpro-clear"></div>
		</div>
		
		<?php 
        }
    }
Example #3
0
File: api.php Project: Darciro/PPM
 function meta_fields($fields, $user_id)
 {
     $res = '';
     $arr = explode(',', $fields);
     foreach ($arr as $k) {
         if (!userpro_field_is_viewable_noargs($k, $user_id)) {
             continue;
         }
         if (get_user_meta($user_id, $k, true) != '') {
             $values[] = $k;
         }
     }
     if (isset($values) && is_array($values)) {
         $n = 1;
         foreach ($values as $n => $k) {
             $n++;
             if ($n == count($values)) {
                 $res .= userpro_profile_data_nicename($k, userpro_profile_data($k, $user_id));
             } else {
                 $res .= userpro_profile_data_nicename($k, userpro_profile_data($k, $user_id)) . "&nbsp;&nbsp;/&nbsp;&nbsp;";
             }
         }
     }
     if (!$res) {
         $res = __('No available information', 'userpro');
     }
     return $res;
 }