- Timestamp:
- 05/21/2018 01:00:36 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-templates/bp-nouveau/includes/template-tags.php
r12082 r12104 2242 2242 2243 2243 foreach ( $fields as $name => $attributes ) { 2244 $classes = '';2245 2246 2244 list( $label, $required, $value, $attribute_type, $type, $class ) = array_values( $attributes ); 2247 2248 if ( $required ) {2249 $required = ' ' . _x( '(required)', 'signup required field', 'buddypress' );2250 }2251 2245 2252 2246 // Text fields are using strings, radios are using their inputs 2253 2247 $label_output = '<label for="%1$s">%2$s</label>'; 2254 2248 $id = $name; 2249 $classes = ''; 2250 2251 if ( $required ) { 2252 /* translators: Do not translate placeholders. 2 = form field name, 3 = "(required)". */ 2253 $label_output = __( '<label for="%1$s">%2$s %3$s</label>', 'buddypress' ); 2254 } 2255 2255 2256 2256 // Output the label for regular fields 2257 2257 if ( 'radio' !== $type ) { 2258 printf( $label_output, esc_attr( $name ), esc_html( sprintf( $label, $required ) ) ); 2258 if ( $required ) { 2259 printf( $label_output, esc_attr( $name ), esc_html( $label ), __( '(required)', 'buddypress' ) ); 2260 } else { 2261 printf( $label_output, esc_attr( $name ), esc_html( $label ) ); 2262 } 2259 2263 2260 2264 if ( ! empty( $value ) && is_callable( $value ) ) {
Note: See TracChangeset
for help on using the changeset viewer.