/*
 Theme Name:   Bricks Child Theme
 Theme URI:    https://bricksbuilder.io/
 Description:  Use this child theme to extend Bricks.
 Author:       Bricks
 Author URI:   https://bricksbuilder.io/
 Template:     bricks
 Version:      1.1
 Text Domain:  bricks
*/

/**
 * Custom Code
 * Cristhian Coaquira - DTK
 */

/**
 * Disable custom fields of user form
 */
function tep_disable_wpi_user_information_fields($wpi_fields)
{
	unset($wpi_fields['streetaddress']);
	unset($wpi_fields['city']);
	unset($wpi_fields['state']);
	unset($wpi_fields['zip']);
	unset($wpi_fields['country']);

	return $wpi_fields;
}
add_filter('wpi_user_information', 'tep_disable_wpi_user_information_fields');

/**
 * Disable Comments Box of WPI
 */
function tep_remove_wpi_add_comments_box() 
{
	remove_action('wpi_add_comments_box', array('wpi_quotes', 'wpi_add_comments_box'));
}
add_action('init', 'tep_remove_wpi_add_comments_box');

/**
 * Change download name of pdf
 */
function tep_change_download_name($filename)
{
	return 'ProformaToldosyEstructuraSanchez';
}
add_filter('wpi_pdf_file_name', 'tep_change_download_name');