diff --git a/src/bp-xprofile/bp-xprofile-admin.php b/src/bp-xprofile/bp-xprofile-admin.php
index 55c4b6d..d7f30e7 100644
a
|
b
|
function xprofile_admin_screen( $message = '', $type = 'error' ) { |
114 | 114 | |
115 | 115 | <li id="group_<?php echo esc_attr( $group->id ); ?>"> |
116 | 116 | <a href="#tabs-<?php echo esc_attr( $group->id ); ?>" class="ui-tab"> |
117 | | <?php echo esc_attr( $group->name ); ?> |
| 117 | <?php |
| 118 | /** This filter is documented in bp-xprofile/bp-xprofile-template.php */ |
| 119 | echo esc_html( apply_filters( 'bp_get_the_profile_group_name', $group->name ) ); |
| 120 | ?> |
118 | 121 | |
119 | 122 | <?php if ( !$group->can_delete ) : ?> |
120 | 123 | <?php _e( '(Primary)', 'buddypress'); ?> |
… |
… |
function xprofile_admin_screen( $message = '', $type = 'error' ) { |
130 | 133 | <?php if ( !empty( $groups ) ) : foreach ( $groups as $group ) : ?> |
131 | 134 | |
132 | 135 | <noscript> |
133 | | <h3><?php echo esc_attr( $group->name ); ?></h3> |
| 136 | <h3><?php |
| 137 | /** This filter is documented in bp-xprofile/bp-xprofile-template.php */ |
| 138 | echo esc_html( apply_filters( 'bp_get_the_profile_group_name', $group->name ) ); |
| 139 | ?></h3> |
134 | 140 | </noscript> |
135 | 141 | |
136 | 142 | <div id="tabs-<?php echo esc_attr( $group->id ); ?>" class="tab-wrapper"> |
… |
… |
function xprofile_admin_screen( $message = '', $type = 'error' ) { |
164 | 170 | |
165 | 171 | <?php if ( ! empty( $group->description ) ) : ?> |
166 | 172 | |
167 | | <p><?php echo esc_html( $group->description ); ?></p> |
| 173 | <p><?php |
| 174 | /** This filter is documented in bp-xprofile/bp-xprofile-template.php */ |
| 175 | echo esc_html( apply_filters( 'bp_get_the_profile_group_description', $group->description ) ); |
| 176 | ?></p> |
168 | 177 | |
169 | 178 | <?php endif; ?> |
170 | 179 | |
171 | 180 | <fieldset id="<?php echo esc_attr( $group->id ); ?>" class="connectedSortable field-group"> |
172 | | <legend class="screen-reader-text"><?php printf( esc_html__( 'Fields for "%s" Group', 'buddypress' ), $group->name ); ?></legend> |
| 181 | <legend class="screen-reader-text"><?php |
| 182 | /** This filter is documented in bp-xprofile/bp-xprofile-template.php */ |
| 183 | printf( esc_html__( 'Fields for "%s" Group', 'buddypress' ), apply_filters( 'bp_get_the_profile_group_name', $group->name ) ); |
| 184 | ?></legend> |
173 | 185 | |
174 | 186 | <?php |
175 | 187 | |
diff --git a/src/bp-xprofile/bp-xprofile-filters.php b/src/bp-xprofile/bp-xprofile-filters.php
index 7918dd7..55d6e1e 100644
a
|
b
|
add_filter( 'xprofile_filtered_data_value_before_save', 'trim', 2 ); |
59 | 59 | add_filter( 'xprofile_group_name_before_save', 'wp_filter_kses' ); |
60 | 60 | add_filter( 'xprofile_group_description_before_save', 'wp_filter_kses' ); |
61 | 61 | |
| 62 | add_filter( 'xprofile_group_name_before_save', 'stripslashes' ); |
| 63 | add_filter( 'xprofile_group_description_before_save', 'stripslashes' ); |
| 64 | |
62 | 65 | // Save fields |
63 | 66 | add_filter( 'xprofile_field_name_before_save', 'wp_filter_kses' ); |
64 | 67 | add_filter( 'xprofile_field_type_before_save', 'wp_filter_kses' ); |
65 | 68 | add_filter( 'xprofile_field_description_before_save', 'wp_filter_kses' ); |
66 | 69 | add_filter( 'xprofile_field_order_by_before_save', 'wp_filter_kses' ); |
| 70 | |
67 | 71 | add_filter( 'xprofile_field_is_required_before_save', 'absint' ); |
68 | 72 | add_filter( 'xprofile_field_field_order_before_save', 'absint' ); |
69 | 73 | add_filter( 'xprofile_field_option_order_before_save', 'absint' ); |
diff --git a/src/bp-xprofile/classes/class-bp-xprofile-group.php b/src/bp-xprofile/classes/class-bp-xprofile-group.php
index 29ed64d..689278a 100644
a
|
b
|
class BP_XProfile_Group { |
141 | 141 | $query = $wpdb->query( $sql ); |
142 | 142 | |
143 | 143 | // Bail if query fails |
144 | | if ( empty( $query ) || is_wp_error( $query ) ) { |
| 144 | if ( $query === false || is_wp_error( $query ) ) { |
145 | 145 | return false; |
146 | 146 | } |
147 | 147 | |