PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.0
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.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/controllers/FrmElementorController.php +7 -32 6.346.0 View file →
@@ -7,47 +7,22 @@
7 7 * @since 5.0.06
8 8 */
9 9 class FrmElementorController {
10 10
11 - /**
12 - * @return void
13 - */
14 11 public static function register_elementor_hooks() {
15 12 require_once FrmAppHelper::plugin_path() . '/classes/widgets/FrmElementorWidget.php';
16 13 \Elementor\Plugin::instance()->widgets_manager->register( new \FrmElementorWidget() );
17 14
18 - add_action( 'elementor/editor/after_enqueue_styles', array( self::class, 'enqueue_editor_styles' ) );
19 - }
20 -
21 - /**
22 - * Enqueue styles for the Elementor editor to display the Formidable widget icon.
23 - *
24 - * @since 6.27
25 - *
26 - * @return void
27 - */
28 - public static function enqueue_editor_styles() {
29 - $icon = rawurlencode( FrmAppHelper::svg_logo() );
30 - $css = '
31 - .elementor-element .icon .frm_logo_icon {
32 - display: flex;
33 - align-items: center;
34 - justify-content: center;
15 + if ( is_admin() ) {
16 + add_action(
17 + 'elementor/editor/after_enqueue_styles',
18 + function() {
19 + wp_enqueue_style( 'font_icons', FrmAppHelper::plugin_url() . '/css/font_icons.css', array(), FrmAppHelper::plugin_version() );
20 + }
21 + );
35 22 }
36 - .elementor-element .icon .frm_logo_icon::before {
37 - content: "";
38 - display: block;
39 - width: 28px;
40 - height: 28px;
41 - background: url("data:image/svg+xml,' . $icon . '") center / contain no-repeat;
42 - }';
43 -
44 - wp_add_inline_style( 'elementor-editor', $css );
45 23 }
46 24
47 - /**
48 - * @return void
49 - */
50 25 public static function admin_init() {
51 26 FrmAppController::load_wp_admin_style();
52 27 FrmFormsController::insert_form_popup();
53 28 }