From d3cb8d8a1bcc2a17f256afeea6079ddb761caf73 Mon Sep 17 00:00:00 2001 From: Takayuki Miyoshi Date: Fri, 10 Sep 2021 19:15:26 +0900 Subject: [PATCH] Update contact-form.php #525 --- includes/contact-form.php | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/includes/contact-form.php b/includes/contact-form.php index b40715b9..02073c7a 100644 --- a/includes/contact-form.php +++ b/includes/contact-form.php @@ -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(); @@ -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' @@ -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()