本文整理汇总了PHP中bp_the_profile_field_name函数的典型用法代码示例。如果您正苦于以下问题:PHP bp_the_profile_field_name函数的具体用法?PHP bp_the_profile_field_name怎么用?PHP bp_the_profile_field_name使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bp_the_profile_field_name函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: edit_field_html
/**
* Output the edit field HTML for this field type.
*
* Must be used inside the {@link bp_profile_fields()} template loop.
*
* @since 2.0.0
*
* @param array $raw_properties Optional key/value array of
* {@link http://dev.w3.org/html5/markup/textarea.html permitted attributes}
* that you want to add.
*/
public function edit_field_html(array $raw_properties = array())
{
// User_id is a special optional parameter that certain other fields
// types pass to {@link bp_the_profile_field_options()}.
if (isset($raw_properties['user_id'])) {
unset($raw_properties['user_id']);
}
$richtext_enabled = bp_xprofile_is_richtext_enabled_for_field();
?>
<label for="<?php
bp_the_profile_field_input_name();
?>
">
<?php
bp_the_profile_field_name();
?>
<?php
bp_the_profile_field_required_label();
?>
</label>
<?php
/** This action is documented in bp-xprofile/bp-xprofile-classes */
do_action(bp_get_the_profile_field_errors_action());
if (!$richtext_enabled) {
$r = wp_parse_args($raw_properties, array('cols' => 40, 'rows' => 5));
?>
<textarea <?php
echo $this->get_edit_field_html_elements($r);
?>
><?php
bp_the_profile_field_edit_value();
?>
</textarea>
<?php
} else {
/**
* Filters the arguments passed to `wp_editor()` in richtext xprofile fields.
*
* @since 2.4.0
*
* @param array $args {
* Array of optional arguments. See `wp_editor()`.
* @type bool $teeny Whether to use the teeny version of TinyMCE. Default true.
* @type bool $media_buttons Whether to show media buttons. Default false.
* @type bool $quicktags Whether to show the quicktags buttons. Default true.
* @type int $textarea_rows Number of rows to display in the editor. Defaults to 1 in the
* 'admin' context, and 10 in the 'edit' context.
* }
* @param string $context The display context. 'edit' when the markup is intended for the
* profile edit screen, 'admin' when intended for the Profile Fields
* Dashboard panel.
*/
$editor_args = apply_filters('bp_xprofile_field_type_textarea_editor_args', array('teeny' => true, 'media_buttons' => false, 'quicktags' => true, 'textarea_rows' => 10), 'edit');
wp_editor(bp_get_the_profile_field_edit_value(), bp_get_the_profile_field_input_name(), $editor_args);
}
}
开发者ID:igniterealtime,项目名称:community-plugins,代码行数:71,代码来源:class-bp-xprofile-field-type-textarea.php
示例2: edit_field_html
/**
* Output the edit field HTML for this field type.
*
* Must be used inside the {@link bp_profile_fields()} template loop.
*
* @param array $raw_properties Optional key/value array of
* {@link http://dev.w3.org/html5/markup/input.number.html permitted attributes}
* that you want to add.
*
* @since 2.1.0
*/
public function edit_field_html(array $raw_properties = array())
{
// `user_id` is a special optional parameter that certain other
// fields types pass to {@link bp_the_profile_field_options()}.
if (isset($raw_properties['user_id'])) {
unset($raw_properties['user_id']);
}
$r = bp_parse_args($raw_properties, array('type' => 'text', 'inputmode' => 'url', 'value' => esc_url(bp_get_the_profile_field_edit_value())));
?>
<label for="<?php
bp_the_profile_field_input_name();
?>
">
<?php
bp_the_profile_field_name();
?>
<?php
bp_the_profile_field_required_label();
?>
</label>
<?php
/** This action is documented in bp-xprofile/bp-xprofile-classes */
do_action(bp_get_the_profile_field_errors_action());
?>
<input <?php
echo $this->get_edit_field_html_elements($r);
?>
>
<?php
}
开发者ID:swissspidy,项目名称:BuddyPress,代码行数:45,代码来源:class-bp-xprofile-field-type-url.php
示例3: edit_field_html
public function edit_field_html(array $raw_properties = array())
{
$user_id = bp_displayed_user_id();
if (isset($raw_properties['user_id'])) {
$user_id = (int) $raw_properties['user_id'];
unset($raw_properties['user_id']);
}
// HTML5 required attribute.
if (bp_get_the_profile_field_is_required()) {
$raw_properties['required'] = 'required';
$required = true;
} else {
$required = false;
}
?>
<label for="<?php
bp_the_profile_field_input_name();
?>
"><?php
bp_the_profile_field_name();
?>
<?php
if (bp_get_the_profile_field_is_required()) {
esc_html_e('(required)', 'buddypress');
}
?>
</label>
<?php
do_action(bp_get_the_profile_field_errors_action());
?>
<?php
bp_the_profile_field_options("user_id={$user_id}&required={$required}");
?>
<?php
}
开发者ID:baden03,项目名称:buddypress-xprofile-custom-fields-type,代码行数:35,代码来源:Bxcft_Field_Type_CheckboxAcceptance.php
示例4: edit_field_html
/**
* Output the edit field HTML for this field type.
*
* Must be used inside the {@link bp_profile_fields()} template loop.
*
* @since 2.0.0
*
* @param array $raw_properties Optional key/value array of
* {@link http://dev.w3.org/html5/markup/input.checkbox.html permitted attributes}
* that you want to add.
*/
public function edit_field_html(array $raw_properties = array())
{
// User_id is a special optional parameter that we pass to
// {@link bp_the_profile_field_options()}.
if (isset($raw_properties['user_id'])) {
$user_id = (int) $raw_properties['user_id'];
unset($raw_properties['user_id']);
} else {
$user_id = bp_displayed_user_id();
}
?>
<fieldset class="checkbox">
<legend>
<?php
bp_the_profile_field_name();
?>
<?php
bp_the_profile_field_required_label();
?>
</legend>
<?php
/** This action is documented in bp-xprofile/bp-xprofile-classes */
do_action(bp_get_the_profile_field_errors_action());
?>
<?php
bp_the_profile_field_options(array('user_id' => $user_id));
?>
</fieldset>
<?php
}
开发者ID:dcavins,项目名称:buddypress-svn,代码行数:46,代码来源:class-bp-xprofile-field-type-checkbox.php
示例5: edit_field_html
/**
* Output the edit field HTML for this field type.
*
* Must be used inside the {@link bp_profile_fields()} template loop.
*
* @param array $raw_properties Optional key/value array of {@link http://dev.w3.org/html5/markup/input.radio.html permitted attributes} that you want to add.
* @since 2.0.0
*/
public function edit_field_html(array $raw_properties = array())
{
// user_id is a special optional parameter that we pass to
// {@link bp_the_profile_field_options()}.
if (isset($raw_properties['user_id'])) {
$user_id = (int) $raw_properties['user_id'];
unset($raw_properties['user_id']);
} else {
$user_id = bp_displayed_user_id();
}
?>
<div class="radio">
<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
esc_html_e('(required)', 'buddypress');
?>
<?php
}
?>
</label>
<?php
/** This action is documented in bp-xprofile/bp-xprofile-classes */
do_action(bp_get_the_profile_field_errors_action());
?>
<?php
bp_the_profile_field_options(array('user_id' => $user_id));
if (!bp_get_the_profile_field_is_required()) {
?>
<a class="clear-value" href="javascript:clear( '<?php
echo esc_js(bp_get_the_profile_field_input_name());
?>
' );">
<?php
esc_html_e('Clear', 'buddypress');
?>
</a>
<?php
}
?>
</div>
<?php
}
开发者ID:jasonmcalpin,项目名称:BuddyPress,代码行数:67,代码来源:class-bp-xprofile-field-type-radiobutton.php
示例6: edit_field_html
/**
* Output the edit field HTML for this field type.
*
* Must be used inside the {@link bp_profile_fields()} template loop.
*
* @param array $raw_properties Optional key/value array of {@link http://dev.w3.org/html5/markup/select.html permitted attributes} that you want to add.
* @since 2.0.0
*/
public function edit_field_html(array $raw_properties = array())
{
// user_id is a special optional parameter that we pass to
// {@link bp_the_profile_field_options()}.
if (isset($raw_properties['user_id'])) {
$user_id = (int) $raw_properties['user_id'];
unset($raw_properties['user_id']);
} else {
$user_id = bp_displayed_user_id();
}
$r = bp_parse_args($raw_properties, array('multiple' => 'multiple', 'id' => bp_get_the_profile_field_input_name() . '[]', 'name' => bp_get_the_profile_field_input_name() . '[]'));
?>
<label for="<?php
bp_the_profile_field_input_name();
?>
[]"><?php
bp_the_profile_field_name();
?>
<?php
if (bp_get_the_profile_field_is_required()) {
_e('(required)', 'buddypress');
}
?>
</label>
<?php
/** This action is documented in bp-xprofile/bp-xprofile-classes */
do_action(bp_get_the_profile_field_errors_action());
?>
<select <?php
echo $this->get_edit_field_html_elements($r);
?>
>
<?php
bp_the_profile_field_options(array('user_id' => $user_id));
?>
</select>
<?php
if (!bp_get_the_profile_field_is_required()) {
?>
<a class="clear-value" href="javascript:clear( '<?php
echo esc_js(bp_get_the_profile_field_input_name());
?>
[]' );">
<?php
esc_html_e('Clear', 'buddypress');
?>
</a>
<?php
}
?>
<?php
}
开发者ID:jasonmcalpin,项目名称:BuddyPress,代码行数:66,代码来源:class-bp-xprofile-field-type-multiselectbox.php
示例7: edit_field_html
public function edit_field_html(array $raw_properties = array())
{
if (isset($raw_properties['user_id'])) {
unset($raw_properties['user_id']);
}
// HTML5 required attribute.
if (bp_get_the_profile_field_is_required()) {
$raw_properties['required'] = 'required';
}
$input_name = bp_get_the_profile_field_input_name();
$html = $this->get_edit_field_html_elements(array_merge(array('type' => 'text', 'value' => bp_get_the_profile_field_edit_value()), $raw_properties));
?>
<label for="<?php
echo $input_name;
?>
"><?php
echo bp_the_profile_field_name() . (bp_get_the_profile_field_is_required() ? esc_html_e('(required)', 'buddypress') : '');
?>
</label>
<?php
do_action(bp_get_the_profile_field_errors_action());
?>
<input id="textHierarchy" <?php
echo $html;
?>
readonly>
<input type="button" id="openHierarchy" value="지역(선거구) 선택" class="btn" style="height: 40px;">
<div id="layerHierarchy">
<div class="selectHierarchy popup-list valign-outer" style="display:block">
<div class="valign-middle contents">
<div class="center-block">
<ul class="nav nav-tabs">
<li class="tab1"><a href="#">선거구 선택</a></li>
</ul>
<div id="divHierarchy" >
</div>
<span id="submitHierarchy" class="btn btn-default">SUBMIT</span>
<span id="closeHierarchy" class="btn btn-default">CLOSE</span>
</div>
</div>
</div>
</div>
<?php
}
开发者ID:ncross42,项目名称:dobalance,代码行数:46,代码来源:Bdd_Field_Type_Hierarchy.php
示例8: edit_field_html
/**
* Output the edit field HTML for this field type.
*
* Must be used inside the {@link bp_profile_fields()} template loop.
*
* @param array $raw_properties Optional key/value array of {@link http://dev.w3.org/html5/markup/select.html permitted attributes} that you want to add.
* @since BuddyPress (2.0.0)
*/
public function edit_field_html(array $raw_properties = array())
{
// user_id is a special optional parameter that we pass to
// {@link bp_the_profile_field_options()}.
if (isset($raw_properties['user_id'])) {
$user_id = (int) $raw_properties['user_id'];
unset($raw_properties['user_id']);
} else {
$user_id = bp_displayed_user_id();
}
?>
<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
esc_html_e('(required)', 'buddypress');
?>
<?php
}
?>
</label>
<?php
/** This action is documented in bp-xprofile/bp-xprofile-classes */
do_action(bp_get_the_profile_field_errors_action());
?>
<select <?php
echo $this->get_edit_field_html_elements($raw_properties);
?>
>
<?php
bp_the_profile_field_options(array('user_id' => $user_id));
?>
</select>
<?php
}
开发者ID:kosir,项目名称:thatcamp-org,代码行数:54,代码来源:class-bp-xprofile-field-type-selectbox.php
示例9: edit_field_html
/**
* Output the edit field HTML for this field type.
*
* Must be used inside the {@link bp_profile_fields()} template loop.
*
* @param array $raw_properties Optional key/value array of {@link http://dev.w3.org/html5/markup/textarea.html permitted attributes} that you want to add.
* @since 2.0.0
*/
public function edit_field_html(array $raw_properties = array())
{
// user_id is a special optional parameter that certain other fields
// types pass to {@link bp_the_profile_field_options()}.
if (isset($raw_properties['user_id'])) {
unset($raw_properties['user_id']);
}
$r = bp_parse_args($raw_properties, array('cols' => 40, 'rows' => 5));
?>
<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
esc_html_e('(required)', 'buddypress');
?>
<?php
}
?>
</label>
<?php
/** This action is documented in bp-xprofile/bp-xprofile-classes */
do_action(bp_get_the_profile_field_errors_action());
?>
<textarea <?php
echo $this->get_edit_field_html_elements($r);
?>
><?php
bp_the_profile_field_edit_value();
?>
</textarea>
<?php
}
开发者ID:jasonmcalpin,项目名称:BuddyPress,代码行数:51,代码来源:class-bp-xprofile-field-type-textarea.php
示例10: edit_field_html
public function edit_field_html(array $raw_properties = array())
{
if (isset($raw_properties['user_id'])) {
unset($raw_properties['user_id']);
}
// HTML5 required attribute.
if (bp_get_the_profile_field_is_required()) {
$raw_properties['required'] = 'required';
}
$html = $this->get_edit_field_html_elements(array_merge(array('type' => 'color', 'value' => bp_get_the_profile_field_edit_value()), $raw_properties));
?>
<label for="<?php
bp_the_profile_field_input_name();
?>
"><?php
bp_the_profile_field_name();
?>
<?php
if (bp_get_the_profile_field_is_required()) {
esc_html_e('(required)', 'buddypress');
}
?>
</label>
<?php
do_action(bp_get_the_profile_field_errors_action());
?>
<input <?php
echo $html;
?>
>
<script>
if (!Modernizr.inputtypes.color) {
// No html5 field colorpicker => Calling jscolor.
jQuery('input#<?php
bp_the_profile_field_input_name();
?>
').addClass('color');
}
</script>
<?php
}
开发者ID:baden03,项目名称:buddypress-xprofile-custom-fields-type,代码行数:41,代码来源:Bxcft_Field_Type_Color.php
示例11: display_global_profile_fields
/**
* Display the global fields on the users public profile.
*
* @since 1.0
*
*/
public function display_global_profile_fields()
{
global $profile_template;
$this->write_log($profile_template);
if ($profile_template->field->visibility_level == 'global') {
$this->write_log($profile_template->field->visibility_level);
$global_field_value = bp_xprofile_get_meta($profile_template->field->id, 'field', 'global_value');
if (!empty($global_field_value) || '0' === $global_field_value) {
$value = maybe_unserialize($global_field_value);
} else {
$value = false;
}
if (!empty($value) || '0' === $value) {
?>
<tr<?php
bp_field_css_class();
?>
>
<td class="label"><?php
bp_the_profile_field_name();
?>
</td>
<td class="data"><?php
echo $value;
?>
</td>
</tr>
<?php
}
}
}
开发者ID:nightbook,项目名称:buddypress-admin-global-profile-fields,代码行数:42,代码来源:bp-admin-only-profile-fields.php
示例12: xprofile_admin_field
/**
* Handles the WYSIWYG display of each profile field on the edit screen.
*
* @since 1.5.0
*
* @param object $admin_field Admin field.
* @param object $admin_group Admin group object.
* @param string $class Classes to append to output.
*/
function xprofile_admin_field($admin_field, $admin_group, $class = '')
{
global $field;
$field = $admin_field;
?>
<fieldset id="draggable_field_<?php
echo esc_attr($field->id);
?>
"class="sortable<?php
echo ' ' . $field->type;
if (!empty($class)) {
echo ' ' . $class;
}
?>
">
<legend>
<span>
<?php
bp_the_profile_field_name();
?>
<?php
if (empty($field->can_delete)) {
esc_html_e('(Primary)', 'buddypress');
}
?>
<?php
bp_the_profile_field_required_label();
?>
<?php
if (bp_xprofile_get_meta($field->id, 'field', 'signup_position')) {
esc_html_e('(Sign-up)', 'buddypress');
}
?>
<?php
if (bp_get_member_types()) {
echo $field->get_member_type_label();
}
?>
<?php
/**
* Fires at end of legend above the name field in base xprofile group.
*
* @since 2.2.0
*
* @param BP_XProfile_Field $field Current BP_XProfile_Field
* object being rendered.
*/
do_action('xprofile_admin_field_name_legend', $field);
?>
</span>
</legend>
<div class="field-wrapper">
<?php
if (in_array($field->type, array_keys(bp_xprofile_get_field_types()))) {
$field_type = bp_xprofile_create_field_type($field->type);
$field_type->admin_field_html();
} else {
/**
* Fires after the input if the current field is not in default field types.
*
* @since 1.5.0
*
* @param BP_XProfile_Field $field Current BP_XProfile_Field
* object being rendered.
* @param int $value Integer 1.
*/
do_action('xprofile_admin_field', $field, 1);
}
?>
<?php
if ($field->description) {
?>
<p class="description"><?php
echo esc_attr($field->description);
?>
</p>
<?php
}
?>
<div class="actions">
<a class="button edit" href="users.php?page=bp-profile-setup&group_id=<?php
echo esc_attr($admin_group->id);
?>
//.........这里部分代码省略.........
开发者ID:boonebgorges,项目名称:BuddyPress-1,代码行数:101,代码来源:bp-xprofile-admin.php
示例13: edit_field_html
public function edit_field_html(array $raw_properties = array())
{
// `user_id` is a special optional parameter that certain other
// fields types pass to {@link bp_the_profile_field_options()}.
if (isset($raw_properties['user_id'])) {
unset($raw_properties['user_id']);
}
$r = bp_parse_args($raw_properties, array('type' => 'text', 'inputmode' => 'url', 'value' => esc_url(bp_get_the_profile_field_edit_value())));
$r['class'] = $r['class'] . ' form-control';
?>
<div class="form-group">
<label class="control-label col-sm-3" for="<?php
bp_the_profile_field_input_name();
?>
">
<?php
bp_the_profile_field_name();
?>
<?php
if (bp_get_the_profile_field_is_required()) {
?>
<?php
esc_html_e('(required)', 'firmasite');
?>
<?php
}
?>
</label>
<div class="col-sm-9">
<?php
do_action(bp_get_the_profile_field_errors_action());
?>
<input <?php
echo $this->get_edit_field_html_elements($r);
?>
>
</div>
</div>
<?php
}
开发者ID:jason-herndon,项目名称:bas-intranet,代码行数:44,代码来源:buddypress-customs.php
示例14: form_settings_xprofile_fields
public static function form_settings_xprofile_fields($gmw_forms, $formID, $section, $option)
{
global $bp;
if (!bp_is_active('xprofile')) {
_e('Buddypress xprofile fields component is deactivated. You will need to activate in in order to use this feature.', 'GMW');
return;
}
if (function_exists('bp_has_profile')) {
if (bp_has_profile('hide_empty_fields=0')) {
$dateboxes = array();
$dateboxes[0] = '';
while (bp_profile_groups()) {
bp_the_profile_group();
while (bp_profile_fields()) {
bp_the_profile_field();
if (bp_get_the_profile_field_type() == 'datebox' || bp_get_the_profile_field_type() == 'birthdate') {
$dateboxes[] = bp_get_the_profile_field_id();
} else {
$field_id = bp_get_the_profile_field_id();
?>
<input type="checkbox" name="<?php
echo 'gmw_forms[' . $formID . '][' . $section . '][profile_fields][]';
?>
" value="<?php
echo $field_id;
?>
" <?php
if (isset($gmw_forms[$formID][$section]['profile_fields']) && in_array($field_id, $gmw_forms[$formID][$section]['profile_fields'])) {
echo ' checked=checked';
}
?>
/>
<label><?php
bp_the_profile_field_name();
?>
</label>
<br />
<?php
}
}
}
?>
<label><strong style="margin:5px 0px;float:left;width:100%"><?php
_e('Choose the "Age Range" Field', 'GMW');
?>
</strong></label><br />
<select name="<?php
echo 'gmw_forms[' . $formID . '][' . $section . '][profile_fields_date]';
?>
">
<?php
foreach ($dateboxes as $datebox) {
$field = new BP_XProfile_Field($datebox);
$selected = $gmw_forms[$formID][$section]['profile_fields_date'] == $datebox ? 'selected="selected"' : '';
?>
<option value="<?php
echo $datebox;
?>
" <?php
echo $selected;
?>
><?php
echo $field->name;
?>
</option>
<?php
}
?>
</select>
<?php
}
}
}
开发者ID:WP-Panda,项目名称:allergenics,代码行数:74,代码来源:gmw-fl-admin.php
示例15: bp_the_profile_field_input_name
</div>
<?php
}
?>
<?php
if ('datebox' == bp_get_the_profile_field_type()) {
?>
<div class="datebox">
<label for="<?php
bp_the_profile_field_input_name();
?>
_day"><?php
bp_the_profile_field_name();
?>
<?php
if (bp_get_the_profile_field_is_required()) {
_e('(required)', 'buddypress');
}
?>
</label>
<?php
do_action('bp_' . bp_get_the_profile_field_input_name() . '_errors');
?>
<select name="<?php
bp_the_profile_field_input_name();
?>
_day" id="<?php
开发者ID:igniterealtime,项目名称:community-plugins,代码行数:31,代码来源:register.php
示例16: 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());
//.........这里部分代码省略.........
开发者ID:hnla,项目名称:tag-my-fav-content,代码行数:101,代码来源:my-tagged-content.php
示例17: edit_field_html
/**
* Output the edit field HTML for this field type.
*
* Must be used inside the {@link bp_profile_fields()} template loop.
*
* @since 2.0.0
*
* @param array $raw_properties Optional key/value array of
* {@link http://dev.w3.org/html5/markup/input.html permitted attributes}
* that you want to add.
*/
public function edit_field_html(array $raw_properties = array())
{
// User_id is a special optional parameter that we pass to.
// {@link bp_the_profile_field_options()}.
if (isset($raw_properties['user_id'])) {
$user_id = (int) $raw_properties['user_id'];
unset($raw_properties['user_id']);
} else {
$user_id = bp_displayed_user_id();
}
$day_r = bp_parse_args($raw_properties, array('id' => bp_get_the_profile_field_input_name() . '_day', 'name' => bp_get_the_profile_field_input_name() . '_day'));
$month_r = bp_parse_args($raw_properties, array('id' => bp_get_the_profile_field_input_name() . '_month', 'name' => bp_get_the_profile_field_input_name() . '_month'));
$year_r = bp_parse_args($raw_properties, array('id' => bp_get_the_profile_field_input_name() . '_year', 'name' => bp_get_the_profile_field_input_name() . '_year'));
?>
<div class="datebox">
<label for="<?php
bp_the_profile_field_input_name();
?>
_day">
<?php
bp_the_profile_field_name();
?>
<?php
bp_the_profile_field_required_label();
?>
</label>
<?php
/**
* Fires after field label and displays associated errors for the field.
*
* This is a dynamic hook that is dependent on the associated
* field ID. The hooks will be similar to `bp_field_12_errors`
* where the 12 is the field ID. Simply replace the 12 with
* your needed target ID.
*
* @since 1.8.0
*/
do_action(bp_get_the_profile_field_errors_action());
?>
<select <?php
echo $this->get_edit_field_html_elements($day_r);
?>
>
<?php
bp_the_profile_field_options(array('type' => 'day', 'user_id' => $user_id));
?>
</select>
<select <?php
echo $this->get_edit_field_html_elements($month_r);
?>
>
<?php
bp_the_profile_field_options(array('type' => 'month', 'user_id' => $user_id));
?>
</select>
<select <?php
echo $this->get_edit_field_html_elements($year_r);
?>
>
<?php
bp_the_profile_field_options(array('type' => 'year', 'user_id' => $user_id));
?>
</select>
</div>
<?php
}
开发者ID:swissspidy,项目名称:BuddyPress,代码行数:84,代码来源:class-bp-xprofile-field-type-datebox.php
示例18: if
<?php endif; ?>
<?php if ( 'checkbox' == bp_get_the_profile_field_type() ) : ?>
<div class="checkbox">
<span class="label"><?php bp_the_profile_field_name() ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ) ?><?php endif; ?></span>
<?php bp_the_profile_field_options() ?>
</div>
<?php endif; ?>
<?php if ( 'datebox' == bp_get_the_profile_field_type() ) : ?>
<div class="datebox">
<label for="<?php bp_the_profile_field_input_name() ?>_day"><?php bp_the_profile_field_name() ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ) ?><?php endif; ?></label>
<select name="<?php bp_the_profile_field_input_name() ?>_day" id="<?php bp_the_profile_field_input_name() ?>_day">
<?php bp_the_profile_field_options( 'type=day' ) ?>
</select>
<select name="<?php bp_the_profile_field_input_name() ?>_month" id="<?php bp_the_profile_field_input_name() ?>_month">
<?php bp_the_profile_field_options( 'type=month' ) ?>
</select>
<select name="<?php bp_the_profile_field_input_name() ?>_year" id="<?php bp_the_profile_field_input_name() ?>_year">
<?php bp_the_profile_field_options( 'type=year' ) ?>
</select>
</div>
<?php endif; ?>
开发者ID:n-sane,项目名称:zaroka,代码行数:31,代码来源:edit.php
示例19: edit_field_html
public function edit_field_html(array $raw_properties = array())
{
if (isset($raw_properties['user_id'])) {
unset($raw_properties['user_id']);
}
// HTML5 required attribute.
if (bp_get_the_profile_field_is_required()) {
$raw_properties['required'] = 'required';
}
$input_name = bp_get_the_profile_field_input_name();
$html = $this->get_edit_field_html_elements(array_merge(array('type' => 'text', 'value' => bp_get_the_profile_field_edit_value()), $raw_properties));
?>
<label for="<?php
echo $input_name;
?>
"><?php
echo bp_the_profile_field_name() . (bp_get_the_profile_field_is_required() ? esc_html_e('(required)', 'buddypress') : '');
?>
</label>
<?php
do_action(bp_get_the_profile_field_errors_action());
?>
<input id="textDistrict" <?php
echo $html;
?>
readonly>
<input type="button" id="openDistrict" value="지역(선거구) 선택" class="btn" style="height: 40px;">
<style>
/*{{{districtSetting */
#layerDistrict {
display:none;
background-color: white;
border:5px solid;
position:fixed;
left:50%;
top:50%;
min-width:500px;
min-height:300px;
margin-left:-250px;
margin-top:-150px;
overflow:auto;
}
.selectDistrict .nav-tabs a {
font-size: 18px;
}
.selectDistrict .contents {
width: 480px;
padding: 10px;
border: 1px solid #ddd;
border-top: 0px none;
}
.selectDistrict select {
width: 100%;
height: 40px;
font-size: 18px;
margin: 5px 0 5px 0;
padding: 0;
}
.selectDistrict span {
margin: 5px 0;
width: 49%;
font-size: 20px;
font-style: bold;
}
/*}}}*/
</style>
<div id="layerDistrict">
<div class="selectDistrict popup-list valign-outer" style="display:block">
<div class="valign-middle contents">
<div class="center-block">
<ul class="nav nav-tabs">
<li class="tab1"><a href="#">선거구 선택</a></li>
</ul>
<div id="divDistrict" >
</div>
<span id="submitDistrict" class="btn btn-default">SUBMIT</span>
<span id="closeDistrict" class="btn btn-default">CLOSE</span>
</div>
</div>
</div>
</div>
<?php
}
开发者ID:ncross42,项目名称:dobalance,代码行数:86,代码来源:Bdd_Field_Type_District_Korea.php
示例20 |
请发表评论