Skip to content

Commit

Permalink
Merge pull request #546 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 10, 2021
2 parents 3a68423 + d3cb8d8 commit 07a99c1
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion includes/contact-form.php
Original file line number Diff line number Diff line change
Expand Up @@ -806,13 +806,28 @@ public function replace_all_form_tags() {
}


/**
* Replaces all form-tags in the form template with corresponding HTML.
*
* @deprecated 4.6 Use replace_all_form_tags()
*
* @return string Replaced form content.
*/
public function form_do_shortcode() {
wpcf7_deprecated_function( __METHOD__, '4.6',
'WPCF7_ContactForm::replace_all_form_tags' );
'WPCF7_ContactForm::replace_all_form_tags'
);

return $this->replace_all_form_tags();
}


/**
* Scans form-tags from the form template.
*
* @param string|array|null $cond Optional. Filters. Default null.
* @return array Form-tags matching the given filter conditions.
*/
public function scan_form_tags( $cond = null ) {
$manager = WPCF7_FormTagsManager::get_instance();

Expand All @@ -825,6 +840,15 @@ public function scan_form_tags( $cond = null ) {
return $manager->filter( $tags, $cond );
}


/**
* Scans form-tags from the form template.
*
* @deprecated 4.6 Use scan_form_tags()
*
* @param string|array|null $cond Optional. Filters. Default null.
* @return array Form-tags matching the given filter conditions.
*/
public function form_scan_shortcode( $cond = null ) {
wpcf7_deprecated_function( __METHOD__, '4.6',
'WPCF7_ContactForm::scan_form_tags'
Expand All @@ -833,6 +857,12 @@ public function form_scan_shortcode( $cond = null ) {
return $this->scan_form_tags( $cond );
}


/**
* Replaces all form-tags in the form template with corresponding HTML.
*
* @return string Replaced form content. wpcf7_form_elements filters applied.
*/
public function form_elements() {
return apply_filters( 'wpcf7_form_elements',
$this->replace_all_form_tags()
Expand Down

0 comments on commit 07a99c1

Please sign in to comment.