PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 3.06.06
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v3.06.06
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
formidable / classes / factories / FrmEntryFactory.php

FrmEntryFactory.php in Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More 3.06.06, at classes/factories/FrmEntryFactory.php

47 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * @since 2.04
5 */
6 class FrmEntryFactory {
7
8 /**
9 * Create an instance of the FrmEntryFormatter class
10 *
11 * @since 2.04
12 *
13 * @param array $atts
14 *
15 * @return FrmEntryFormatter|FrmProEntryFormatter
16 */
17 public static function entry_formatter_instance( $atts ) {
18 if ( FrmAppHelper::pro_is_installed() ) {
19 $entry_formatter = new FrmProEntryFormatter( $atts );
20 } else {
21 $entry_formatter = new FrmEntryFormatter( $atts );
22 }
23
24 return $entry_formatter;
25 }
26
27 /**
28 * Create an intsance of the FrmEntryShortcodeFormatter class
29 *
30 * @since 2.04
31 *
32 * @param int|string $form_id
33 * @param array $atts
34 *
35 * @return FrmEntryShortcodeFormatter|FrmProEntryShortcodeFormatter
36 */
37 public static function entry_shortcode_formatter_instance( $form_id, $atts ) {
38 if ( FrmAppHelper::pro_is_installed() ) {
39 $shortcode_formatter = new FrmProEntryShortcodeFormatter( $form_id, $atts );
40 } else {
41 $shortcode_formatter = new FrmEntryShortcodeFormatter( $form_id, $atts );
42 }
43
44 return $shortcode_formatter;
45 }
46 }
47