get_style_depends on edit mode only
-
Hello Elementor support team,
I am a developer and using your product to create beaty sites for clients. Also I create my own widgets and here is the question for you
How to make depend styles only when it is in edit mode ?P.S. I have found such code in one of your widgets
public function get_style_depends() { if ( Icons_Manager::is_migration_allowed() ) { return [ 'elementor-icons-fa-solid', 'elementor-icons-fa-brands', ]; } return []; }
and it works good but I need to make this depends only when Elementor is in Edit mode ( Plugin::$instance->editor->is_edit_mode() ).
In such case :public function get_style_depends() { if ( \Elementor\Plugin::$instance->editor->is_edit_mode() && \Elementor\Icons_Manager::is_migration_allowed() ) { return [ 'elementor-icons-fa-solid', 'elementor-icons-fa-brands', ]; } return []; }
– does not work ok
Please, guide me in this area if you can !
Regards, @stas0238The page I need help with: [log in to see the link]
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘get_style_depends on edit mode only’ is closed to new replies.