本文整理汇总了PHP中bp_get_the_profile_group_name函数的典型用法代码示例。如果您正苦于以下问题:PHP bp_get_the_profile_group_name函数的具体用法?PHP bp_get_the_profile_group_name怎么用?PHP bp_get_the_profile_group_name使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bp_get_the_profile_group_name函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: bp_the_profile_group_edit_form_action
<form action="<?php
bp_the_profile_group_edit_form_action();
?>
" method="post" id="profile-edit-form" class="standard-form <?php
bp_the_profile_group_slug();
?>
">
<?php
/** This action is documented in bp-templates/bp-legacy/buddypress/members/single/profile/profile-wp.php */
do_action('bp_before_profile_field_content');
?>
<h2><?php
printf(__("Editing '%s' Profile Group", 'buddypress'), bp_get_the_profile_group_name());
?>
</h2>
<?php
if (bp_profile_has_multiple_groups()) {
?>
<ul class="button-nav" aria-label="<?php
esc_attr_e('Profile field groups', 'buddypress');
?>
" role="navigation">
<?php
bp_profile_group_tabs();
?>
示例2: bp_the_profile_group_name
function bp_the_profile_group_name()
{
echo bp_get_the_profile_group_name();
}
示例3: register_metaboxes
/**
* Register the xProfile metabox on Community Profile admin page.
*
* @since 2.0.0
*
* @param int $user_id ID of the user being edited.
* @param string $screen_id Screen ID to load the metabox in.
* @param object|null $stats_metabox Context and priority for the stats metabox.
*/
public function register_metaboxes($user_id = 0, $screen_id = '', $stats_metabox = null)
{
// Set the screen ID if none was passed.
if (empty($screen_id)) {
$screen_id = buddypress()->members->admin->user_page;
}
// Setup a new metabox class if none was passed.
if (empty($stats_metabox)) {
$stats_metabox = new StdClass();
}
// Moving the Stats Metabox.
$stats_metabox->context = 'side';
$stats_metabox->priority = 'low';
// Each Group of fields will have his own metabox.
$profile_args = array('fetch_fields' => false, 'user_id' => $user_id);
if (!bp_is_user_spammer($user_id) && bp_has_profile($profile_args)) {
// Loop through field groups and add a metabox for each one.
while (bp_profile_groups()) {
bp_the_profile_group();
add_meta_box('bp_xprofile_user_admin_fields_' . sanitize_key(bp_get_the_profile_group_slug()), esc_html(bp_get_the_profile_group_name()), array($this, 'user_admin_profile_metaboxes'), $screen_id, 'normal', 'core', array('profile_group_id' => absint(bp_get_the_profile_group_id())));
}
// If member is already a spammer, show a generic metabox.
} else {
add_meta_box('bp_xprofile_user_admin_empty_profile', _x('User marked as a spammer', 'xprofile user-admin edit screen', 'buddypress'), array($this, 'user_admin_spammer_metabox'), $screen_id, 'normal', 'core');
}
if (buddypress()->avatar->show_avatars) {
// Avatar Metabox.
add_meta_box('bp_xprofile_user_admin_avatar', _x('Profile Photo', 'xprofile user-admin edit screen', 'buddypress'), array($this, 'user_admin_avatar_metabox'), $screen_id, 'side', 'low');
}
}
示例4: array
?>
</th>
<td>
<input type="password" name="pass2" id="pass2" size="16" value="" autocomplete="off" />
</td>
</tr>
</table>
<?php
$args = array('user_id' => get_current_user_id(), 'hide_empty_fields' => false);
if ($xprofile_active && bp_has_profile($args)) {
while (bp_profile_groups()) {
bp_the_profile_group();
?>
<h4><?php
echo bp_get_the_profile_group_name();
?>
</h4>
<table class="form-table">
<?php
while (bp_profile_fields()) {
bp_the_profile_field();
?>
<?php
/* Setup field classes. */
$bp_classes = array();
$bp_classes[] = 'field_' . bp_get_the_profile_field_id();
$bp_classes[] = 'field_' . sanitize_title(bp_get_the_profile_field_name());
if (bp_get_the_profile_field_is_required()) {
$bp_classes[] = 'bp-field-required';
示例5: while
?>
<?php
while (bp_profile_groups()) {
bp_the_profile_group();
?>
<?php
if (bp_profile_group_has_fields()) {
$str_echo1 = '';
?>
<?php
do_action('bp_before_profile_field_content');
$str_echo1 .= '<div class="bp-widget ' . bp_get_the_profile_group_slug() . '">';
$str_echo1 .= '<h4>' . bp_get_the_profile_group_name() . '</h4>';
$str_echo2 = '';
while (bp_profile_fields()) {
bp_the_profile_field();
// field ID
$int_field_id = esc_html($field->id);
// use our (custom) method to get the fields' vibility level
$str_field_ev = $obj_bp_ev->ez_bp_get_the_profile_field_visibility_level();
// get the visible value
$str_field_visible = $obj_bp_ev->get_level_visible($str_field_ev);
// is the field's visibile okay for this visitor?
if (isset($arr_current_visitor_has_permissions[$str_field_visible])) {
$str_echo2 .= '<div class="viewfield field_' . $int_field_id . ' field_' . strtolower(sanitize_file_name($field->name)) . ' field_type_' . esc_html($field->type) . '">';
$str_echo2 .= '<label for="field_' . $int_field_id . '">' . bp_get_the_profile_field_name();
// $str_echo2 .= ' [' . $str_field_ev . ' - (TODO remove)]';
$str_echo2 .= '</label>';
开发者ID:WPezClasses,项目名称:class-wp-ezclasses-buddypress-editability-visibility-1,代码行数:31,代码来源:profile-loop.php
示例6: bp_the_profile_group_edit_form_action
?>
<form action="<?php
bp_the_profile_group_edit_form_action();
?>
" method="post" id="profile-edit-form" class="standard-form form-horizontal <?php
bp_the_profile_group_slug();
?>
">
<?php
do_action('bp_before_profile_field_content');
?>
<h4 ><?php
printf(__("Editing '%s' Profile Group", 'firmasite'), bp_get_the_profile_group_name());
?>
</h4>
<ul class="nav nav-tabs">
<?php
bp_profile_group_tabs();
?>
</ul>
<div class="clear"></div>
<div class="panel panel-default">
<div class="panel-body">
<?php
示例7: bp_the_profile_group_edit_form_action
<form action="<?php
bp_the_profile_group_edit_form_action();
?>
" method="post" id="profile-edit-form" class="standard-form <?php
bp_the_profile_group_slug();
?>
">
<?php
/** This action is documented in bp-templates/bp-legacy/buddypress/members/single/profile/profile-wp.php */
do_action('bp_before_profile_field_content');
?>
<h4><?php
printf(__("Editing '%s' Profile Group", 'wonderflux'), bp_get_the_profile_group_name());
?>
</h4>
<?php
if (bp_profile_has_multiple_groups()) {
?>
<ul class="button-nav">
<?php
bp_profile_group_tabs();
?>
</ul>
<?php
}
示例8: bp_the_profile_group_edit_form_action
?>
<form action="<?php
bp_the_profile_group_edit_form_action();
?>
" method="post" id="profile-edit-form" class="standard-form <?php
bp_the_profile_group_slug();
?>
">
<?php
do_action('bp_before_profile_field_content');
?>
<h4><?php
printf(__("Editing '%s' Profile Group", "vibe"), bp_get_the_profile_group_name());
?>
</h4>
<ul class="button-nav">
<?php
bp_profile_group_tabs();
?>
</ul>
<div class="clear"></div>
<?php
while (bp_profile_fields()) {
示例9: get_profile
/**
* Returns an object with profile information
* @return Object Profile Fields
*/
public function get_profile()
{
/* Possible parameters:
* String username: the username you want information from (required)
*/
$this->initVars('profile');
$oReturn = new stdClass();
if ($this->username === false || !username_exists($this->username)) {
return $this->error('profile', 1);
}
$oUser = get_user_by('login', $this->username);
if (!bp_has_profile(array('user_id' => $oUser->data->ID))) {
return $this->error('profile', 0);
}
while (bp_profile_groups(array('user_id' => $oUser->data->ID))) {
bp_the_profile_group();
if (bp_profile_group_has_fields()) {
$sGroupName = bp_get_the_profile_group_name();
while (bp_profile_fields()) {
bp_the_profile_field();
$sFieldName = bp_get_the_profile_field_name();
if (bp_field_has_data()) {
$sFieldValue = bp_get_the_profile_field_value();
}
$oReturn->groups->{$sGroupName}->{$sFieldName} = $sFieldValue;
}
}
}
return $oReturn;
}
示例10: do_action
<?php do_action( 'bp_before_profile_edit_content' ) ?>
<?php if ( bp_has_profile( 'profile_group_id=' . bp_get_current_profile_group_id() ) ) : while ( bp_profile_groups() ) : bp_the_profile_group(); ?>
<form action="<?php bp_the_profile_group_edit_form_action() ?>" method="post" id="profile-edit-form" class="standard-form <?php bp_the_profile_group_slug() ?>">
<?php do_action( 'bp_before_profile_field_content' ) ?>
<h4><?php printf( __( "Editing '%s' Profile Group", "buddypress" ), bp_get_the_profile_group_name() ); ?></h4>
<ul class="button-nav">
<?php bp_profile_group_tabs(); ?>
</ul>
<div class="clear"></div>
<?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?>
<div<?php bp_field_css_class( 'editfield' ) ?>>
<?php if ( 'textbox' == bp_get_the_profile_field_type() ) : ?>
<label for="<?php bp_the_profile_field_input_name() ?>"><?php bp_the_profile_field_name() ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ) ?><?php endif; ?></label>
<input type="text" name="<?php bp_the_profile_field_input_name() ?>" id="<?php bp_the_profile_field_input_name() ?>" value="<?php bp_the_profile_field_edit_value() ?>" />
<?php endif; ?>
<?php if ( 'textarea' == bp_get_the_profile_field_type() ) : ?>
<label for="<?php bp_the_profile_field_input_name() ?>"><?php bp_the_profile_field_name() ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ) ?><?php endif; ?></label>
<textarea rows="5" cols="40" name="<?php bp_the_profile_field_input_name() ?>" id="<?php bp_the_profile_field_input_name() ?>"><?php bp_the_profile_field_edit_value() ?></textarea>
示例11: bp_mtc_screen_two_content
function bp_mtc_screen_two_content()
{
global $bp, $wpdb, $creds, $profile_template, $groups;
?>
<p>Please select any tags that you would like to include in your followed content.</p>
<?php
if (bp_has_profile()) {
while (bp_profile_groups()) {
bp_the_profile_group();
if ('mtc' == bp_get_the_profile_group_name()) {
?>
<form action="<?php
bp_the_profile_group_edit_form_action();
?>
" method="post" id="profile-edit-form" class="standard-form <?php
bp_the_profile_group_slug();
?>
">
<?php
while (bp_profile_fields()) {
bp_the_profile_field();
?>
<fieldset<?php
bp_field_css_class('editfield');
?>
>
<div class="checkbox">
<span class="label"><?php
bp_the_profile_field_name();
?>
<?php
if (bp_get_the_profile_field_is_required()) {
_e('(required)', 'buddypress');
}
?>
</span>
<?php
bp_the_profile_field_options();
?>
</div>
<?php
do_action('bp_custom_profile_edit_fields');
?>
<p class="description"><?php
bp_the_profile_field_description();
?>
</p>
</fieldset>
<?php
}
?>
<div class="submit">
<input type="submit" name="profile-group-edit-submit" id="profile-group-edit-submit" value="<?php
_e('Save selection', 'buddypress');
?>
" />
</div>
<input type="hidden" name="field_ids" id="field_ids" value="<?php
bp_the_profile_group_field_ids();
?>
" />
<?php
wp_nonce_field('bp_xprofile_edit');
?>
</form>
<?php
}
}
}
?>
<?php
/*
if ( function_exists('xprofile_get_profile') ) :
if ( bp_has_profile() ) :
while ( bp_profile_groups() ) : bp_the_profile_group();
print_r(bp_get_the_profile_group_name());
//.........这里部分代码省略.........
示例12: register_metaboxes
/**
* Register the xProfile metabox on Community Profile admin page.
*
* @access public
* @since BuddyPress (2.0.0)
*
* @param int $user_id ID of the user being edited.
* @param string $screen_id Screen ID to load the metabox in.
* @param object $stats_metabox Context and priority for the stats metabox.
*/
public function register_metaboxes($user_id = 0, $screen_id = '', $stats_metabox = null)
{
if (empty($screen_id)) {
$screen_id = buddypress()->members->admin->user_page;
}
if (empty($stats_metabox)) {
$stats_metabox = new StdClass();
}
// Moving the Stats Metabox
$stats_metabox->context = 'side';
$stats_metabox->priority = 'low';
// Each Group of fields will have his own metabox
if (false == bp_is_user_spammer($user_id) && bp_has_profile(array('fetch_fields' => false))) {
while (bp_profile_groups()) {
bp_the_profile_group();
add_meta_box('bp_xprofile_user_admin_fields_' . sanitize_key(bp_get_the_profile_group_slug()), esc_html(bp_get_the_profile_group_name()), array(&$this, 'user_admin_profile_metaboxes'), $screen_id, 'normal', 'core', array('profile_group_id' => absint(bp_get_the_profile_group_id())));
}
// if a user has been mark as a spammer, remove BP data
} else {
add_meta_box('bp_xprofile_user_admin_empty_profile', _x('User marked as a spammer', 'xprofile user-admin edit screen', 'buddypress'), array(&$this, 'user_admin_spammer_metabox'), $screen_id, 'normal', 'core');
}
// Avatar Metabox
add_meta_box('bp_xprofile_user_admin_avatar', _x('Avatar', 'xprofile user-admin edit screen', 'buddypress'), array(&$this, 'user_admin_avatar_metabox'), $screen_id, 'side', 'low');
}
示例13: bp_the_profile_group_edit_form_action
?>
<form action="<?php
bp_the_profile_group_edit_form_action();
?>
" method="post" id="profile-edit-form" class="standard-form <?php
bp_the_profile_group_slug();
?>
">
<?php
do_action('bp_before_profile_field_content');
?>
<h4><?php
printf(__("Editing '%s' Profile Group", "wplms_modern"), bp_get_the_profile_group_name());
?>
</h4>
<ul class="button-nav">
<?php
bp_profile_group_tabs();
?>
</ul>
<div class="clear"></div>
<?php
while (bp_profile_fields()) {
示例14: user_buddypress_form
function user_buddypress_form($content)
{
// displays badge list in user profile
global $qa_request;
$userid = $content['raw']['userid'];
$handles = qa_userids_to_handles(array($userid));
$handle = $handles[$userid];
if (!$handle) {
return;
}
global $bp;
if (qa_opt('buddypress_enable_profile')) {
$idx = 1;
if (bp_has_profile(array('user_id' => $userid))) {
while (bp_profile_groups()) {
bp_the_profile_group();
if (bp_profile_group_has_fields()) {
$fields[] = array('label' => '<span class="qa-bp-profile-group-title">' . bp_get_the_profile_group_name() . '</span>', 'type' => 'static', 'value' => qa_get_logged_in_userid() === $userid ? ' <a class="qa-bp-profile-group-edit" href="' . bp_loggedin_user_domain() . $bp->profile->slug . '/edit/group/' . $idx++ . '">' . qa_lang_html('question/edit_button') . '</a>' : '');
while (bp_profile_fields()) {
bp_the_profile_field();
if (bp_field_has_data()) {
$fields[] = array('label' => bp_get_the_profile_field_name(), 'type' => 'static', 'value' => preg_replace('|</*p>|', '', bp_get_the_profile_field_value()));
}
}
}
}
}
$ok = null;
$tags = null;
$buttons = array();
$title = '<a href="' . bp_core_get_user_domain($userid) . $bp->profile->slug . '/">' . qa_opt('buddypress_integration_title') . '</a>';
$content = array_merge(array('form-buddypress-list' => array('ok' => $ok && !isset($error) ? $ok : null, 'style' => 'wide', 'tags' => $tags, 'title' => $title, 'fields' => $fields, 'buttons' => $buttons)), $content);
}
if (qa_opt('buddypress_integration_priv_message') && qa_get_logged_in_userid() && $userid != qa_get_logged_in_userid()) {
$content = array_merge(array('form-buddypress-message' => array('fields' => array('field' => array('label' => '<a href="' . wp_nonce_url($bp->loggedin_user->domain . $bp->messages->slug . '/compose/?r=' . $handle) . '">' . qa_lang('misc/private_message_title') . '</a>', 'type' => 'static')), 'style' => 'wide')), $content);
}
return $content;
}