- Timestamp:
- 06/02/2024 07:12:25 PM (8 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/classes/class-bp-invitation-manager.php
r13890 r13900 373 373 * @since 5.0.0 374 374 * 375 * @see BP_Invitation::get() for a description of accepted parameters. 376 * 375 * @param array $args {@see BP_Invitation::get()}. 377 376 * @return array Located invitations. 378 377 */ … … 393 392 * @since 8.0.0 394 393 * 395 * @see BP_Invitation::get_total_count() for a description of accepted parameters. 396 * 394 * @param array $args {@see BP_Invitation::get_total_count()}. 397 395 * @return int Total number of invitations. 398 396 */ … … 413 411 * @since 5.0.0 414 412 * 415 * @see BP_Invitation::get() for a description of accepted parameters. 416 * 413 * @param array $args {@see BP_Invitation::get()}. 417 414 * @return array Located invitations. 418 415 */ … … 434 431 * @since 5.0.0 435 432 * 436 * @see BP_Invitation::get() for a description of accepted parameters. 437 * 433 * @param array $args {@see BP_Invitation::get()}. 438 434 * @return int|bool ID of first found invitation or false if none found. 439 435 */ … … 454 450 * @since 5.0.0 455 451 * 456 * @see BP_Invitation::get() for a description of accepted parameters. 457 * 452 * @param array $args {@see BP_Invitation::get()}. 458 453 * @return int|bool ID of existing request or false if none found. 459 454 */ … … 476 471 * @since 5.0.0 477 472 * 478 * @see BP_Invitation::get() for a description of 479 * accepted update/where arguments. 480 * 481 * @param array $args { 482 * Invitation characteristics. Some basic info is required to accept an invitation, 483 * because we'll need to accept all similar invitations and requests. 484 * 485 * @type int $user_id User ID of the invitee. 486 * Either 'user_id' or 'invitee_email' is required. 487 * @type string $invitee_email Email address of the invitee. 488 * Either 'user_id' or 'invitee_email' is required. 489 * @type int $item_id Item ID of the invitation to accept. 490 * @type int $secondary_item_id Optional. Secondary item ID if needed. 491 * @type string $invite_sent Optional. Defaults to only allowing the 492 * acceptance of sent invitations. 493 * @type string $date_modified Modified time in 'Y-m-d h:i:s' format, GMT. 494 * Defaults to current time if not specified. 495 * } 496 * 473 * @param array $args {BP_Invitation::get()}. 497 474 * @return int|bool Number of rows updated on success, false on failure. 498 475 */ 499 476 public function accept_invitation( $args = array() ) { 500 501 477 $r = bp_parse_args( 502 478 $args, … … 539 515 * @since 5.0.0 540 516 * 541 * @see BP_Invitation::get() for a description of 542 * accepted update/where arguments. 543 * 544 * @param array $args { 545 * Invitation characteristics. Some basic info is required to accept an invitation, 546 * because we'll need to accept all similar invitations and requests. 547 * 548 * @type int $user_id User ID of the invitee. 549 * @type int $item_id Item ID of the invitation to accept. 550 * @type int $secondary_item_id Optional. Secondary item ID if needed. 551 * @type string $date_modified Modified time in 'Y-m-d h:i:s' format, GMT. 552 * Defaults to current time if not specified. 553 * } 554 * 517 * @param array $args {BP_Invitation::get()}. 555 518 * @return bool Number of rows updated on success, false on failure. 556 519 */ 557 520 public function accept_request( $args = array() ) { 558 559 521 $r = bp_parse_args( 560 522 $args, … … 594 556 * @since 5.0.0 595 557 * 596 * @see BP_Invitation:: get() for a description of558 * @see BP_Invitation::update() for a description of 597 559 * accepted update/where arguments. 598 560 * … … 607 569 public function update_invitation( $update_args = array(), $where_args = array() ) { 608 570 $update_args['class'] = $this->class_name; 571 609 572 return BP_Invitation::update( $update_args, $where_args ); 610 573 } … … 669 632 * @since 5.0.0 670 633 * 671 * @see BP_Invitation::mark_accepted() 672 * for a description of arguments. 673 * 674 * @return bool 634 * @param int $id ID of the invitation to mark as accepted. 635 * @param array $args {@see BP_Invitation::mark_accepted()}. 636 * @return int|bool Number of rows updated on success, false on failure. 675 637 */ 676 638 public function mark_accepted_by_id( $id, $args ) { … … 685 647 * @since 5.0.0 686 648 * 687 * @ see BP_Invitation::mark_accepted_by_data()688 * for a description of arguments.649 * @param array $args {BP_Invitation::mark_accepted_by_data()}. 650 * @return int|bool Number of rows updated on success, false on failure. 689 651 */ 690 652 public function mark_accepted( $args ) { … … 700 662 * @since 5.0.0 701 663 * 702 * @see BP_Invitation::delete for a description of arguments. 703 * 664 * @param array $args {BP_Invitation::delete()}. 704 665 * @return int|bool Number of rows deleted on success, false on failure. 705 666 */ … … 717 678 * @since 5.0.0 718 679 * 719 * @see BP_Invitation::delete for a description of arguments. 720 * 680 * @param array $args {BP_Invitation::delete()}. 721 681 * @return int|bool Number of rows deleted on success, false on failure. 722 682 */ … … 737 697 */ 738 698 public function delete_all() { 739 return BP_Invitation::delete( 740 array( 741 'class' => $this->class_name, 742 ) 743 ); 699 return BP_Invitation::delete( array( 'class' => $this->class_name ) ); 744 700 } 745 701
Note: See TracChangeset
for help on using the changeset viewer.