Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // FILE core/admin/meta_box_input.php
- // MOD line 44 : added ID, works ok
- // OBS this is the main mod, will put an ID to all Fields when rendered
- echo '<div class="field field-' . $field['type'] . $required_class . '" id="'.$field['name'].'">';
- // FILE core/admin/meta_box_input.php
- // MOD line 46 : added Class for the label, the class is the same as the Div ID above, works ok
- // OBS maybe just giving an ID to the container Div above, all CSS styling would be easier...
- echo '<label class="field_label '.$field['name'].'" for="fields[' . $field['key'] . ']">' . $field['label'] . $required_label . '</label>';
- // FILE core/fields/checkbox.php
- // MOD line 62 : add ID to the input, works ok
- echo '<li><label><input type="checkbox" class="' . $field['class'] . '" name="' . $field['name'] . '" value="' . $key . '" ' . $selected . ' id="'.$key.'" />' . $value . '</label></li>';
- // FILE core/fields/color_picker.php
- // MOD line 125 : the id should be 'key' instead of 'name' - the field name is not in the $field var - as this is one of the few with default ID, i'm not sure if it's being used elsewhere
- echo '<input type="text" value="' . $field['value'] . '" class="acf_color_picker" name="' . $field['name'] . '" id="' . $field['key'] . '" />';
- // FILE core/fields/date_picker.php
- // MOD line 97 : added id - the field name is not in the $field var
- echo '<input type="text" value="' . $field['value'] . '" class="acf_datepicker" name="' . $field['name'] . '" data-date_format="' . $field['date_format'] . '" id="' . $field['key'] . '" />';
- // FILE core/fields/radio.php
- // MOD line 70 : added id to input, works ok
- echo '<li><label><input type="radio" name="' . $field['name'] . '" value="' . $key . '" ' . $selected . ' id="'.$key.'" />' . $value . '</label></li>';
- // FILE core/fields/true_false.php
- // MOD line 45 : added ID, but there's no name in the $field var, used key instead
- echo '<li><label><input type="checkbox" name="'.$field['name'].'" value="1" ' . $selected . ' id="'.$field['key'].'" />' . $field['message'] . '</label></li>';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement