| Conditions | 1 |
| Paths | 1 |
| Total Lines | 21 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | public function template() { |
||
| 13 | ?> |
||
| 14 | <# if (_.isEmpty(options)) { #> |
||
| 15 | <em><?php esc_html_e( 'no options', 'carbon-fields' ); ?></em> |
||
| 16 | <# } else { #> |
||
| 17 | <div class="carbon-radio-image-list"> |
||
| 18 | <# _.each(options, function(option) { #> |
||
| 19 | <div class="carbon-radio-image-item"> |
||
| 20 | <label> |
||
| 21 | <input type="radio" name="{{{ name }}}" value="{{ option.value }}" {{{ option.value == value ? 'checked="checked"' : '' }}} /> |
||
| 22 | |||
| 23 | <figure class="carbon-radio-image-holder"> |
||
| 24 | <img src="{{{ option.name }}}" /> |
||
| 25 | </figure> |
||
| 26 | </label> |
||
| 27 | </div> |
||
| 28 | <# }) #> |
||
| 29 | </div> |
||
| 30 | <# } #> |
||
| 31 | <?php |
||
| 32 | } |
||
| 33 | } |
||
| 34 |