block-editor
1 year ago
config-validator
11 months ago
css
2 weeks ago
js
1 year ago
swv
9 months ago
capabilities.php
7 years ago
contact-form-functions.php
11 months ago
contact-form-template.php
11 months ago
contact-form.php
11 months ago
controller.php
11 months ago
file.php
9 months ago
filesystem.php
11 months ago
form-tag.php
7 months ago
form-tags-manager.php
11 months ago
formatting.php
11 months ago
functions.php
9 months ago
html-formatter.php
9 months ago
integration.php
11 months ago
l10n.php
11 months ago
mail-tag.php
11 months ago
mail.php
3 months ago
pipe.php
11 months ago
pocket-holder.php
3 years ago
rest-api.php
11 months ago
shortcodes.php
11 months ago
special-mail-tags.php
9 months ago
submission.php
9 months ago
upgrade.php
11 months ago
validation-functions.php
11 months ago
validation.php
11 months ago
shortcodes.php
109 lines
| 1 | <?php |
| 2 | /** |
| 3 | * All the functions and classes in this file are deprecated. |
| 4 | * You should not use them. The functions and classes will be |
| 5 | * removed in a later version. |
| 6 | */ |
| 7 | |
| 8 | function wpcf7_add_shortcode( $tag, $callback, $has_name = false ) { |
| 9 | wpcf7_deprecated_function( __FUNCTION__, '4.6', 'wpcf7_add_form_tag' ); |
| 10 | |
| 11 | return wpcf7_add_form_tag( $tag, $callback, $has_name ); |
| 12 | } |
| 13 | |
| 14 | function wpcf7_remove_shortcode( $tag ) { |
| 15 | wpcf7_deprecated_function( __FUNCTION__, '4.6', 'wpcf7_remove_form_tag' ); |
| 16 | |
| 17 | return wpcf7_remove_form_tag( $tag ); |
| 18 | } |
| 19 | |
| 20 | function wpcf7_do_shortcode( $content ) { |
| 21 | wpcf7_deprecated_function( __FUNCTION__, '4.6', |
| 22 | 'wpcf7_replace_all_form_tags' ); |
| 23 | |
| 24 | return wpcf7_replace_all_form_tags( $content ); |
| 25 | } |
| 26 | |
| 27 | function wpcf7_scan_shortcode( $cond = null ) { |
| 28 | wpcf7_deprecated_function( __FUNCTION__, '4.6', 'wpcf7_scan_form_tags' ); |
| 29 | |
| 30 | return wpcf7_scan_form_tags( $cond ); |
| 31 | } |
| 32 | |
| 33 | class WPCF7_ShortcodeManager { |
| 34 | |
| 35 | private static $form_tags_manager; |
| 36 | |
| 37 | private function __construct() {} |
| 38 | |
| 39 | public static function get_instance() { |
| 40 | wpcf7_deprecated_function( __METHOD__, '4.6', |
| 41 | 'WPCF7_FormTagsManager::get_instance' |
| 42 | ); |
| 43 | |
| 44 | self::$form_tags_manager = WPCF7_FormTagsManager::get_instance(); |
| 45 | return new self(); |
| 46 | } |
| 47 | |
| 48 | public function get_scanned_tags() { |
| 49 | wpcf7_deprecated_function( __METHOD__, '4.6', |
| 50 | 'WPCF7_FormTagsManager::get_scanned_tags' |
| 51 | ); |
| 52 | |
| 53 | return self::$form_tags_manager->get_scanned_tags(); |
| 54 | } |
| 55 | |
| 56 | public function add_shortcode( $tag, $callback, $has_name = false ) { |
| 57 | wpcf7_deprecated_function( __METHOD__, '4.6', |
| 58 | 'WPCF7_FormTagsManager::add' |
| 59 | ); |
| 60 | |
| 61 | return self::$form_tags_manager->add( $tag, $callback, $has_name ); |
| 62 | } |
| 63 | |
| 64 | public function remove_shortcode( $tag ) { |
| 65 | wpcf7_deprecated_function( __METHOD__, '4.6', |
| 66 | 'WPCF7_FormTagsManager::remove' |
| 67 | ); |
| 68 | |
| 69 | return self::$form_tags_manager->remove( $tag ); |
| 70 | } |
| 71 | |
| 72 | public function normalize_shortcode( $content ) { |
| 73 | wpcf7_deprecated_function( __METHOD__, '4.6', |
| 74 | 'WPCF7_FormTagsManager::normalize' |
| 75 | ); |
| 76 | |
| 77 | return self::$form_tags_manager->normalize( $content ); |
| 78 | } |
| 79 | |
| 80 | public function do_shortcode( $content, $exec = true ) { |
| 81 | wpcf7_deprecated_function( __METHOD__, '4.6', |
| 82 | 'WPCF7_FormTagsManager::replace_all' |
| 83 | ); |
| 84 | |
| 85 | if ( $exec ) { |
| 86 | return self::$form_tags_manager->replace_all( $content ); |
| 87 | } else { |
| 88 | return self::$form_tags_manager->scan( $content ); |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | public function scan_shortcode( $content ) { |
| 93 | wpcf7_deprecated_function( __METHOD__, '4.6', |
| 94 | 'WPCF7_FormTagsManager::scan' |
| 95 | ); |
| 96 | |
| 97 | return self::$form_tags_manager->scan( $content ); |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | class WPCF7_Shortcode extends WPCF7_FormTag { |
| 102 | |
| 103 | public function __construct( $tag ) { |
| 104 | wpcf7_deprecated_function( 'WPCF7_Shortcode', '4.6', 'WPCF7_FormTag' ); |
| 105 | |
| 106 | parent::__construct( $tag ); |
| 107 | } |
| 108 | } |
| 109 |