• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP bp_the_profile_field_edit_value函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了bp_the_profile_field_edit_value函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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/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


示例3: 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 BuddyPress (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']);
        }
        $html = $this->get_edit_field_html_elements(array_merge(array('cols' => 40, 'rows' => 5), $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());
        ?>
		<textarea <?php 
        echo $html;
        ?>
><?php 
        bp_the_profile_field_edit_value();
        ?>
</textarea>
	<?php 
    }
开发者ID:kd5ytx,项目名称:Empirical-Wordpress,代码行数:40,代码来源:bp-xprofile-classes.php


示例4: _e

                            if (bp_get_the_profile_field_is_required()) {
                                _e('(required)', 'buddypress');
                            }
                            ?>
</label>
									<?php 
                            do_action('bp_' . bp_get_the_profile_field_input_name() . '_errors');
                            ?>
									<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 
                        }
                        ?>

								<?php 
                        if ('selectbox' == bp_get_the_profile_field_type()) {
                            ?>

									<label for="<?php 
                            bp_the_profile_field_input_name();
                            ?>
"><?php 
开发者ID:igniterealtime,项目名称:community-plugins,代码行数:31,代码来源:register.php


示例5: render_bp_field

    /**
     * Renders Buddypress profile field
     *
     * @param object $bp_field.
     * @param boolean $returm.
     * @author peshkov@UD
     */
    protected function render_bp_field($bp_field, $return = false)
    {
        global $field;
        $field = $bp_field;
        $type = bp_get_the_profile_field_type();
        ob_start();
        switch ($type) {
            case 'textbox':
                ?>
        <div class="bp textbox">
        <input type="text" name="bp[<?php 
                bp_the_profile_field_input_name();
                ?>
]" id="<?php 
                bp_the_profile_field_input_name();
                ?>
" value="<?php 
                bp_the_profile_field_edit_value();
                ?>
" <?php 
                if (bp_get_the_profile_field_is_required()) {
                    ?>
aria-required="true"<?php 
                }
                ?>
/>
        </div>
        <?php 
                break;
            case 'textarea':
                ?>
        <div class="bp textarea">
        <textarea rows="5" cols="40" name="bp[<?php 
                bp_the_profile_field_input_name();
                ?>
]" id="<?php 
                bp_the_profile_field_input_name();
                ?>
" <?php 
                if (bp_get_the_profile_field_is_required()) {
                    ?>
aria-required="true"<?php 
                }
                ?>
><?php 
                bp_the_profile_field_edit_value();
                ?>
</textarea>
        </div>
        <?php 
                break;
            case 'selectbox':
                ?>
        <div class="bp selectbox">
        <select name="bp[<?php 
                bp_the_profile_field_input_name();
                ?>
]" id="<?php 
                bp_the_profile_field_input_name();
                ?>
" <?php 
                if (bp_get_the_profile_field_is_required()) {
                    ?>
aria-required="true"<?php 
                }
                ?>
>
          <?php 
                bp_the_profile_field_options();
                ?>
        </select>
        </div>
        <?php 
                break;
            case 'multiselectbox':
                $input_type = bp_get_the_profile_field_input_name();
                preg_match('/field_[0-9]+/', $input_type, $matches);
                if ($matches) {
                    $input_type = $matches[0];
                }
                ?>
        <div class="bp multiselectbox">
        <select name="bp[<?php 
                echo $input_type;
                ?>
][]" id="<?php 
                echo $input_type;
                ?>
" multiple="multiple" <?php 
                if (bp_get_the_profile_field_is_required()) {
                    ?>
aria-required="true"<?php 
                }
//.........这里部分代码省略.........
开发者ID:Finzy,项目名称:stageDB,代码行数:101,代码来源:buddypress.php


示例6: bp_ajax_register_form_function


//.........这里部分代码省略.........
                    while (bp_profile_fields()) {
                        bp_the_profile_field();
                        ?>

							<div class="ctrlHolder fullwidth">

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

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


示例7: while

		<?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>

				<?php endif; ?>

				<?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() ) : ?><?php _e( '(required)', 'buddypress' ) ?><?php endif; ?></label>
					<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 endif; ?>

				<?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() ) : ?><?php _e( '(required)', 'buddypress' ) ?><?php endif; ?></label>
开发者ID:n-sane,项目名称:zaroka,代码行数:30,代码来源:edit.php


示例8: _render_buddypress_account_extra_fields

    /**
     * Renders BuddyPress account extra fields.
     *
     * @since 3.5
     *
     * @access private
     */
    private function _render_buddypress_account_extra_fields()
    {
        if (!bp_is_active('xprofile')) {
            return;
        }
        do_action('bp_before_signup_profile_fields');
        ?>
<div class="register-section" id="profile-details-section">
			<h4><?php 
        _e('Profile Details', 'membership');
        ?>
</h4>

			<?php 
        if (bp_has_profile('profile_group_id=1&hide_empty_fields=0')) {
            ?>
				<?php 
            while (bp_profile_groups()) {
                bp_the_profile_group();
                ?>
					<?php 
                while (bp_profile_fields()) {
                    bp_the_profile_field();
                    ?>

						<?php 
                    $field_name = bp_get_the_profile_field_input_name();
                    ?>
						<?php 
                    $field_name_esc = esc_attr($field_name);
                    ?>
						<?php 
                    $field_type = bp_get_the_profile_field_type();
                    ?>

						<div class="editfield">
							<?php 
                    if ('textbox' == $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");
                        ?>
								<input type="text" name="<?php 
                        echo $field_name_esc;
                        ?>
" id="<?php 
                        echo $field_name_esc;
                        ?>
" value="<?php 
                        bp_the_profile_field_edit_value();
                        ?>
" />
							<?php 
                    }
                    ?>

							<?php 
                    if ('textarea' == $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 
//.........这里部分代码省略.........
开发者ID:vilmark,项目名称:vilmark_main,代码行数:101,代码来源:Standard.php


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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP bp_the_profile_field_id函数代码示例发布时间:2022-05-24
下一篇:
PHP bp_the_profile_field_description函数代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap