BP_Signup::update( array $args = array() )
Update the meta for a signup.
Description
This is the way we use to "trace" the last date an activation email was sent and how many times activation was sent.
Parameters
- $args
-
(Optional) Array of arguments for the signup update.
- 'signup_id'
(int) User signup ID. - 'meta'
(array) Meta to update.
Default value: array()
- 'signup_id'
Return
(int) The signup id.
Source
File: bp-members/classes/class-bp-signup.php
547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 | public static function update( $args = array () ) { global $wpdb ; $r = bp_parse_args( $args , array ( 'signup_id' => 0, 'meta' => array (), ), 'bp_core_signups_update_args' ); if ( empty ( $r [ 'signup_id' ] ) || empty ( $r [ 'meta' ] ) ) { return false; } $wpdb ->update( // Signups table. buddypress()->members->table_name_signups, // Data to update. array ( 'meta' => serialize( $r [ 'meta' ] ), ), // WHERE. array ( 'signup_id' => $r [ 'signup_id' ], ), // Data sanitization format. array ( '%s' , ), // WHERE sanitization format. array ( '%d' , ) ); /** * Filters the signup ID which received a meta update. * * @since BuddyPress 2.0.0 * * @param int $value The signup ID. */ return apply_filters( 'bp_core_signups_update' , $r [ 'signup_id' ] ); } |
Changelog
Version | Description |
---|---|
BuddyPress 2.0.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.