cf_custom_fields_render
Render fields in editor.
Description
Parameters (2)
- 0. $post (object)
- Post object.
- 1. $args (array)
- The args.
Usage
if ( !function_exists( 'cf_custom_fields_render' ) ) { require_once ABSPATH . PLUGINDIR . 'caldera-custom-fields/includes/metabox.php'; } // Post object. $post = null; // The args. $args = array(); // NOTICE! Understand what this does before running. $result = cf_custom_fields_render($post, $args);
Defined (1)
The function is defined in the following location(s).
- /includes/metabox.php
- function cf_custom_fields_render($post, $args) {
- if(isset($_GET['cf_su'])) {
- unset($_GET['cf_su']);
- }
- add_filter( 'caldera_forms_render_pre_get_entry', 'cf_custom_fields_get_meta_data', 10, 2);
- add_filter( 'caldera_forms_render_form_element', function( $element ) {
- return 'div';
- } );
- ob_start();
- $form = Caldera_Forms::render_form( $args['id'] );
- // register this form for processing'
- echo '<input type="hidden" name="cf_metabox_forms[]" value="' . $args['id'] . '">';
- echo $form;
- }