• 知识库
    • 所有的文章
    • BuddyBoss平台
    • BuddyBoss主题
    • BuddyBoss应用
    • 乐动体育网站怎样
    • 高级设置
    • 故障排除
    • 发布说明
      • BuddyBoss平台
      • BB平台支持
      • BuddyBoss主题
      • BuddyBoss应用
      • BuddyBoss应用插件
      • 其他产品
  • 开发人员
    • 开发教程
      • Web开发
      • 应用程序开发
    • 代码引用
      • 功能
      • 钩子
      • 类
      • 方法
      • 命令
      • 应用程序法典
    • REST API
      • BuddyBoss平台
      • BuddyBoss应用
    • Github项目
  • 路线图
  • 去BuddyBoss
    联络支持
    过滤器

    • 知识库
      • 所有的文章
      • BuddyBoss平台
      • BuddyBoss主题
      • BuddyBoss应用
      • 乐动体育网站怎样
      • 高级设置
      • 故障排除
      • 发布说明
        • BuddyBoss平台
        • BB平台支持
        • BuddyBoss主题
        • BuddyBoss应用
        • BuddyBoss应用插件
        • 其他产品
    • 开发人员
      • 开发教程
        • Web开发
        • 应用程序开发
      • 代码引用
        • 功能
        • 钩子
        • 类
        • 方法
        • 命令
        • 应用程序法典
      • REST API
        • BuddyBoss平台
        • BuddyBoss应用
      • Github项目
    • 路线图
    • 去BuddyBoss
    登录
    联络支持
    过滤器
    过滤器

    内容

    • 描述
    • 参数
    • 返回
    • 源
    • 更新日志
    • 相关的
    代码引用 类 BP_REST_Account_Settings_Options_Endpoint BP_REST_Account_Settings_Options_Endpoint: update_item ()

    BP_REST_Account_Settings_Options_Endpoint:: update_item (WP_REST_Request美元的请求)

    更新帐户设置选项。

    描述

    参数

    美元的请求

    (WP_REST_Request)(必需)请求的全部细节。

    返回

    (WP_Error)| WP_REST_Response

    源

    文件:bp-settings /类/ class-bp-rest-account-settings-options-endpoint.php

    公共函数update_item($request) {$nav = $request->get_param('nav');$ =字段数组();$ =更新数组();Switch ($nav) {case 'general': $update = $this->update_general_fields($request);$ = $ this - >字段get_general_fields ();打破;Case 'notifications': $update = $this->update_notifications_fields($request);$ = $ this - >字段get_notifications_fields ();打破;Case 'profile': $update = $this->update_profile_fields($request); $fields = $this->get_profile_fields(); break; case 'invites': $updated = $this->update_invites_fields( $request ); $fields = $this->get_invites_fields(); break; case 'export': $updated = $this->update_export_fields( $request ); $fields = $this->get_export_fields(); break; case 'delete-account': $updated = $this->update_delete_account_fields( $request ); $fields = $this->get_delete_account_fields(); break; } $fields = apply_filters( 'bp_rest_account_setting_update_fields', $fields, $nav ); $updated = apply_filters( 'bp_rest_account_setting_update_message', $updated, $nav ); $fields_update = $this->update_additional_fields_for_object( $nav, $request ); if ( is_wp_error( $fields_update ) ) { return $fields_update; } $data = array(); if ( ! empty( $fields ) ) { foreach ( $fields as $field ) { $data[] = $this->prepare_response_for_collection( $this->prepare_item_for_response( $field, $request ) ); } } $retval = array( 'error' => ( isset( $updated['error'] ) ? $updated['error'] : false ), 'notices' => ( isset( $updated['notice'] ) ? $updated['notice'] : false ), 'data' => $data, ); $response = rest_ensure_response( $retval ); /** * Fires after account setting options are updated via the REST API. * * @param WP_REST_Response $response The response data. * @param WP_REST_Request $request The request sent to the API. * * @since 0.1.0 */ do_action( 'bp_rest_account_settings_options_update_item', $response, $request ); return $response; }

    展开全部源代码折叠完整的源代码

    更新日志

    更新日志
    版本 描述
    0.1.0 介绍了。

    相关的

    使用

    使用
    使用 描述
    bp-settings /类/ class-bp-rest-account-settings-options-endpoint.php:BP_REST_Account_Settings_Options_Endpoint: update_general_fields ()

    更新字段。

    bp-settings /类/ class-bp-rest-account-settings-options-endpoint.php:BP_REST_Account_Settings_Options_Endpoint: get_general_fields ()

    获取通用“登录信息”的字段。

    bp-settings /类/ class-bp-rest-account-settings-options-endpoint.php:BP_REST_Account_Settings_Options_Endpoint: update_notifications_fields ()

    更新通知。

    bp-settings /类/ class-bp-rest-account-settings-options-endpoint.php:BP_REST_Account_Settings_Options_Endpoint: get_notifications_fields ()

    获取通知“电子邮件首选项”的字段。

    bp-settings /类/ class-bp-rest-account-settings-options-endpoint.php:BP_REST_Account_Settings_Options_Endpoint: update_profile_fields ()

    更新配置文件字段。

    bp-settings /类/ class-bp-rest-account-settings-options-endpoint.php:BP_REST_Account_Settings_Options_Endpoint: get_profile_fields ()

    获取配置文件“隐私”的字段。

    bp-settings /类/ class-bp-rest-account-settings-options-endpoint.php:BP_REST_Account_Settings_Options_Endpoint: update_invites_fields ()

    更新邀请字段“组邀请”。

    bp-settings /类/ class-bp-rest-account-settings-options-endpoint.php:BP_REST_Account_Settings_Options_Endpoint: get_invites_fields ()

    获取邀请“组邀请”的字段。

    bp-settings /类/ class-bp-rest-account-settings-options-endpoint.php:BP_REST_Account_Settings_Options_Endpoint: update_export_fields ()

    更新“Export Data”字段。

    bp-settings /类/ class-bp-rest-account-settings-options-endpoint.php:BP_REST_Account_Settings_Options_Endpoint: get_export_fields ()

    获取导出“导出数据”的字段。

    bp-settings /类/ class-bp-rest-account-settings-options-endpoint.php:BP_REST_Account_Settings_Options_Endpoint: update_delete_account_fields ()

    删除帐户“导出数据”。

    bp-settings /类/ class-bp-rest-account-settings-options-endpoint.php:BP_REST_Account_Settings_Options_Endpoint: get_delete_account_fields ()

    获取删除帐户的字段“删除帐户”。

    bp-settings /类/ class-bp-rest-account-settings-options-endpoint.php:BP_REST_Account_Settings_Options_Endpoint: prepare_item_for_response ()

    准备作为对象返回的帐户设置数据。

    bp-settings /类/ class-bp-rest-account-settings-options-endpoint.php:bp_rest_account_settings_options_update_item

    通过REST API更新帐户设置选项后触发。

    展示另外9种用途 隐藏更多的使用

    问题吗?

    我们总是很乐意帮助您解决代码或其他问题!搜索我们的开发人员文档,联络支持,或与我们联系销售团队.

    ©2021
    Baidu