';
$e .= esc_textarea( $field['value'] );
$e .= '';
// return
echo $e;
$dir = trailingslashit( plugin_dir_url( __FILE__ ) );
wp_enqueue_style( 'codemirror-curr-style-'.$field['theme'], "{$dir}js/codemirror-5.13/theme/{$field['theme']}.css" );
?>
defaults, $field);
*/
// perhaps use $field['preview_size'] to alter the $value?
// Note: This function can be removed if not used
return $value;
}
/*
* format_value_for_api()
*
* This filter is applied to the $value after it is loaded from the db and before it is passed back to the API functions such as the_field
*
* @type filter
* @since 3.6
* @date 21/03/2016
*
* @param $value - the value which was loaded from the database
* @param $post_id - the $post_id from which the value was loaded
* @param $field - the field array holding all the field options
*
* @return $value - the modified value
*/
function format_value_for_api( $value, $post_id, $field ) {
// defaults?
/*
$field = array_merge($this->defaults, $field);
*/
// perhaps use $field['preview_size'] to alter the $value?
// Note: This function can be removed if not used
return $value;
}
/*
* load_field()
*
* This filter is applied to the $field after it is loaded from the database
*
* @type filter
* @since 3.6
* @date 21/03/2016
*
* @param $field - the field array holding all the field options
*
* @return $field - the field array holding all the field options
*/
function load_field( $field ) {
// Note: This function can be removed if not used
return $field;
}
/*
* update_field()
*
* This filter is applied to the $field before it is saved to the database
*
* @type filter
* @since 3.6
* @date 21/03/2016
*
* @param $field - the field array holding all the field options
* @param $post_id - the field group ID (post_type = acf)
*
* @return $field - the modified field
*/
function update_field( $field, $post_id ) {
// Note: This function can be removed if not used
return $field;
}
}
// create field
new acf_code_field_v4();
?>