Ticket #7670: 7670-01.patch
File 7670-01.patch, 2.5 KB (added by , 7 years ago) |
---|
-
src/bp-xprofile/classes/class-bp-xprofile-field-type-datebox.php
54 54 * {@link http://dev.w3.org/html5/markup/input.html permitted attributes} 55 55 * that you want to add. 56 56 */ 57 public function edit_field_html( array $raw_properties = array() ) {57 public function edit_field_html( array $raw_properties = array(), $show_label = false ) { 58 58 59 59 // User_id is a special optional parameter that we pass to. 60 60 // {@link bp_the_profile_field_options()}. … … 80 80 'name' => bp_get_the_profile_field_input_name() . '_year' 81 81 ) ); ?> 82 82 83 <?php 84 if ( $show_label ) { 85 $bp_screen_reader_class = ''; 86 } else { 87 $bp_screen_reader_class = 'bp-screen-reader-text'; 88 } 89 ?> 90 83 91 <legend> 84 92 <?php bp_the_profile_field_name(); ?> 85 93 <?php bp_the_profile_field_required_label(); ?> … … 105 113 */ 106 114 do_action( bp_get_the_profile_field_errors_action() ); ?> 107 115 108 <label for="<?php bp_the_profile_field_input_name(); ?>_day" class="<?php echo is_admin() ? 'screen-reader-text' : 'bp-screen-reader-text';?>"><?php116 <label for="<?php bp_the_profile_field_input_name(); ?>_day" class="<?php echo is_admin() ? 'screen-reader-text' : $bp_screen_reader_class ;?>"><?php 109 117 /* translators: accessibility text */ 110 118 esc_html_e( 'Select day', 'buddypress' ); 111 119 ?></label> … … 116 124 ) ); ?> 117 125 </select> 118 126 119 <label for="<?php bp_the_profile_field_input_name(); ?>_month" class="<?php echo is_admin() ? 'screen-reader-text' : 'bp-screen-reader-text';?>"><?php127 <label for="<?php bp_the_profile_field_input_name(); ?>_month" class="<?php echo is_admin() ? 'screen-reader-text' : $bp_screen_reader_class ;?>"><?php 120 128 /* translators: accessibility text */ 121 129 esc_html_e( 'Select month', 'buddypress' ); 122 130 ?></label> … … 127 135 ) ); ?> 128 136 </select> 129 137 130 <label for="<?php bp_the_profile_field_input_name(); ?>_year" class="<?php echo is_admin() ? 'screen-reader-text' : 'bp-screen-reader-text';?>"><?php138 <label for="<?php bp_the_profile_field_input_name(); ?>_year" class="<?php echo is_admin() ? 'screen-reader-text' : $bp_screen_reader_class ;?>"><?php 131 139 /* translators: accessibility text */ 132 140 esc_html_e( 'Select year', 'buddypress' ); 133 141 ?></label>