PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 4.09.08
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v4.09.08
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 4.09.08, at classes/factories/FrmEntryFactory.php

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