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

PHP bp_get_the_profile_field_is_required函数代码示例

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

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



在下文中一共展示了bp_get_the_profile_field_is_required函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: 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';
            }
            $field = new BP_XProfile_Field(bp_get_the_profile_field_id());
            $options = $field->get_children(true);
            if (count($options) > 0) {
                $step = 1 / pow(10, (int) $options[0]->name);
            } else {
                $step = 0.01;
            }
            $html = $this->get_edit_field_html_elements(array_merge(array('type' => 'number', 'step' => $step, 'value' => bp_get_the_profile_field_edit_value()), $raw_properties));
            $label = sprintf('<label for="%s">%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.
            ?>
            <input <?php 
            echo $html;
            ?>
 />
        <?php 
        }
开发者ID:baden03,项目名称:buddypress-xprofile-custom-fields-type,代码行数:30,代码来源:Bxcft_Field_Type_DecimalNumber.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/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


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


示例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/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


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


示例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';
            }
            $html = $this->get_edit_field_html_elements(array_merge(array('type' => 'url', 'value' => bp_get_the_profile_field_edit_value()), $raw_properties));
            $label = sprintf('<label for="%s">%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.
            ?>
            <input <?php 
            echo $html;
            ?>
 />
        <?php 
        }
开发者ID:baden03,项目名称:buddypress-xprofile-custom-fields-type,代码行数:23,代码来源:Bxcft_Field_Type_Web.php


示例8: 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';
            }
            $field = new BP_XProfile_Field(bp_get_the_profile_field_id());
            $args = array('type' => 'number', 'value' => bp_get_the_profile_field_edit_value());
            $options = $field->get_children(true);
            if ($options) {
                foreach ($options as $o) {
                    if (strpos($o->name, 'min_') !== false) {
                        $args['min'] = str_replace('min_', '', $o->name);
                    }
                    if (strpos($o->name, 'max_') !== false) {
                        $args['max'] = str_replace('max_', '', $o->name);
                    }
                }
            }
            $html = $this->get_edit_field_html_elements(array_merge($args, $raw_properties));
            $label = sprintf('<label for="%s">%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.
            ?>
            <input <?php 
            echo $html;
            ?>
 />
        <?php 
        }
开发者ID:baden03,项目名称:buddypress-xprofile-custom-fields-type,代码行数:36,代码来源:Bxcft_Field_Type_NumberMinMax.php


示例9: bp_get_the_profile_field_required_label

/**
 * Return the 'required' markup in extended profile field labels.
 *
 * @since 2.4.0
 *
 * @return string HTML for the required label.
 */
function bp_get_the_profile_field_required_label()
{
    $retval = '';
    if (bp_get_the_profile_field_is_required()) {
        $translated_string = __('(required)', 'buddypress');
        $retval = ' <span class="bp-required-field-label">';
        $retval .= apply_filters('bp_get_the_profile_field_required_label', $translated_string, bp_get_the_profile_field_id());
        $retval .= '</span>';
    }
    return $retval;
}
开发者ID:CompositeUK,项目名称:clone.BuddyPress,代码行数:18,代码来源:bp-xprofile-template.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';
            }
            $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


示例11: get_edit_field_html_elements

 /**
  * Get a sanitised and escaped string of the edit field's HTML elements and attributes.
  *
  * Must be used inside the {@link bp_profile_fields()} template loop.
  * This method was intended to be static but couldn't be because php.net/lsb/ requires PHP >= 5.3.
  *
  * @param array $properties Optional key/value array of attributes for this edit field.
  * @return string
  * @since BuddyPress (2.0.0)
  */
 protected function get_edit_field_html_elements(array $properties = array())
 {
     $properties = array_merge(array('id' => bp_get_the_profile_field_input_name(), 'name' => bp_get_the_profile_field_input_name()), $properties);
     if (bp_get_the_profile_field_is_required()) {
         $properties['aria-required'] = 'true';
     }
     $html = '';
     $properties = (array) apply_filters('bp_xprofile_field_edit_html_elements', $properties, get_class($this));
     foreach ($properties as $name => $value) {
         $html .= sprintf('%s="%s" ', sanitize_key($name), esc_attr($value));
     }
     return $html;
 }
开发者ID:kd5ytx,项目名称:Empirical-Wordpress,代码行数:23,代码来源:bp-xprofile-classes.php


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


示例13: bp_the_profile_field_is_required

function bp_the_profile_field_is_required()
{
    echo bp_get_the_profile_field_is_required();
}
开发者ID:newington,项目名称:buddypress,代码行数:4,代码来源:bp-xprofile-template.php


示例14: 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('id' => $input_name, '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 <?php 
            echo $html;
            ?>
 readonly>
						<input type="button" id="billing_postcode_search" value="우편번호 찾기" class="btn" onclick="openDaumPostcode();" style="height: 40px;">

    <div id="layerAddress" style="display:none;border:5px solid;position:fixed;width:500px;height:500px;left:50%;margin-left:-250px;top:50%;margin-top:-250px;overflow:hidden">
        <img src="http://i1.daumcdn.net/localimg/localimages/07/postcode/320/close.png" id="btnCloseLayer" style="cursor:pointer;position:absolute;right:-3px;top:-3px" onclick="closeDaumPostcode()">
    </div>

    <script>
        // 우편번호 찾기 화면을 넣을 element
        var element = document.getElementById('layerAddress');

        function closeDaumPostcode() {
            // iframe을 넣은 element를 안보이게 한다.
            element.style.display = 'none';
        }

        function openDaumPostcode() {
            new daum.Postcode({
                oncomplete: function(data) {
                    // 팝업에서 검색결과 항목을 클릭했을때 실행할 코드를 작성하는 부분. 우편번호와 주소 정보를 해당 필드에 넣고, 커서를 상세주소 필드로 이동한다.
                    document.getElementById("<?php 
            echo $input_name;
            ?>
").value = data.address;
                    //document.getElementById("zip1").value = data.postcode1;
                    //document.getElementById("zip2").value = data.postcode2;
                    //document.getElementById("addr1").value = data.address;
                    //document.getElementById("addr2").focus();
                // iframe을 넣은 element를 안보이게 한다.
                    element.style.display = 'none';
                },
                width : '100%',
                height : '100%'
            }).embed(element);

            // iframe을 넣은 element를 보이게 한다.
            element.style.display = 'block';
        }
    </script>

       <?php 
        }
开发者ID:ncross42,项目名称:dobalance,代码行数:67,代码来源:Bdd_Field_Type_Address.php


示例15: bp_ajax_register_form_function


//.........这里部分代码省略.........
        do_action('bp_before_signup_profile_fields');
        ?>

					<div class="register-section ajax-register-section" id="profile-details-section">

						<?php 
        /* Use the profile field loop to render input fields for the 'base' profile field group */
        ?>
						<?php 
        if (bp_is_active('xprofile')) {
            if (bp_has_profile('profile_group_id=1&hide_empty_fields=0')) {
                while (bp_profile_groups()) {
                    bp_the_profile_group();
                    ?>

						<?php 
                    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();
开发者ID:hscale,项目名称:webento,代码行数:67,代码来源:bp-ajax.registration.php


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


示例17: _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


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


示例19: get_edit_field_html_elements

 /**
  * Get a sanitised and escaped string of the edit field's HTML elements and attributes.
  *
  * Must be used inside the {@link bp_profile_fields()} template loop.
  * This method was intended to be static but couldn't be because php.net/lsb/ requires PHP >= 5.3.
  *
  * @since 2.0.0
  *
  * @param array $properties Optional key/value array of attributes for this edit field.
  *
  * @return string
  */
 protected function get_edit_field_html_elements(array $properties = array())
 {
     $r = bp_parse_args($properties, array('id' => bp_get_the_profile_field_input_name(), 'name' => bp_get_the_profile_field_input_name()));
     if (bp_get_the_profile_field_is_required()) {
         $r['aria-required'] = 'true';
     }
     /**
      * Filters the edit html elements and attributes.
      *
      * @since 2.0.0
      *
      * @param array  $r     Array of parsed arguments.
      * @param string $value Class name for the current class instance.
      */
     $r = (array) apply_filters('bp_xprofile_field_edit_html_elements', $r, get_class($this));
     return bp_get_form_field_attributes(sanitize_key(bp_get_the_profile_field_name()), $r);
 }
开发者ID:sourabh-mehra,项目名称:ASVYS-Charity-Foundation,代码行数:29,代码来源:class-bp-xprofile-field-type.php


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



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP bp_get_the_profile_field_name函数代码示例发布时间:2022-05-24
下一篇:
PHP bp_get_the_profile_field_input_name函数代码示例发布时间: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