first commit
This commit is contained in:
24
vendor/wpcfto/metaboxes/fields/codemirror.php
vendored
Normal file
24
vendor/wpcfto/metaboxes/fields/codemirror.php
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* CodeMirror Field Template for WPCFTO.
|
||||
*
|
||||
* Variables available:
|
||||
* - $field
|
||||
* - $field_id
|
||||
* - $field_value
|
||||
* - $field_label
|
||||
* - $field_name
|
||||
* - $section_name
|
||||
*/
|
||||
|
||||
// This is a string path like: data['variation']['fields']['my_field']
|
||||
$field_ref = "data['{$section_name}']['fields']['{$field_name}']";
|
||||
?>
|
||||
|
||||
<wpcfto_codemirror
|
||||
:fields='<?php echo esc_attr($field_ref); ?>'
|
||||
:field_label='<?php echo esc_attr($field_label); ?>'
|
||||
:field_name="'<?php echo esc_js($field_name); ?>'"
|
||||
:field_id="'<?php echo esc_js($field_id); ?>'"
|
||||
:field_value="'<?php echo esc_js($field_value); ?>'"
|
||||
></wpcfto_codemirror>
|
||||
Reference in New Issue
Block a user