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

PHP bp_unserialize_profile_field函数代码示例

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

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



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

示例1: xprofile_format_profile_field

/**
 * Formats a profile field according to its type. [ TODO: Should really be moved to filters ]
 *
 * @package BuddyPress Core
 * @param string $field_type The type of field: datebox, selectbox, textbox etc
 * @param string $field_value The actual value
 * @return string|bool The formatted value, or false if value is empty
 */
function xprofile_format_profile_field($field_type, $field_value)
{
    if (empty($field_value)) {
        return false;
    }
    $field_value = bp_unserialize_profile_field($field_value);
    if ('datebox' != $field_type) {
        $content = $field_value;
        $field_value = str_replace(']]>', ']]>', $content);
    }
    return xprofile_filter_format_field_value_by_type(stripslashes_deep($field_value), $field_type);
}
开发者ID:kosir,项目名称:thatcamp-org,代码行数:20,代码来源:bp-xprofile-functions.php


示例2: xprofile_format_profile_field

/**
 * Formats a profile field according to its type. [ TODO: Should really be moved to filters ]
 *
 * @package BuddyPress Core
 * @param $field_type The type of field: datebox, selectbox, textbox etc
 * @param $field_value The actual value
 * @uses bp_format_time() Formats a time value based on the NXTClass date format setting
 * @return $field_value The formatted value
 */
function xprofile_format_profile_field($field_type, $field_value)
{
    if (!isset($field_value) || empty($field_value)) {
        return false;
    }
    $field_value = bp_unserialize_profile_field($field_value);
    if ('datebox' == $field_type) {
        $field_value = bp_format_time($field_value, true);
    } else {
        $content = $field_value;
        $field_value = str_replace(']]>', ']]>', $content);
    }
    return stripslashes_deep($field_value);
}
开发者ID:nxtclass,项目名称:NXTClass,代码行数:23,代码来源:bp-xprofile-functions.php


示例3: bp_get_the_profile_field_edit_value

/**
 * Returns the XProfile field edit value.
 *
 * @since 1.1.0
 *
 * @return mixed|void
 */
function bp_get_the_profile_field_edit_value()
{
    global $field;
    /**
     * Check to see if the posted value is different, if it is re-display this
     * value as long as it's not empty and a required field.
     */
    if (!isset($field->data)) {
        $field->data = new stdClass();
    }
    if (!isset($field->data->value)) {
        $field->data->value = '';
    }
    if (isset($_POST['field_' . $field->id]) && $field->data->value != $_POST['field_' . $field->id]) {
        if (!empty($_POST['field_' . $field->id])) {
            $field->data->value = $_POST['field_' . $field->id];
        } else {
            $field->data->value = '';
        }
    }
    $field_value = isset($field->data->value) ? bp_unserialize_profile_field($field->data->value) : '';
    /**
     * Filters the XProfile field edit value.
     *
     * @since 1.1.0
     *
     * @param string $field_value Current field edit value.
     * @param string $type        Type for the profile field.
     * @param int    $id          ID for the profile field.
     */
    return apply_filters('bp_get_the_profile_field_edit_value', $field_value, $field->type, $field->id);
}
开发者ID:CompositeUK,项目名称:clone.BuddyPress,代码行数:39,代码来源:bp-xprofile-template.php


示例4: bp_get_the_profile_field_edit_value

function bp_get_the_profile_field_edit_value()
{
    global $field;
    /**
     * Check to see if the posted value is different, if it is re-display this
     * value as long as it's not empty and a required field.
     */
    if (!isset($field->data->value)) {
        $field->data->value = '';
    }
    if (isset($_POST['field_' . $field->id]) && $field->data->value != $_POST['field_' . $field->id]) {
        if (!empty($_POST['field_' . $field->id])) {
            $field->data->value = $_POST['field_' . $field->id];
        } else {
            $field->data->value = '';
        }
    }
    $field_value = isset($field->data->value) ? bp_unserialize_profile_field($field->data->value) : '';
    return apply_filters('bp_get_the_profile_field_edit_value', $field_value, $field->type, $field->id);
}
开发者ID:newington,项目名称:buddypress,代码行数:20,代码来源:bp-xprofile-template.php


示例5: bp_get_the_profile_field_value

function bp_get_the_profile_field_value()
{
    global $field;
    $field->data->value = bp_unserialize_profile_field($field->data->value);
    return apply_filters('bp_get_the_profile_field_value', $field->data->value, $field->type, $field->id);
}
开发者ID:alvaropereyra,项目名称:shrekcms,代码行数:6,代码来源:bp-xprofile-templatetags.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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