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


PHP bp_the_profile_field_options函数代码示例

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


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

示例1: 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

示例2: admin_field_html

    /**
     * Output HTML for this field type on the wp-admin Profile Fields screen.
     *
     * Must be used inside the {@link bp_profile_fields()} template loop.
     *
     * @since 2.0.0
     *
     * @param array $raw_properties Optional key/value array of permitted attributes that you want to add.
     */
    public function admin_field_html(array $raw_properties = array())
    {
        $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'));
        ?>

		<label for="<?php 
        bp_the_profile_field_input_name();
        ?>
_day" class="screen-reader-text"><?php 
        esc_html_e('Select day', 'buddypress');
        ?>
</label>
		<select <?php 
        echo $this->get_edit_field_html_elements($day_r);
        ?>
>
			<?php 
        bp_the_profile_field_options(array('type' => 'day'));
        ?>
		</select>

		<label for="<?php 
        bp_the_profile_field_input_name();
        ?>
_month" class="screen-reader-text"><?php 
        esc_html_e('Select month', 'buddypress');
        ?>
</label>
		<select <?php 
        echo $this->get_edit_field_html_elements($month_r);
        ?>
>
			<?php 
        bp_the_profile_field_options(array('type' => 'month'));
        ?>
		</select>

		<label for="<?php 
        bp_the_profile_field_input_name();
        ?>
_year" class="screen-reader-text"><?php 
        esc_html_e('Select year', 'buddypress');
        ?>
</label>
		<select <?php 
        echo $this->get_edit_field_html_elements($year_r);
        ?>
>
			<?php 
        bp_the_profile_field_options(array('type' => 'year'));
        ?>
		</select>

	<?php 
    }
开发者ID:swissspidy,项目名称:BuddyPress,代码行数:66,代码来源:class-bp-xprofile-field-type-datebox.php

示例3: admin_field_html

    /**
     * Output HTML for this field type on the wp-admin Profile Fields screen.
     *
     * Must be used inside the {@link bp_profile_fields()} template loop.
     *
     * @param array $raw_properties Optional key/value array of permitted attributes that you want to add.
     * @since 2.0.0
     */
    public function admin_field_html(array $raw_properties = array())
    {
        bp_the_profile_field_options();
        if (bp_get_the_profile_field_is_required()) {
            return;
        }
        ?>

		<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 
    }
开发者ID:jasonmcalpin,项目名称:BuddyPress,代码行数:27,代码来源:class-bp-xprofile-field-type-radiobutton.php

示例4: edit_field_html

        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="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());
            ?>
			
					<select <?php 
            echo $this->get_edit_field_html_elements($raw_properties);
            ?>
>
						<?php 
            bp_the_profile_field_options(array('user_id' => $user_id));
            ?>
					</select>
				</div>
			</div>
			<?php 
        }
开发者ID:jason-herndon,项目名称:bas-intranet,代码行数:47,代码来源:buddypress-customs.php

示例5: admin_field_html

    /**
     * Output HTML for this field type on the wp-admin Profile Fields screen.
     *
     * Must be used inside the {@link bp_profile_fields()} template loop.
     *
     * @param array $raw_properties Optional key/value array of permitted attributes that you want to add.
     * @since 2.0.0
     */
    public function admin_field_html(array $raw_properties = array())
    {
        $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'));
        ?>

		<select <?php 
        echo $this->get_edit_field_html_elements($day_r);
        ?>
>
			<?php 
        bp_the_profile_field_options(array('type' => 'day'));
        ?>
		</select>

		<select <?php 
        echo $this->get_edit_field_html_elements($month_r);
        ?>
>
			<?php 
        bp_the_profile_field_options(array('type' => 'month'));
        ?>
		</select>

		<select <?php 
        echo $this->get_edit_field_html_elements($year_r);
        ?>
>
			<?php 
        bp_the_profile_field_options(array('type' => 'year'));
        ?>
		</select>

	<?php 
    }
开发者ID:jasonmcalpin,项目名称:BuddyPress,代码行数:44,代码来源:class-bp-xprofile-field-type-datebox.php

示例6: edit_field_html

        public function edit_field_html(array $raw_properties = array())
        {
            $user_id = bp_displayed_user_id();
            // 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']);
            }
            // HTML5 required attribute.
            if (bp_get_the_profile_field_is_required()) {
                $raw_properties['required'] = 'required';
            }
            $day_html = $this->get_edit_field_html_elements(array_merge(array('id' => bp_get_the_profile_field_input_name() . '_day', 'name' => bp_get_the_profile_field_input_name() . '_day'), $raw_properties));
            $month_html = $this->get_edit_field_html_elements(array_merge(array('id' => bp_get_the_profile_field_input_name() . '_month', 'name' => bp_get_the_profile_field_input_name() . '_month'), $raw_properties));
            $year_html = $this->get_edit_field_html_elements(array_merge(array('id' => bp_get_the_profile_field_input_name() . '_year', 'name' => bp_get_the_profile_field_input_name() . '_year'), $raw_properties));
            $label = sprintf('<label for="%s_day">%s%s</label>', bp_get_the_profile_field_input_name(), bp_get_the_profile_field_name(), bp_get_the_profile_field_is_required() ? ' ' . esc_html__('(required)', 'buddypress') : '');
            // Label.
            echo apply_filters('bxcft_field_label', $label, bp_get_the_profile_field_id(), bp_get_the_profile_field_type(), bp_get_the_profile_field_input_name(), bp_get_the_profile_field_name(), bp_get_the_profile_field_is_required());
            // Errors
            do_action(bp_get_the_profile_field_errors_action());
            // Input.
            ?>
            <select <?php 
            echo $day_html;
            ?>
>
                <?php 
            bp_the_profile_field_options(array('type' => 'day', 'user_id' => $user_id));
            ?>
            </select>

            <select <?php 
            echo $month_html;
            ?>
>
                <?php 
            bp_the_profile_field_options(array('type' => 'month', 'user_id' => $user_id));
            ?>
            </select>

            <select <?php 
            echo $year_html;
            ?>
>
                <?php 
            bp_the_profile_field_options(array('type' => 'year', 'user_id' => $user_id));
            ?>
            </select>
        <?php 
        }
开发者ID:baden03,项目名称:buddypress-xprofile-custom-fields-type,代码行数:50,代码来源:Bxcft_Field_Type_Birthdate.php

示例7: admin_field_html

    /**
     * Output HTML for this field type on the wp-admin Profile Fields screen.
     *
     * Must be used inside the {@link bp_profile_fields()} template loop.
     *
     * @param array $raw_properties Optional key/value array of permitted attributes that you want to add.
     * @since BuddyPress (2.0.0)
     */
    public function admin_field_html(array $raw_properties = array())
    {
        $html = $this->get_edit_field_html_elements($raw_properties);
        ?>
		<select <?php 
        echo $html;
        ?>
>
			<?php 
        bp_the_profile_field_options();
        ?>
		</select>
	<?php 
    }
开发者ID:kd5ytx,项目名称:Empirical-Wordpress,代码行数:22,代码来源:bp-xprofile-classes.php

示例8: xprofile_admin_field

function xprofile_admin_field($admin_field, $admin_group, $class = '')
{
    global $field;
    $field = $admin_field;
    ?>
						<fieldset id="field_<?php 
    echo esc_attr($field->id);
    ?>
" class="sortable<?php 
    echo ' ' . $field->type;
    if ($class) {
        echo ' ' . $class;
    }
    ?>
">
							<legend><span><?php 
    bp_the_profile_field_name();
    ?>
 <?php 
    if (!$field->can_delete) {
        ?>
 <?php 
        _e('(Primary)', 'buddypress');
    }
    ?>
 <?php 
    if (bp_get_the_profile_field_is_required()) {
        _e('(Required)', 'buddypress');
    }
    ?>
</span></legend>
							<div class="field-wrapper">

<?php 
    switch ($field->type) {
        case 'textbox':
            ?>

								<input type="text" name="<?php 
            bp_the_profile_field_input_name();
            ?>
" id="<?php 
            bp_the_profile_field_input_name();
            ?>
" value="" />

<?php 
            break;
        case 'textarea':
            ?>

								<textarea rows="5" cols="40" name="<?php 
            bp_the_profile_field_input_name();
            ?>
" id="<?php 
            bp_the_profile_field_input_name();
            ?>
"></textarea>

<?php 
            break;
        case 'selectbox':
            ?>

								<select name="<?php 
            bp_the_profile_field_input_name();
            ?>
" id="<?php 
            bp_the_profile_field_input_name();
            ?>
">
									<?php 
            bp_the_profile_field_options();
            ?>

								</select>

<?php 
            break;
        case 'multiselectbox':
            ?>

								<select name="<?php 
            bp_the_profile_field_input_name();
            ?>
" id="<?php 
            bp_the_profile_field_input_name();
            ?>
" multiple="multiple">
									<?php 
            bp_the_profile_field_options();
            ?>

								</select>

<?php 
            break;
        case 'radio':
            ?>

//.........这里部分代码省略.........
开发者ID:nxtclass,项目名称:NXTClass,代码行数:101,代码来源:bp-xprofile-admin.php

示例9: bp_ajax_register_form_function


//.........这里部分代码省略.........

								<?php 
                        }
                        ?>

								<?php 
                        if ('selectbox' == 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()) {
                                _e('', 'buddypress');
                            }
                            ?>
</label>
									<div id="<?php 
                            bp_the_profile_field_input_name();
                            ?>
_error" class="error"></div>
									<select name="<?php 
                            bp_the_profile_field_input_name();
                            ?>
" id="<?php 
                            bp_the_profile_field_input_name();
                            ?>
">
										<?php 
                            bp_the_profile_field_options();
                            ?>
									</select>

								<?php 
                        }
                        ?>

								<?php 
                        if ('multiselectbox' == 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()) {
                                _e('', 'buddypress');
                            }
                            ?>
</label>
									<div id="<?php 
                            bp_the_profile_field_input_name();
                            ?>
_error" class="error"></div>
									<select name="<?php 
                            bp_the_profile_field_input_name();
                            ?>
" id="<?php 
                            bp_the_profile_field_input_name();
开发者ID:hscale,项目名称:webento,代码行数:67,代码来源:bp-ajax.registration.php

示例10: _render_buddypress_account_extra_fields


//.........这里部分代码省略.........
                    if ('selectbox' == $field_type) {
                        ?>
								<label for="<?php 
                        echo $field_name_esc;
                        ?>
">
									<?php 
                        if (bp_get_the_profile_field_is_required()) {
                            ?>
										<?php 
                            printf(_x('%s (required)', '{Profile field} (required)', 'membership'), bp_get_the_profile_field_name());
                            ?>
									<?php 
                        } else {
                            ?>
										<?php 
                            bp_the_profile_field_name();
                            ?>
									<?php 
                        }
                        ?>
								</label>
								<?php 
                        do_action("bp_{$field_name}_errors");
                        ?>
								<select name="<?php 
                        echo $field_name_esc;
                        ?>
" id="<?php 
                        echo $field_name_esc;
                        ?>
">
									<?php 
                        bp_the_profile_field_options();
                        ?>
								</select>
							<?php 
                    }
                    ?>

							<?php 
                    if ('multiselectbox' == $field_type) {
                        ?>
								<label for="<?php 
                        echo $field_name_esc;
                        ?>
">
									<?php 
                        if (bp_get_the_profile_field_is_required()) {
                            ?>
										<?php 
                            printf(_x('%s (required)', '{Profile field} (required)', 'membership'), bp_get_the_profile_field_name());
                            ?>
									<?php 
                        } else {
                            ?>
										<?php 
                            bp_the_profile_field_name();
                            ?>
									<?php 
                        }
                        ?>
								</label>
								<?php 
                        do_action("bp_{$field_name}_errors");
                        ?>
开发者ID:vilmark,项目名称:vilmark_main,代码行数:67,代码来源:Standard.php

示例11: admin_field_html

    /**
     * Output HTML for this field type on the wp-admin Profile Fields screen.
     *
     * Must be used inside the {@link bp_profile_fields()} template loop.
     *
     * @since 2.0.0
     *
     * @param array $raw_properties Optional key/value array of permitted attributes that you want to add.
     */
    public function admin_field_html(array $raw_properties = array())
    {
        ?>

		<label for="<?php 
        bp_the_profile_field_input_name();
        ?>
" class="screen-reader-text"><?php 
        /* translators: accessibility text */
        esc_html_e('Select', 'buddypress');
        ?>
</label>
		<select <?php 
        echo $this->get_edit_field_html_elements($raw_properties);
        ?>
>
			<?php 
        bp_the_profile_field_options();
        ?>
		</select>

		<?php 
    }
开发者ID:CompositeUK,项目名称:clone.BuddyPress,代码行数:32,代码来源:class-bp-xprofile-field-type-selectbox.php

示例12: render_xprofile_field

    /**
     * Generates the HTML code for a single XProfile input field.
     *
     * Code is taken from the BuddyPress default theme file:
     * plugins/buddypress/bp-themes/bp-default/registration/register.php
     *
     * @since  1.0.1.0
     * @param  int $field_id The XProfile field ID.
     * @param  mixed $field_value Value of the field.
     * @return string The HTML code to display the field.
     */
    public function render_xprofile_field($field_id, $field_value = null, $visibility = false)
    {
        global $field;
        $field = xprofile_get_field($field_id);
        ob_start();
        ?>
		<div class="ms-form-element ms-form-element-xprofile editfield field-<?php 
        echo $field_id;
        ?>
">

			<?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()) {
                _e('(required)', 'buddypress');
            }
            ?>
</label>
				<?php 
            do_action(bp_get_the_profile_field_errors_action());
            ?>
				<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>

			<?php 
        } elseif ('selectbox' == 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()) {
                _e('(required)', 'buddypress');
            }
            ?>
</label>
				<?php 
            do_action(bp_get_the_profile_field_errors_action());
            ?>
				<select name="<?php 
            bp_the_profile_field_input_name();
            ?>
" id="<?php 
            bp_the_profile_field_input_name();
            ?>
">
					<?php 
            bp_the_profile_field_options();
            ?>
				</select>

			<?php 
        } elseif ('multiselectbox' == 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()) {
                _e('(required)', 'buddypress');
            }
            ?>
</label>
				<?php 
//.........这里部分代码省略.........
开发者ID:jsandlin85,项目名称:SkylineSports,代码行数:101,代码来源:class-ms-addon-profilefields.php

示例13: 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

示例14: admin_field_html

 /**
  * Output HTML for this field type on the wp-admin Profile Fields screen.
  *
  * Must be used inside the {@link bp_profile_fields()} template loop.
  *
  * @since 2.0.0
  *
  * @param array $raw_properties Optional key/value array of permitted attributes that you want to add.
  */
 public function admin_field_html(array $raw_properties = array())
 {
     bp_the_profile_field_options();
 }
开发者ID:swissspidy,项目名称:BuddyPress,代码行数:13,代码来源:class-bp-xprofile-field-type-checkbox.php

示例15: admin_field_html

    /**
     * Output HTML for this field type on the wp-admin Profile Fields screen.
     *
     * Must be used inside the {@link bp_profile_fields()} template loop.
     *
     * @param array $raw_properties Optional key/value array of permitted attributes that you want to add.
     * @since 2.0.0
     */
    public function admin_field_html(array $raw_properties = array())
    {
        $r = bp_parse_args($raw_properties, array('multiple' => 'multiple'));
        ?>

		<select <?php 
        echo $this->get_edit_field_html_elements($r);
        ?>
>
			<?php 
        bp_the_profile_field_options();
        ?>
		</select>

		<?php 
    }
开发者ID:jasonmcalpin,项目名称:BuddyPress,代码行数:24,代码来源:class-bp-xprofile-field-type-multiselectbox.php


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