PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 5.0
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v5.0
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/helpers/FrmShortcodeHelper.php +2 -50 6.255.0 View file →
@@ -5,8 +5,9 @@
5 5
6 6 /**
7 7 * @since 2.02.12
8 8 */
9 +
9 10 class FrmShortcodeHelper {
10 11
11 12 /**
12 13 * Get the shortcode attributes in key/value pairs from a string
@@ -30,63 +31,14 @@
30 31 return $atts;
31 32 }
32 33
33 34 /**
34 - * Returns shortcodes that are shown/hidden based on the context.
35 - *
36 - * @since 6.16.3
37 - * @return array
38 - */
39 - public static function get_contextual_shortcodes() {
40 - return array(
41 - 'address' => array(
42 - 'admin_email' => __( 'Admin email', 'formidable' ),
43 - 'default-from-email' => __( 'Default from email', 'formidable' ),
44 - 'default-email' => __( 'Default email', 'formidable' ),
45 - ),
46 - 'body' => array(
47 - 'default-message' => __( 'Default Msg', 'formidable' ),
48 - 'default-html' => __( 'Default HTML', 'formidable' ),
49 - 'default-plain' => __( 'Default Plain', 'formidable' ),
50 - ),
51 - );
52 - }
53 -
54 - /**
55 - * Get contextual shortcodes.
56 - *
57 - * @since 6.16.3
58 - *
59 - * @return array
60 - */
61 - public static function get_contextual_shortcode_values() {
62 - $contextual_shortcodes = self::get_contextual_shortcodes();
63 - return array_merge( $contextual_shortcodes['address'], $contextual_shortcodes['body'] );
64 - }
65 -
66 - /**
67 - * Get flattened format of contextual shortcodes.
68 - *
69 - * @since 6.16.3
70 - *
71 - * @return array
72 - */
73 - public static function get_contextual_codes() {
74 - $contextual_shortcodes = self::get_contextual_shortcodes();
75 - $result = array();
76 - foreach ( $contextual_shortcodes as $type => $shortcodes ) {
77 - $result[ $type ] = array_keys( $shortcodes );
78 - }
79 - return $result;
80 - }
81 -
82 - /**
83 35 * Get the name of the shortcode from the regEx
84 36 *
85 37 * @since 3.0
86 38 *
87 39 * @param array $shortcodes
88 - * @param int $short_key The position in the shortcodes array.
40 + * @param int $short_key The position in the shortcodes array
89 41 * @param array $args
90 42 *
91 43 * @return string
92 44 */