| @@ -788,18 +788,20 @@ | ||
| 788 | 788 | * |
| 789 | 789 | * @return void |
| 790 | 790 | */ |
| 791 | 791 | protected function add_user_info_to_html_table( &$content ) { |
| 792 | - if ( $this->include_user_info ) { | |
| 793 | - foreach ( $this->entry_values->get_user_info() as $user_info ) { | |
| 794 | - $value_args = array( | |
| 795 | - 'label' => $user_info['label'], | |
| 796 | - 'value' => $user_info['value'], | |
| 797 | - 'field_type' => 'none', | |
| 798 | - ); | |
| 792 | + if ( ! $this->include_user_info ) { | |
| 793 | + return; | |
| 794 | + } | |
| 799 | 795 | |
| 800 | - $this->add_html_row( $value_args, $content ); | |
| 801 | - } | |
| 796 | + foreach ( $this->entry_values->get_user_info() as $user_info ) { | |
| 797 | + $value_args = array( | |
| 798 | + 'label' => $user_info['label'], | |
| 799 | + 'value' => $user_info['value'], | |
| 800 | + 'field_type' => 'none', | |
| 801 | + ); | |
| 802 | + | |
| 803 | + $this->add_html_row( $value_args, $content ); | |
| 802 | 804 | } |
| 803 | 805 | } |
| 804 | 806 | |
| 805 | 807 | /** |
| @@ -811,12 +813,14 @@ | ||
| 811 | 813 | * |
| 812 | 814 | * @return void |
| 813 | 815 | */ |
| 814 | 816 | protected function add_user_info_to_plain_text_content( &$content ) { |
| 815 | - if ( $this->include_user_info ) { | |
| 816 | - foreach ( $this->entry_values->get_user_info() as $user_info ) { | |
| 817 | - $this->add_plain_text_row( $user_info['label'], $user_info['value'], $content ); | |
| 818 | - } | |
| 817 | + if ( ! $this->include_user_info ) { | |
| 818 | + return; | |
| 819 | + } | |
| 820 | + | |
| 821 | + foreach ( $this->entry_values->get_user_info() as $user_info ) { | |
| 822 | + $this->add_plain_text_row( $user_info['label'], $user_info['value'], $content ); | |
| 819 | 823 | } |
| 820 | 824 | } |
| 821 | 825 | |
| 822 | 826 | /** |