From 818e4aa472beeaa4c45a2db46bd17447e3f30213 Mon Sep 17 00:00:00 2001 From: Takayuki Miyoshi Date: Sun, 7 Aug 2022 17:04:22 +0900 Subject: [PATCH] Update submission.php #525 --- includes/submission.php | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/includes/submission.php b/includes/submission.php index 4c1a4295..0c1fce80 100644 --- a/includes/submission.php +++ b/includes/submission.php @@ -211,22 +211,44 @@ public function add_result_props( $args = '' ) { } + /** + * Retrieves the response property. + * + * @return string The current response property value. + */ public function get_response() { return $this->response; } + /** + * Sets the response property. + * + * @param string $response New response property value. + */ public function set_response( $response ) { $this->response = $response; return true; } + /** + * Retrieves the contact form property. + * + * @return WPCF7_ContactForm A contact form object. + */ public function get_contact_form() { return $this->contact_form; } + /** + * Search an invalid field by field name. + * + * @param string $name The field name. + * @return array|bool An associative array of validation error + * or false when no invalid field. + */ public function get_invalid_field( $name ) { if ( isset( $this->invalid_fields[$name] ) ) { return $this->invalid_fields[$name]; @@ -236,11 +258,23 @@ public function get_invalid_field( $name ) { } + /** + * Retrieves all invalid fields. + * + * @return array Invalid fields. + */ public function get_invalid_fields() { return $this->invalid_fields; } + /** + * Retrieves meta information. + * + * @param string $name Name of the meta information. + * @return string|null The meta information of the given name if it exists, + * null otherwise. + */ public function get_meta( $name ) { if ( isset( $this->meta[$name] ) ) { return $this->meta[$name];