Advertisement
Guest User

Untitled

a guest
Sep 27th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. /**
  2. * Fix for empty ID bug in WPForms
  3. */
  4.  
  5. // This can be found around lines 423 - 428.
  6. $labelID = implode( ' ', $field_atts['label_id'] ); // added to a variable
  7. if ( $labelID ) { // checking if the ID is set
  8. $labelIDoutput = 'id="' . $labelID . '"'; // if so, wrap in attribute, else, don't output anything
  9. }
  10.  
  11. echo '<label for="wpforms-' . absint( $form_data['id'] ) . '-field_' . absint( $field['id'] ) . '" class="' . implode( ' ', $field_atts['label_class'] ) . '"' . $labelIDoutput . '>';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement