Skip to content

Commit

Permalink
Updated folder & files structure
Browse files Browse the repository at this point in the history
  • Loading branch information
LPdsgn committed Jun 9, 2024
1 parent 5e1f6eb commit 5a58afd
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Then add this line of code to your `functions.php` file to load the widgets:
/* CUSTOM ELEMENTOR WIDGET
* qui i widget custom registrati in Elementor
*/
include_once(get_stylesheet_directory() . '/components/components.php');
include_once(get_stylesheet_directory() . '/lp-elementor-widgets/components.php');
```

> **Note** |
Expand Down
8 changes: 4 additions & 4 deletions components.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* @version 1.0.0
*/
function register_breadcrumbs($widgets_manager) {
require_once(get_stylesheet_directory() . '/components/breadcrumbs.php');
require_once(get_stylesheet_directory() . '/lp-elementor-widgets/breadcrumbs.php');
$widgets_manager->register(new \Breadcrumbs());

}
Expand All @@ -24,21 +24,21 @@ function register_breadcrumbs($widgets_manager) {

# Register SCROLL DOWN SPINNER widget
function register_scrollDownSpinner($widgets_manager) {
require_once(get_stylesheet_directory() . '/components/scrollDownSpinner/scrollDownSpinner.php');
require_once(get_stylesheet_directory() . '/lp-elementor-widgets/scrollDownSpinner/scrollDownSpinner.php');
$widgets_manager->register(new \Scroll_Down_Spinner());
}
add_action('elementor/widgets/widgets_registered', 'register_scrollDownSpinner');

# Register SCROLL DOWN INDICATOR widget
function register_scrollDownIndicator($widgets_manager) {
require_once(get_stylesheet_directory() . '/components/scrollDownIndicator/scrollDownIndicator.php');
require_once(get_stylesheet_directory() . '/lp-elementor-widgets/scrollDownIndicator/scrollDownIndicator.php');
$widgets_manager->register(new \Scroll_Down_Indicator());
}
add_action('elementor/widgets/widgets_registered', 'register_scrollDownIndicator');

# Register widget's style
function registerStyle_scrollDownSpinner() {
wp_register_style('scrollDown', get_stylesheet_directory_uri() . '/components/css/scrollDown.min.css');
wp_register_style('scrollDown', get_stylesheet_directory_uri() . '/lp-elementor-widgets/css/scrollDown.min.css');
wp_enqueue_style('scrollDown');
}
add_action('wp_enqueue_scripts', 'registerStyle_scrollDownSpinner');
2 changes: 1 addition & 1 deletion scrollDownIndicator/scrollDownIndicator.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Scroll_Down_Indicator extends \Elementor\Widget_Base

public function __construct($data = [], $args = null) {
parent::__construct($data, $args);
require_once(get_stylesheet_directory() . '/components/scrollDownIndicator/hex_to_rgba.php');
require_once(get_stylesheet_directory() . '/lp-elementor-widgets/scrollDownIndicator/hex_to_rgba.php');
}

public function get_name() {
Expand Down
2 changes: 1 addition & 1 deletion scrollDownSpinner/scrollDownSpinner.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ protected function render() {
return;
}
?>
<img decoding="async" class="looped-animation-rotate <?php echo esc_attr($color); ?>" height="<?php echo esc_attr($settings['dimension']); ?>" width="<?php echo esc_attr($settings['dimension']); ?>" src="<?php echo esc_url(get_stylesheet_directory_uri() . '/components/scrollDownSpinner/scrollDownSpinner.webp'); ?>" alt="Scroll to see more content">
<img decoding="async" class="looped-animation-rotate <?php echo esc_attr($color); ?>" height="<?php echo esc_attr($settings['dimension']); ?>" width="<?php echo esc_attr($settings['dimension']); ?>" src="<?php echo esc_url(get_stylesheet_directory_uri() . '/lp-elementor-widgets/scrollDownSpinner/scrollDownSpinner.webp'); ?>" alt="Scroll to see more content">
<?php
}
}

0 comments on commit 5a58afd

Please sign in to comment.