| @@ -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 | */ |