SHOW:
|
|
- or go back to the newest paste.
| 1 | - | /* |
| 1 | + | <?php |
| 2 | - | Theme Name: DeepFocus |
| 2 | + | |
| 3 | - | Theme URI: http://www.elegantthemes.com/gallery/ |
| 3 | + | // FILE core/admin/meta_box_input.php |
| 4 | - | Version: 2.2 |
| 4 | + | // MOD line 44 : added ID, works ok |
| 5 | - | Description: 2 Column theme from Elegant Themes |
| 5 | + | // OBS this is the main mod, will put an ID to all Fields when rendered |
| 6 | - | Author: Elegant Themes |
| 6 | + | echo '<div class="field field-' . $field['type'] . $required_class . '" id="'.$field['name'].'">'; |
| 7 | - | Author URI: http://www.elegantthemes.com |
| 7 | + | |
| 8 | - | */ |
| 8 | + | // FILE core/admin/meta_box_input.php |
| 9 | // MOD line 46 : added Class for the label, the class is the same as the Div ID above, works ok | |
| 10 | // OBS maybe just giving an ID to the container Div above, all CSS styling would be easier... | |
| 11 | - | /*------------------------------------------------*/ |
| 11 | + | echo '<label class="field_label '.$field['name'].'" for="fields[' . $field['key'] . ']">' . $field['label'] . $required_label . '</label>'; |
| 12 | - | /*-----------------[RESET]------------------------*/ |
| 12 | + | |
| 13 | - | /*------------------------------------------------*/ |
| 13 | + | |
| 14 | // FILE core/fields/checkbox.php | |
| 15 | - | /* http://meyerweb.com/eric/tools/css/reset/ */ |
| 15 | + | // MOD line 62 : add ID to the input, works ok |
| 16 | - | /* v1.0 | 20080212 */ |
| 16 | + | echo '<li><label><input type="checkbox" class="' . $field['class'] . '" name="' . $field['name'] . '" value="' . $key . '" ' . $selected . ' id="'.$key.'" />' . $value . '</label></li>'; |
| 17 | ||
| 18 | - | html, body, div, span, applet, object, iframe, |
| 18 | + | |
| 19 | - | h1, h2, h3, h4, h5, h6, p, blockquote, pre, |
| 19 | + | // FILE core/fields/color_picker.php |
| 20 | - | a, abbr, acronym, address, big, cite, code, |
| 20 | + | // 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 |
| 21 | - | del, dfn, em, font, img, ins, kbd, q, s, samp, |
| 21 | + | echo '<input type="text" value="' . $field['value'] . '" class="acf_color_picker" name="' . $field['name'] . '" id="' . $field['key'] . '" />'; |
| 22 | - | small, strike, strong, sub, sup, tt, var, |
| 22 | + | |
| 23 | - | b, u, i, center, |
| 23 | + | |
| 24 | - | dl, dt, dd, ol, ul, li, |
| 24 | + | // FILE core/fields/date_picker.php |
| 25 | - | fieldset, form, label, legend { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; }
|
| 25 | + | // MOD line 97 : added id - the field name is not in the $field var |
| 26 | echo '<input type="text" value="' . $field['value'] . '" class="acf_datepicker" name="' . $field['name'] . '" data-date_format="' . $field['date_format'] . '" id="' . $field['key'] . '" />'; | |
| 27 | - | body { line-height: 1; }
|
| 27 | + | |
| 28 | - | ol, ul { list-style: none; }
|
| 28 | + | |
| 29 | - | blockquote, q { quotes: none; }
|
| 29 | + | // FILE core/fields/radio.php |
| 30 | // MOD line 70 : added id to input, works ok | |
| 31 | - | blockquote:before, blockquote:after,q:before, q:after { content: ''; content: none; }
|
| 31 | + | echo '<li><label><input type="radio" name="' . $field['name'] . '" value="' . $key . '" ' . $selected . ' id="'.$key.'" />' . $value . '</label></li>'; |
| 32 | ||
| 33 | - | /* remember to define focus styles! */ |
| 33 | + | |
| 34 | - | :focus { outline: 0; }
|
| 34 | + | // FILE core/fields/true_false.php |
| 35 | // MOD line 45 : added ID, but there's no name in the $field var, used key instead | |
| 36 | - | /* remember to highlight inserts somehow! */ |
| 36 | + | echo '<li><label><input type="checkbox" name="'.$field['name'].'" value="1" ' . $selected . ' id="'.$field['key'].'" />' . $field['message'] . '</label></li>'; |