PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 4.01.02
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v4.01.02
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 -54 6.254.01.02 View file →
@@ -1,12 +1,9 @@
1 1 <?php
2 -if ( ! defined( 'ABSPATH' ) ) {
3 - die( 'You are not allowed to call this page directly.' );
4 -}
5 -
6 2 /**
7 3 * @since 2.02.12
8 4 */
5 +
9 6 class FrmShortcodeHelper {
10 7
11 8 /**
12 9 * Get the shortcode attributes in key/value pairs from a string
@@ -30,63 +27,14 @@
30 27 return $atts;
31 28 }
32 29
33 30 /**
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 31 * Get the name of the shortcode from the regEx
84 32 *
85 33 * @since 3.0
86 34 *
87 35 * @param array $shortcodes
88 - * @param int $short_key The position in the shortcodes array.
36 + * @param int $short_key The position in the shortcodes array
89 37 * @param array $args
90 38 *
91 39 * @return string
92 40 */