Skip to content

Commit

Permalink
Merge pull request #545 from takayukister/dev/5.5
Browse files Browse the repository at this point in the history
Update contact-form.php
  • Loading branch information
takayukister authored Sep 8, 2021
2 parents cb60a36 + 656b310 commit 3a68423
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion includes/contact-form.php
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,10 @@ private function form_hidden_fields() {
return '<div style="display: none;">' . "\n" . $content . '</div>' . "\n";
}


/**
* Returns the visible response output for a form submission.
*/
public function form_response_output() {
$status = 'init';
$class = 'wpcf7-response-output';
Expand Down Expand Up @@ -685,6 +689,10 @@ public function form_response_output() {
return $output;
}


/**
* Returns the response output that is only accessible from screen readers.
*/
public function screen_reader_response() {
$primary_response = '';
$validation_errors = array();
Expand Down Expand Up @@ -741,6 +749,12 @@ public function screen_reader_response() {
return $output;
}


/**
* Returns a validation error for the specified input field.
*
* @param string $name Input field name.
*/
public function validation_error( $name ) {
$error = '';

Expand Down Expand Up @@ -770,8 +784,12 @@ public function validation_error( $name ) {
return apply_filters( 'wpcf7_validation_error', $error, $name, $this );
}

/* Form Elements */

/**
* Replaces all form-tags in the form template with corresponding HTML.
*
* @return string Replaced form content.
*/
public function replace_all_form_tags() {
$manager = WPCF7_FormTagsManager::get_instance();
$form = $this->prop( 'form' );
Expand All @@ -787,6 +805,7 @@ public function replace_all_form_tags() {
return $form;
}


public function form_do_shortcode() {
wpcf7_deprecated_function( __METHOD__, '4.6',
'WPCF7_ContactForm::replace_all_form_tags' );
Expand Down

0 comments on commit 3a68423

Please sign in to comment.