BP_Invitation:更新(数组update_args美元数组()数组where_args美元数组()

更新的邀请。

描述

另请参阅

参数

update_args美元

数组(可选)要更新的字段和要更新它们的值的关联数组。if ('user_id' =>, 'class' => ')BP_Groups_Invitation_Manager”)。

默认值:数组()

where_args美元

数组(可选)列/值的关联数组,以确定应该更新哪些行。if ('item_id' =>, 'class' => ')BP_Groups_Invitation_Manager”)。

默认值:数组()

返回

(int | bool)成功时更新的行数,失败时为false。

文件:bp-core /类/ class-bp-invitation.php

Public static function update($update_args = array(), $where_args = array()) {$update = self::get_query_clause ($update_args);$where = self::get_query_clause ($where_args);/** *更新邀请之前的火。* * @since BuddyBoss 1.3.5 * * @param array $where_args描述即将被删除的邀请的列/值的关联数组。* @param array $update_args新值数组。*/ do_action('bp_invitation_before_update', $where_args, $update_args);$ retval = self:: _update(更新(“数据”),美元(“数据”),更新(“格式”)美元,美元(“格式”));//清除缓存中的匹配项。cache_args = where_args美元;$ cache_args[‘领域’]=“id”; $maybe_cached_ids = self::get( $cache_args ); foreach ( $maybe_cached_ids as $invite_id ) { wp_cache_delete( $invite_id, 'bp_invitations' ); } /** * Fires after an invitation is updated. * * @since BuddyBoss 1.3.5 * * @param array $where_args Associative array of columns/values describing * invitations about to be deleted. * @param array $update_args Array of new values. */ do_action( 'bp_invitation_after_update', $where_args, $update_args ); return $retval; }

更新日志

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

问题吗?

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