Skip to content

Commit 7c32edc

Browse files
committed
Update Open-Elementor-Widget.php
1 parent cadcad7 commit 7c32edc

1 file changed

Lines changed: 6 additions & 26 deletions

File tree

Open-Elementor-Widget.php

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,17 @@
77
*/
88

99
// Register the custom widgets with Elementor
10-
function enqueue_font_awesome()
11-
{
12-
wp_enqueue_style('font-awesome', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.0/css/all.min.css', array(), '6.1.0');
10+
add_action( 'wp_enqueue_scripts', 'dequeue_parent_theme_styles', 20 );
11+
function dequeue_parent_theme_styles() {
12+
if ( ! is_admin() ) {
13+
wp_dequeue_style( 'parent-style' );
14+
wp_dequeue_style( 'parent-style-rtl' );
15+
}
1316
}
14-
add_action('elementor/frontend/after_enqueue_styles', 'enqueue_font_awesome');
1517
add_action('elementor/widgets/widgets_registered', 'register_OpenElementorWidget_widgets');
16-
<<<<<<< HEAD
1718

1819
function add_elementor_widget_categories($elements_manager)
1920
{
20-
=======
21-
function add_elementor_widget_categories( $elements_manager ) {
22-
>>>>>>> d490c19b4b50f0986a1212da8bccc90d5009ca3e
2321

2422
$elements_manager->add_category(
2523
'OpenWidget',
@@ -32,25 +30,7 @@ function add_elementor_widget_categories( $elements_manager ) {
3230
add_action('elementor/elements/categories_registered', 'add_elementor_widget_categories');
3331
function register_OpenElementorWidget_widgets($widgets_manager)
3432
{
35-
<<<<<<< HEAD
3633
// Include and register the latest-posts-hover widget
3734
require_once(plugin_dir_path(__FILE__) . 'widgets/Latest-Posts-Hover.php');
3835
$widgets_manager->register_widget_type(new \Latest_Posts_Hover_Widget());
3936
}
40-
=======
41-
add_action( 'elementor/element/before_render', function( $element, $element_id, $settings ) {
42-
if ( \Elementor\Plugin::$instance->editor->is_edit_mode() ) {
43-
// Disabilita il link solo se l'elemento contiene un link
44-
$link = $element->get_settings('link');
45-
if ( ! empty( $link ) ) {
46-
$element->add_render_attribute( '_wrapper', 'href', '' );
47-
}
48-
echo'prova';
49-
}
50-
}, 10, 3 );
51-
// Include and register the latest-posts-hover widget
52-
require_once(plugin_dir_path(__FILE__) . 'widgets/Latest-Posts-Hover.php');
53-
$widgets_manager->register_widget_type(new \Latest_Posts_Hover_Widget());
54-
55-
}
56-
>>>>>>> d490c19b4b50f0986a1212da8bccc90d5009ca3e

0 commit comments

Comments
 (0)