Skip to main content

vc_font_container_output_data

Filters the rendered output data array for the font container parameter before it is assembled into the final HTML output. Each key in the data array corresponds to a font container field (e.g., tag, font_family, font_size, color, text_align, line_height) and contains its rendered HTML template.

Parameters

ParameterTypeDescription
$dataarrayAn associative array of rendered HTML strings, keyed by field name (e.g., tag, font_family, font_size, color, text_align, line_height).
$fieldsarrayThe font container fields configuration array.
$valuesarrayThe current values for each field.
$settingsarrayThe parameter settings array.

Usage

add_filter( 'vc_font_container_output_data', 'wpb_modify_font_container_output', 10, 4 );

function wpb_modify_font_container_output( $data, $fields, $values, $settings ) {
// Add a custom field output after the existing fields
if ( isset( $fields['font_size'] ) ) {
$data['font_size'] .= '<p class="description">Enter size in px, em, or rem.</p>';
}
return $data;
}

Source

File: include/params/font_container/font_container.php