PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.3
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.3
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 / helpers / FrmHtmlHelper.php

FrmHtmlHelper.php in Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More 6.3, at classes/helpers/FrmHtmlHelper.php

36 lines 892 B
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 6.0
8 */
9 class FrmHtmlHelper {
10
11 /**
12 * Create a toggle and either echo or return the string.
13 * This is intended for use on admin pages only. The CSS is included in frm_admin.css.
14 *
15 * @since 6.0
16 *
17 * @param string $id
18 * @param string $name
19 * @param array $args {
20 * @param bool|null $echo True if you want the toggle to echo. False if you want it to return an HTML string.
21 * }
22 *
23 * @return string|void
24 */
25 public static function toggle( $id, $name, $args ) {
26 wp_enqueue_script( 'formidable_settings' );
27 return FrmAppHelper::clip(
28 // @phpstan-ignore-next-line
29 function() use ( $id, $name, $args ) {
30 require FrmAppHelper::plugin_path() . '/classes/views/shared/toggle.php';
31 },
32 isset( $args['echo'] ) ? $args['echo'] : false
33 );
34 }
35 }
36