src/bp-core/classes/class-bp-admin.php | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/src/bp-core/classes/class-bp-admin.php b/src/bp-core/classes/class-bp-admin.php
index 5559d10ee..c670efe71 100644
a
|
b
|
class BP_Admin { |
1058 | 1058 | } |
1059 | 1059 | |
1060 | 1060 | // Grab email situations for the current post. |
1061 | | $situations = wp_list_pluck( get_the_terms( $post_id, bp_get_email_tax_type() ), 'description' ); |
1062 | | |
1063 | | // Output each situation as a list item. |
1064 | | echo '<ul><li>'; |
1065 | | echo implode( '</li><li>', $situations ); |
1066 | | echo '</li></ul>'; |
| 1061 | if(!empty(get_the_terms( $post_id, bp_get_email_tax_type() ) ) ) { |
| 1062 | |
| 1063 | $situations = wp_list_pluck( get_the_terms( $post_id, bp_get_email_tax_type() ), 'description' ); |
| 1064 | |
| 1065 | // Output each situation as a list item. |
| 1066 | echo '<ul><li>'; |
| 1067 | echo implode( '</li><li>', $situations ); |
| 1068 | echo '</li></ul>'; |
| 1069 | |
| 1070 | }else { |
| 1071 | echo '<ul>'; |
| 1072 | echo '</li>'.__('There no chosen situation','buddypress').'<li>'; |
| 1073 | echo '</ul>'; |
| 1074 | } |
1067 | 1075 | } |
1068 | 1076 | |
1069 | 1077 | /** Helpers ***************************************************************/ |