PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 5.0.07
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v5.0.07
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
← All changes | classes/factories/FrmEntryFactory.php +10 -18 6.295.0.07 View file →
@@ -17,41 +17,33 @@
17 17 *
18 18 * @return FrmEntryFormatter|FrmProEntryFormatter
19 19 */
20 20 public static function entry_formatter_instance( $atts ) {
21 - $formatter_class = 'FrmEntryFormatter';
22 -
23 21 if ( FrmAppHelper::pro_is_installed() ) {
24 - $formatter_class = 'FrmProEntryFormatter';
22 + $entry_formatter = new FrmProEntryFormatter( $atts );
23 + } else {
24 + $entry_formatter = new FrmEntryFormatter( $atts );
25 25 }
26 26
27 - /**
28 - * Allows changing entry formatter class name.
29 - *
30 - * @since 5.0.16
31 - *
32 - * @param string $formatter_class Entry formatter class name.
33 - * @param array $atts See {@see FrmEntriesController::show_entry_shortcode()}.
34 - */
35 - $formatter_class = apply_filters( 'frm_entry_formatter_class', $formatter_class, $atts );
36 -
37 - return new $formatter_class( $atts );
27 + return $entry_formatter;
38 28 }
39 29
40 30 /**
41 - * Create an instance of the FrmEntryShortcodeFormatter class
31 + * Create an intsance of the FrmEntryShortcodeFormatter class
42 32 *
43 33 * @since 2.04
44 34 *
45 35 * @param int|string $form_id
46 - * @param array $atts
36 + * @param array $atts
47 37 *
48 38 * @return FrmEntryShortcodeFormatter|FrmProEntryShortcodeFormatter
49 39 */
50 40 public static function entry_shortcode_formatter_instance( $form_id, $atts ) {
51 41 if ( FrmAppHelper::pro_is_installed() ) {
52 - return new FrmProEntryShortcodeFormatter( $form_id, $atts );
42 + $shortcode_formatter = new FrmProEntryShortcodeFormatter( $form_id, $atts );
43 + } else {
44 + $shortcode_formatter = new FrmEntryShortcodeFormatter( $form_id, $atts );
53 45 }
54 46
55 - return new FrmEntryShortcodeFormatter( $form_id, $atts );
47 + return $shortcode_formatter;
56 48 }
57 49 }