| 1 |
<?php |
| 2 |
$class .= ' nx-template-field'; |
| 3 |
if( isset( $field['variables'] ) ) : |
| 4 |
$variables = $field['variables']; |
| 5 |
endif; |
| 6 |
?> |
| 7 |
<div id="<?php echo $name; ?>"> |
| 8 |
|
| 9 |
<div contenteditable="true" class="nx-meta-template-editable"> |
| 10 |
<?php for( $i = 0; $i < 3; $i++ ) : ?> |
| 11 |
<?php echo ! empty( $value[ $i ] ) ? $value[ $i ] . "\n<br>": "\n"; ?> |
| 12 |
<?php endfor; ?> |
| 13 |
</div> |
| 14 |
|
| 15 |
<div class="nx-meta-template-hidden-field"> |
| 16 |
<?php for( $i = 0; $i < 3; $i++ ) : ?> |
| 17 |
<input type="hidden" class="<?php echo esc_attr( $class ); ?>" name="<?php echo $name; ?>[]" value="<?php echo ! empty( $value[ $i ] ) ? $value[ $i ] : ''; ?>"> |
| 18 |
<?php endfor; ?> |
| 19 |
</div> |
| 20 |
<div class="<?php echo $name; ?>-variables"> |
| 21 |
<span class="<?php echo $name; ?>-variable-title"><?php _e( 'Variables: ', 'notificationx' ); ?></span> |
| 22 |
<?php foreach ( $variables as $variable ) { ?> |
| 23 |
<span class="nx-variable-tag"><?php echo $variable; ?></span> |
| 24 |
<?php } ?> |
| 25 |
</div> |
| 26 |
</div> |