Changeset 10481 for trunk/src/bp-core/classes/class-bp-email.php
- Timestamp:
- 01/28/2016 07:26:34 PM (10 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-core/classes/class-bp-email.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/classes/class-bp-email.php
r10470 r10481 520 520 * 521 521 * @param string|array|int|WP_User $bcc_address Either a email address, user ID, WP_User object, 522 * or an array contain g the address and name.522 * or an array containing any combination of the above. 523 523 * @param string $name Optional. If $bcc_address is a string, this is the recipient's name. 524 524 * @return BP_Email 525 525 */ 526 526 public function set_bcc( $bcc_address, $name = '' ) { 527 $bcc = array( new BP_Email_Recipient( $bcc_address, $name ) ); 527 $bcc = array(); 528 529 if ( is_array( $bcc_address ) ) { 530 foreach ( $bcc_address as $address ) { 531 $bcc[] = new BP_Email_Recipient( $address ); 532 } 533 534 } else { 535 $bcc = array( new BP_Email_Recipient( $bcc_address, $name ) ); 536 } 528 537 529 538 /** … … 534 543 * @param BP_Email_Recipient[] $bcc BCC recipients. 535 544 * @param string|array|int|WP_User $bcc_address Either a email address, user ID, WP_User object, 536 * or an array contain g the address and name.545 * or an array containing any combination of the above. 537 546 * @param string $name Optional. If $bcc_address is a string, this is the recipient's name. 538 547 * @param BP_Email $this Current instance of the email type class. … … 555 564 * 556 565 * @param string|array|int|WP_User $cc_address Either a email address, user ID, WP_User object, 557 * or an array contain g the address and name.566 * or an array containing any combination of the above. 558 567 * @param string $name Optional. If $cc_address is a string, this is the recipient's name. 559 568 * @return BP_Email 560 569 */ 561 570 public function set_cc( $cc_address, $name = '' ) { 562 $cc = array( new BP_Email_Recipient( $cc_address, $name ) ); 571 $cc = array(); 572 573 if ( is_array( $cc_address ) ) { 574 foreach ( $cc_address as $address ) { 575 $cc[] = new BP_Email_Recipient( $address ); 576 } 577 578 } else { 579 $cc = array( new BP_Email_Recipient( $cc_address, $name ) ); 580 } 563 581 564 582 /** … … 569 587 * @param BP_Email_Recipient[] $cc CC recipients. 570 588 * @param string|array|int|WP_User $cc_address Either a email address, user ID, WP_User object, 571 * or an array contain g the address and name.589 * or an array containing any combination of the above. 572 590 * @param string $name Optional. If $cc_address is a string, this is the recipient's name. 573 591 * @param BP_Email $this Current instance of the email type class. … … 658 676 * @since 2.5.0 659 677 * 660 * @param string|array|int|WP_User $email_address Either a email address, user ID, WP_User object, 661 * or an array containg the address and name. 678 * @param string|array|int|WP_User $email_address Either a email address, user ID, or WP_User object. 662 679 * @param string $name Optional. If $email_address is a string, this is the recipient's name. 663 680 * @return BP_Email … … 672 689 * 673 690 * @param BP_Email_Recipient $from Sender details. 674 * @param string|array|int|WP_User $email_address Either a email address, user ID, WP_User object, 675 * or an array containg the address and name. 691 * @param string|array|int|WP_User $email_address Either a email address, user ID, or WP_User object. 676 692 * @param string $name Optional. If $email_address is a string, this is the recipient's name. 677 693 * @param BP_Email $this Current instance of the email type class. … … 727 743 * 728 744 * @param string|array|int|WP_User $email_address Either a email address, user ID, WP_User object, 729 * or an array contain g the address and name.745 * or an array containing any combination of the above. 730 746 * @param string $name Optional. If $email_address is a string, this is the recipient's name. 731 747 * @return BP_Email … … 741 757 * @param BP_Email_Recipient $reply_to "Reply to" recipient. 742 758 * @param string|array|int|WP_User $email_address Either a email address, user ID, WP_User object, 743 * or an array contain g the address and name.759 * or an array containing any combination of the above. 744 760 * @param string $name Optional. If $email_address is a string, this is the recipient's name. 745 761 * @param BP_Email $this Current instance of the email type class. … … 816 832 * 817 833 * @param string|array|int|WP_User $to_address Either a email address, user ID, WP_User object, 818 * or an array contain g the address and name.834 * or an array containing any combination of the above. 819 835 * @param string $name Optional. If $to_address is a string, this is the recipient's name. 820 836 * @return BP_Email 821 837 */ 822 838 public function set_to( $to_address, $name = '' ) { 823 $to = array( new BP_Email_Recipient( $to_address, $name ) ); 839 $to = array(); 840 841 if ( is_array( $to_address ) ) { 842 foreach ( $to_address as $address ) { 843 $to[] = new BP_Email_Recipient( $address ); 844 } 845 846 } else { 847 $to = array( new BP_Email_Recipient( $to_address, $name ) ); 848 } 824 849 825 850 /**
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)