当前位置: 首页>>代码示例>>PHP>>正文


PHP bp_get_profile_field_data函数代码示例

本文整理汇总了PHP中bp_get_profile_field_data函数的典型用法代码示例。如果您正苦于以下问题:PHP bp_get_profile_field_data函数的具体用法?PHP bp_get_profile_field_data怎么用?PHP bp_get_profile_field_data使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了bp_get_profile_field_data函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get_profile_outputs

 /**
  * @param $display_extra
  * @param $user
  *
  * @return string
  */
 public static function get_profile_outputs($display_extra, $user)
 {
     $out = '';
     foreach ($display_extra as $name) {
         $args = array('field' => str_replace('_', ' ', str_replace('bp_', '', $name)), 'user_id' => $user->user_id);
         //   $out .=   bp_get_profile_field_data( $args  );
         $profile_field_data = bp_get_profile_field_data($args);
         $css = false == $profile_field_data ? $name . ' aa_missing' : $name;
         $out .= sprintf(apply_filters('aa_user_display_extra_template', '<div class="extra %s">%s</div>', $args, $profile_field_data), $css, $profile_field_data);
         //$out .=  '<div class="extra '. $name . '">' . $profile_field_data . '</div>';
     }
     return $out;
 }
开发者ID:kosir,项目名称:thatcamp-org,代码行数:19,代码来源:BuddyPressSupport.class.php

示例2: bppp_get_user_progression_for_field

function bppp_get_user_progression_for_field()
{
    //get current item
    $point_item = BuddyPress_Profile_Progression()->query->point;
    $field_id = $point_item['args']['field-id'];
    if (!$field_id) {
        return false;
    }
    //get field value
    $user_id = bppp_get_user_id($user_id);
    $value = bp_get_profile_field_data(array('field' => $field_id, 'user_id' => $user_id));
    return (bool) $value;
    //return TRUE
}
开发者ID:NitinPrakash,项目名称:buddypress-force-profile-completion,代码行数:14,代码来源:buddypress_force_profile_completion_fields_points.php

示例3: post_love_display

function post_love_display($content)
{
    $love_text = '';
    if (bp_loggedin_user_id()) {
        $love = bp_get_profile_field_data('field=handshake&user_id=' . bp_loggedin_user_id());
        $lovemaking = explode(',', $love);
        $love = empty($love) ? 0 : $love;
        if (in_array(bp_displayed_user_id(), $lovemaking)) {
            $past_wink_class = ' ok';
            $past_wink = 'ed';
        } else {
            $past_wink_class = '';
            $past_wink = '';
        }
        echo '<div class="generic-button' . $past_wink_class . '" id="love-count-' . bp_displayed_user_id() . '" >';
        echo '<a class="wink-button" href="' . admin_url('admin-ajax.php?action=post_love_add_love&user_id=' . bp_loggedin_user_id() . '&matchid=' . bp_displayed_user_id()) . '" data-id="' . bp_loggedin_user_id() . '" data-matchid="' . bp_displayed_user_id() . '">Court<span>' . $past_wink . '</span></a>';
        echo '</div>';
    }
}
开发者ID:abegit,项目名称:harmony,代码行数:19,代码来源:plugin.php

示例4: wplms_coauthor_plus_instructor

 function wplms_coauthor_plus_instructor($instructor, $id)
 {
     if (function_exists('get_coauthors')) {
         $coauthors = get_coauthors($id);
         $instructor = '';
         foreach ($coauthors as $k => $inst) {
             $instructor_id = $inst->ID;
             $displayname = bp_core_get_user_displayname($instructor_id);
             if (function_exists('vibe_get_option')) {
                 $field = vibe_get_option('instructor_field');
             }
             $special = '';
             if (bp_is_active('xprofile')) {
                 $special = bp_get_profile_field_data('field=' . $field . '&user_id=' . $instructor_id);
             }
             $r = array('item_id' => $instructor_id, 'object' => 'user');
             $instructor .= '<div class="instructor_course"><div class="item-avatar">' . bp_core_fetch_avatar($r) . '</div>';
             $instructor .= '<h5 class="course_instructor"><a href="' . bp_core_get_user_domain($instructor_id) . '">' . $displayname . '<span>' . $special . '</span></a></h5>';
             $instructor .= apply_filters('wplms_instructor_meta', '', $instructor_id);
             $instructor .= '</div>';
         }
     }
     return $instructor;
 }
开发者ID:nikitansk,项目名称:devschool,代码行数:24,代码来源:wplms-coauthor-plus.php

示例5: _get_user_address

 /**
  * Maps users ID to actual address by querying
  * the address xprofile field.
  */
 private function _get_user_address($user_id)
 {
     if (!function_exists('bp_get_profile_field_data')) {
         return false;
     }
     $address_field = $this->_get_options('address_field');
     if (!$address_field) {
         return false;
     }
     $address = bp_get_profile_field_data(array('field' => $address_field, 'user_id' => $user_id));
     // Allows using multiple Xprofile fields for address construction.
     $address = apply_filters('agm_google_maps-bp_profile_map-user_address', $address, $user_id);
     return $address ? $address : false;
 }
开发者ID:danaiser,项目名称:hollandLawns,代码行数:18,代码来源:agm-bp-profile_maps.php

示例6: do_action

</span>

	<?php 
do_action('bp_before_member_header_meta');
?>

	<div id="item-meta">

		<?php 
if (bp_is_active('activity')) {
    ?>

			<div id="latest-update">
				<?php 
    if (bp_is_active('xprofile')) {
        $bio = bp_get_profile_field_data(array('user_id' => bp_displayed_user_id(), 'field' => 5));
        echo $bio;
    }
    ?>
			</div>

		<?php 
}
?>

		<div id="item-buttons">

			<?php 
do_action('bp_member_header_actions');
?>
开发者ID:samoakley,项目名称:labtheme,代码行数:30,代码来源:member-header.php

示例7: widget

 /** @see WP_Widget::widget */
 public function widget($args, $instance)
 {
     extract($args);
     if (!isset($instance['title'])) {
         $instance = array('title' => '', 'tw_show_follow' => FALSE, 'tw_show_type' => 0, 'tw_screen_name' => '', 'tw_include_rts' => FALSE, 'tw_exclude_replies' => FALSE, 'tw_tweet_count' => 5, 'tw_rotation_type' => 'scrollUp', 'tw_official_format' => FALSE, 'tw_hide_meta_timestamp' => FALSE, 'tw_hide_meta_screen_name' => FALSE, 'tw_hide_meta_via' => FALSE, 'tw_show_meta_reply_retweet_favorite' => FALSE);
     }
     $title = apply_filters('widget_title', $instance['title']);
     $positive_variables = array('screen_name', 'shorten_links', 'include_rts', 'exclude_replies', 'links_in_new_window', 'tweet_count', 'show_follow', 'timeout', 'rotation_type', 'show_meta_reply_retweet_favorite', 'official_format', 'show_type', 'list_tag', 'search');
     $newargs['displaytype'] = 'widget';
     $newargs['w3tc_render_to'] = $args['widget_id'];
     foreach ($positive_variables as $var) {
         if (isset($instance['tw_' . $var])) {
             $newargs[$var] = $instance['tw_' . $var];
         }
     }
     $negative_variables = array('meta_timestamp', 'meta_screen_name', 'meta_via');
     foreach ($negative_variables as $var) {
         if (isset($instance['tw_hide_' . $var])) {
             $newargs['show_' . $var] = !$instance['tw_hide_' . $var];
         }
     }
     switch ($newargs['show_follow']) {
         case 2:
             $newargs['no_show_count'] = TRUE;
             $newargs['no_show_screen_name'] = FALSE;
             break;
         case 3:
             $newargs['no_show_count'] = FALSE;
             $newargs['no_show_screen_name'] = TRUE;
             break;
         case 4:
             $newargs['no_show_count'] = TRUE;
             $newargs['no_show_screen_name'] = TRUE;
             break;
         default:
             $newargs['no_show_count'] = FALSE;
             $newargs['no_show_screen_name'] = FALSE;
             break;
     }
     if (empty($newargs['timeout'])) {
         $newargs['timeout'] = 4000;
     }
     $newargs['text_cache_id'] = "rt-wg-" . md5(serialize($newargs));
     $rt_tweet_string = rotatingtweets_get_transient($newargs['text_cache_id']);
     echo $before_widget;
     if ($title) {
         echo $before_title . $title . $after_title;
     }
     if (empty($rt_tweet_string)) {
         switch ($newargs['show_type']) {
             // Favourites
             case 1:
                 $tweets = rotatingtweets_get_tweets($newargs['screen_name'], $newargs['include_rts'], $newargs['exclude_replies'], true);
                 break;
                 // Search
             // Search
             case 2:
                 $tweets = rotatingtweets_get_tweets($newargs['screen_name'], $newargs['include_rts'], $newargs['exclude_replies'], false, $newargs['search']);
                 //				$newargs['screen_name'] = '';   // Originally put in to avoid confusion when people have a 'follow' button and a search tweet
                 break;
                 // List
             // List
             case 3:
                 $tweets = rotatingtweets_get_tweets($newargs['screen_name'], $newargs['include_rts'], $newargs['exclude_replies'], false, false, $newargs['list_tag']);
                 break;
                 // Buddypress
             // Buddypress
             case 4:
                 if (function_exists('bp_displayed_user_id')) {
                     global $bp;
                     $rt_buddyid = bp_displayed_user_id();
                     $rt_buddyargs = array('field' => 'Twitter', 'user_id' => $rt_buddyid);
                     print_r($rt_buddyargs);
                     $rt_buddytwitter = bp_get_profile_field_data($rt_buddyargs);
                     $tweets = rotatingtweets_get_tweets($rt_buddytwitter, $newargs['include_rts'], $newargs['exclude_replies']);
                     break;
                 }
                 // User name
             // User name
             case 0:
             default:
                 $tweets = rotatingtweets_get_tweets($newargs['screen_name'], $newargs['include_rts'], $newargs['exclude_replies']);
                 break;
         }
         if ($tweets) {
             $rt_tweet_string = rotating_tweets_display($tweets, $newargs, false);
         }
     } elseif (WP_DEBUG) {
         $rt_tweet_string .= "<!-- Transient " . $newargs['text_cache_id'] . " loaded -->";
     }
     echo $rt_tweet_string . $after_widget;
 }
开发者ID:andersonaguiaralves,项目名称:meiotomloja,代码行数:93,代码来源:rotatingtweets.php

示例8: bp_get_displayed_user_fullname

                    <div class="basic">
                        <h1><?php 
echo bp_get_displayed_user_fullname();
?>
</h1><span class="sep"><?php 
_e(', ', 'social-learner');
?>
</span>
                        <h2 class="user-nicename">@<?php 
bp_displayed_user_username();
?>
</h2>
						<?php 
$address_field = boss_get_option('boss_misc_profile_field_address');
if ($address_field) {
    $address = bp_get_profile_field_data(array('field' => $address_field));
    if ($address) {
        if (is_array($address)) {
            ?>
                                <span class="location"><?php 
            echo join(', ', $address);
            ?>
</span>
                                <?php 
        } else {
            ?>
								<span class="location"><?php 
            echo stripslashes($address);
            ?>
</span>
								<?php 
开发者ID:Ezyva2015,项目名称:opendooronline.com.au,代码行数:31,代码来源:member-header.php

示例9: setTimeout

                                                                  setTimeout(function(){
                                                                	  hypercommentsAPI.initById(<?php 
                echo $hypercomments_id;
                ?>
);
                                                                  }, 10);                                                        
                                                              } else{
                                                            	  hypercommentsAPI.initById(<?php 
                echo $hypercomments_id;
                ?>
);
                                                              }
                                                        	</script>
                                                <?php 
            } else {
                $cityName = bp_get_profile_field_data(array('field' => 'Город', 'user_id' => $current_user->ID));
                $defaultChatParam = '&label=rt.kbb1.com.' . $course_space . '&name_text=' . $current_user->display_name . '&from_text=' . $cityName;
                echo '<iframe src="https://chat1.kbb1.com/?lang=ru' . $defaultChatParam . '"></iframe>';
            }
            ?>
                                                </div>
                                                <div id="tabiid2" class="tab-content" style="display: none;">
                                                    <div class="bx-controls-direction"><a id="bx-prev" href=""></a><a
                                                            id="bx-next" href=""></a></div>
                                                    <ul id="tabiid2slide">
                                                        <?php 
            echo do_shortcode(get_post_meta($course_id, 'materials', true));
            ?>
                                                    </ul>
                                                    <script>
                                                        (function ($) {
开发者ID:Bnei-Baruch,项目名称:kabacademy,代码行数:31,代码来源:single-namaste_course.php

示例10: fetch_assignment_submissions

 function fetch_assignment_submissions()
 {
     if (!isset($_POST['security']) || !wp_verify_nonce($_POST['security'], 'assignment_submissions')) {
         _e('Security check Failed. Contact Administrator.', 'vibe');
         die;
     }
     $assignments_id = $_POST['assignment_id'];
     print_r($assignment_id);
     global $wpdb;
     foreach ($assignments_id as $assignment_id) {
         if ($_POST['status'] == 1) {
             $assignment_submissions[] = $wpdb->get_results($wpdb->prepare("SELECT meta_key,post_id FROM {$wpdb->postmeta} WHERE meta_value > '0' && post_id = %d", $assignment_id), ARRAY_A);
             // Internal Query
         } else {
             $assignment_submissions[] = $wpdb->get_results($wpdb->prepare("SELECT meta_key,post_id FROM {$wpdb->postmeta} WHERE meta_value = '0' && post_id = %d", $assignment_id), ARRAY_A);
             // Internal Query
         }
     }
     if ($assignment_submissions) {
         echo '<ul class="assignment_students">';
         foreach ($assignment_submissions as $assignmentar_submission) {
             foreach ($assignmentar_submission as $assignment_submission) {
                 if (is_numeric($assignment_submission['meta_key'])) {
                     $member_id = $assignment_submission['meta_key'];
                     $assignment_id = $assignment_submission['post_id'];
                     $bp_name = bp_core_get_userlink($member_id);
                     if (!isset($student_field)) {
                         $student_field = 'Location';
                     }
                     $profile_data = 'field=' . $student_field . '&user_id=' . $member_id;
                     $bp_location = '';
                     if (bp_is_active('xprofile')) {
                         $bp_location = bp_get_profile_field_data($profile_data);
                     }
                     echo '<li id="as' . $member_id . '">';
                     echo get_avatar($member_id);
                     echo '<h6>' . $bp_name . '</h6>';
                     echo '<h7>' . get_the_title($assignment_id) . '</h7>';
                     echo '<span>';
                     if ($bp_location) {
                         echo $bp_location;
                     }
                     do_action('wplms_assignment_submission_meta', $member_id, $assignment_id);
                     echo '</span>';
                     // PENDING AJAX SUBMISSIONS
                     echo '<ul> 
                     <li><a class="tip reset_assignment_user" data-assignment="' . $assignment_id . '" data-user="' . $member_id . '" title="' . __('Reset Assignment for User', 'vibe') . '"><i class="icon-reload"></i></a></li>
                     <li><a class="tip evaluate_assignment_user" data-assignment="' . $assignment_id . '" data-user="' . $member_id . '" title="' . __('Evaluate Assignment : ', 'vibe') . get_the_title($assignment_id) . '"><i class="icon-check-clipboard-1"></i></a></li>
                   </ul>';
                     echo '</li>';
                 }
             }
         }
         echo '</ul>';
     }
     wp_nonce_field('vibe_assignment', 'asecurity');
     die;
 }
开发者ID:nikitansk,项目名称:devschool,代码行数:58,代码来源:assignments.php

示例11: amt_bp_get_profile_field_data

function amt_bp_get_profile_field_data($internal_profile_property, $user_id, $xprofile_field_map, $xprofile_public_fields)
{
    foreach ($xprofile_field_map[$internal_profile_property] as $field_name) {
        $field_value = bp_get_profile_field_data(array('field' => $field_name, 'user_id' => $user_id));
        // profile_group_id
        if (!empty($field_value) && in_array(xprofile_get_field_id_from_name($field_name), $xprofile_public_fields)) {
            return $field_value;
        }
    }
    return '';
}
开发者ID:ashenkar,项目名称:sanga,代码行数:11,代码来源:amt-utils.php

示例12: bp_course_get_students_undertaking

</h3>
<?php 
$students_undertaking = bp_course_get_students_undertaking();
//vibe_sanitize(get_post_meta(get_the_ID(),'vibe_students_undertaking',false));
if (count($students_undertaking) > 0) {
    echo '<ul class="course_students">';
    foreach ($students_undertaking as $student) {
        if (function_exists('bp_get_profile_field_data')) {
            $bp_name = bp_core_get_userlink($student);
            $sfield = vibe_get_option('student_field');
            if (!isset($sfield) || $sfield == '') {
                $sfield = 'Location';
            }
            $bp_location = '';
            if (bp_is_active('xprofile')) {
                $bp_location = bp_get_profile_field_data('field=' . $sfield . '&user_id=' . $student);
            }
            if ($bp_name) {
                echo '<li>';
                echo get_avatar($student);
                echo '<h6>' . $bp_name . '</h6>';
                if ($bp_location) {
                    echo '<span>' . $bp_location . '</span>';
                }
                echo '</li>';
            }
        }
    }
    echo '</ul>';
    echo bp_course_paginate_students_undertaking();
}
开发者ID:akshayxhtmljunkies,项目名称:brownglock,代码行数:31,代码来源:members.php

示例13: bp_core_get_user_domain

						<a href="<?php 
            echo bp_core_get_user_domain($instructor_id);
            ?>
"><?php 
            echo $displayname;
            ?>
<span><?php 
            echo $special;
            ?>
</span></a>
						</h5>
						<?php 
            echo apply_filters('wplms_instructor_meta', '', $instructor_id);
            $instructor_about = vibe_get_option('instructor_about');
            if (bp_is_active('xprofile')) {
                $data = apply_filters('the_content', bp_get_profile_field_data('field=' . $instructor_about . '&user_id=' . $instructor_id));
                echo '<div class="instructor_more">' . $data . '<a class="more_description link" data-default="' . __('Show Less', 'wplms_modern') . '">' . __('Show More', 'wplms_modern') . '</a></div>';
            }
            ?>
					</div>
						<?php 
        }
        the_course_details();
        ?>
				</div>
				<div class="students_undertaking">
					<?php 
        $students_undertaking = $vibe->get_students_undertaking(array('number' => 9));
        $students = get_post_meta(get_the_ID(), 'vibe_students', true);
        echo '<strong>' . $students . __(' STUDENTS ENROLLED', 'wplms_modern') . '</strong>';
        echo '<ul>';
开发者ID:nikitansk,项目名称:devschool,代码行数:31,代码来源:single-course.php

示例14: vibe_certificate_student_field

 function vibe_certificate_student_field($atts, $content = null)
 {
     extract(shortcode_atts(array('field' => ''), $atts));
     $uid = $_GET['u'];
     if (isset($uid) && is_numeric($uid) && isset($field) && strlen($field) > 3) {
         return bp_get_profile_field_data('field=' . $field . '&user_id=' . $uid);
     } else {
         return '[certificate_student_field]';
     }
 }
开发者ID:akshayxhtmljunkies,项目名称:brownglock,代码行数:10,代码来源:shortcodes.php

示例15: vibe_get_option

        if ($role == 'student') {
            $field = vibe_get_option('student_field');
            if (!isset($field) || $field == '') {
                $field = 'Location';
            }
            if (bp_is_active('xprofile')) {
                echo '<span>' . bp_get_profile_field_data(array('user_id' => $user_id, 'field' => $field)) . '</span>';
            }
        } else {
            if ($role == 'instructor') {
                $field = vibe_get_option('instructor_field');
                if (!isset($field) || $field == '') {
                    $field = 'Expertise';
                }
                if (bp_is_active('xprofile')) {
                    echo '<span>' . bp_get_profile_field_data(array('user_id' => $user_id, 'field' => $field)) . '</span>';
                }
            }
        }
        $members_activity = vibe_get_option('members_activity');
        if (isset($members_activity) && $members_activity) {
            ?>
					<?php 
            if (bp_get_member_latest_update()) {
                ?>

						<span class="update"> <?php 
                bp_member_latest_update();
                ?>
</span>
开发者ID:nikitansk,项目名称:devschool,代码行数:30,代码来源:members-loop.php


注:本文中的bp_get_profile_field_data函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。