Ticket #7364: 7364-01.patch
File 7364-01.patch, 2.6 KB (added by , 8 years ago) |
---|
-
src/bp-xprofile/bp-xprofile-template.php
1358 1358 * 1359 1359 * @type int $field_id ID of the field to render. 1360 1360 * @type string $before Markup to render before the field. 1361 * @type string $before_controls markup before form controls. 1361 1362 * @type string $after Markup to render after the field. 1363 * @type string $after_controls Markup after the form controls. 1362 1364 * @type string $class Class to apply to the field markup. 1365 * @type string $label_class Class to apply for the label element. 1366 * @type string $notoggle_tag Markup element to use for notoggle tag. 1367 * @type string $notoggle_class Class to apply to the notoggle element. 1363 1368 * } 1364 1369 * @return string $retval 1365 1370 */ … … 1367 1372 1368 1373 // Parse optional arguments. 1369 1374 $r = bp_parse_args( $args, array( 1370 'field_id' => bp_get_the_profile_field_id(), 1371 'before' => '', 1372 'after' => '', 1373 'class' => 'bp-xprofile-visibility' 1375 'field_id' => bp_get_the_profile_field_id(), 1376 'before' => '', 1377 'before_controls' => '', 1378 'after' => '', 1379 'after_controls' => '', 1380 'class' => 'bp-xprofile-visibility', 1381 'label_class' => 'bp-screen-reader-text', 1382 'notoggle_tag' => 'span', 1383 'notoggle_class' => 'field-visibility-settings-notoggle', 1374 1384 ), 'xprofile_settings_visibility_select' ); 1375 1385 1376 1386 // Empty return value, filled in below if a valid field ID is found. … … 1387 1397 1388 1398 <?php if ( bp_current_user_can( 'bp_xprofile_change_field_visibility' ) ) : ?> 1389 1399 1390 <label for="<?php echo esc_attr( 'field_' . $r['field_id'] ) ; ?>_visibility" class="bp-screen-reader-text"><?php 1400 <?php echo $r['before_controls']; ?> 1401 1402 <label for="<?php echo esc_attr( 'field_' . $r['field_id'] ) ; ?>_visibility" class="<?php echo esc_attr( $r['label_class'] ); ?>"><?php 1391 1403 /* translators: accessibility text */ 1392 1404 _e( 'Select visibility', 'buddypress' ); 1393 1405 ?></label> … … 1401 1413 1402 1414 </select> 1403 1415 1416 <?php echo $r['after_controls']; ?> 1417 1404 1418 <?php else : ?> 1405 1419 1406 < span class="field-visibility-settings-notoggle"><?php bp_the_profile_field_visibility_level_label(); ?></span>1420 <<?php echo esc_html( $r['notoggle_tag'] ); ?> class="<?php echo esc_attr( $r['notoggle_class'] ); ?>"><?php bp_the_profile_field_visibility_level_label(); ?></<?php echo esc_html( $r['notoggle_tag'] ); ?>> 1407 1421 1408 1422 <?php endif; 1409 1423