/** * Set wp_handle_upload Arguments * * When testing validation on form we need to set upload validation test * form to TRUE in order to prevent actually uploading the file. * * @since 1.1.12 * * @param $args * * @return mixed */ function upload_overrides($args) { // If filter wasn't forced don't set test form true // // Check for parent force validate for WPRM >= 1.9.1 which removes the resumes // filter for uploads and now uses core WPJM upload. if (!$this->force_validate && !parent::$force_validate_resumes) { return $args; } $this->force_validate = FALSE; parent::$force_validate_resumes = FALSE; $args['test_form'] = TRUE; return $args; }
/** * Set wp_handle_upload Arguments * * When testing validation on form we need to set upload validation test * form to TRUE in order to prevent actually uploading the file. * * @since 1.1.11 * * @param $args * * @return mixed */ function upload_overrides($args) { // If filter wasn't forced don't set test form true if (!$this->force_validate) { return $args; } $this->force_validate = FALSE; parent::$force_validate_resumes = FALSE; $args['test_form'] = TRUE; return $args; }