Skip to content

Commit e4671fd

Browse files
committed
v2.1 Commit
1. Added new Infinite Scroll JavaScript 2. Added compatibility with Wordpress 5.5 3. Added compatibility with Elementor 3.0 4. Added support for Other Elementor Adons 5. Removed custom Loading Image and No More Items option. 6. Added Loading Image and No More Items and removed option to the code.
1 parent 1b00b71 commit e4671fd

File tree

116 files changed

+12437
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+12437
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/* har har mahadev */
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/* har har mahadev */

assets/js/infinite-scroll.pkgd.min.js

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

includes/shortcuts.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
// Add links in plugins list
4+
function ISE_add_action_links($links) {
5+
$plugin_shortcuts = array(
6+
'<a href="https://joychetry.com/infinite-scroll-elementor/#changelog" target="_blank">Changelog</a>',
7+
'<a href="https://www.buymeacoffee.com/joychetry/" target="_blank" style="color:#3db634;">Buy developer a coffee</a>'
8+
);
9+
return array_merge($links, $plugin_shortcuts);
10+
}

includes/validation.php

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?php
2+
namespace InfiniteScrollElementorNameSpace;
3+
4+
class Plugin {
5+
6+
private static $_instance = null;
7+
8+
public static function instance() {
9+
if ( is_null( self::$_instance ) ) {
10+
self::$_instance = new self();
11+
}
12+
return self::$_instance;
13+
}
14+
15+
public function widget_scripts() {
16+
wp_enqueue_script( 'infinite-scroll-js', plugin_dir_url( __FILE__ ) . '../assets/js/infinite-scroll.pkgd.min.js', '','', true );
17+
}
18+
19+
public function widget_styles() {
20+
wp_register_style( 'infinite-scroll-elementor-css', plugins_url( '../assets/css/infinite-scroll-elementor.css', __FILE__ ) );
21+
}
22+
23+
private function include_widgets_files() {
24+
require_once( __DIR__ . '/widgets/infinite-scroll-elementor-ise.php' );
25+
}
26+
27+
/**
28+
* Register Widgets
29+
*
30+
* Register new Elementor widgets.
31+
*
32+
* @since 1.0.0
33+
* @access public
34+
*/
35+
public function register_widgets() {
36+
// Its is now safe to include Widgets files
37+
$this->include_widgets_files();
38+
39+
// Register Widgets
40+
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\ISE_InfiniteScroll() );
41+
}
42+
43+
/**
44+
* Plugin class constructor
45+
*
46+
* Register plugin action hooks and filters
47+
*
48+
* @since 1.0.0
49+
* @access public
50+
*/
51+
public function __construct() {
52+
53+
// Register widgets scripts
54+
add_action( 'elementor/frontend/after_register_scripts', [ $this, 'widget_scripts' ] );
55+
56+
// Register widgets styles
57+
add_action( 'elementor/frontend/after_enqueue_styles', [ $this, 'widget_styles' ] );
58+
59+
// Register widgets
60+
add_action( 'elementor/widgets/widgets_registered', [ $this, 'register_widgets' ] );
61+
62+
// Register widgets category
63+
add_action( 'elementor/init', function() {
64+
\Elementor\Plugin::$instance->elements_manager->add_category(
65+
'infinite-scroll-elementor-category',
66+
[
67+
'title' => __( 'Infinite Scroll Elementor', 'infinite-scroll-elementor-td' ),
68+
],
69+
1 // Position
70+
);
71+
});
72+
73+
}
74+
75+
}
76+
77+
// Instantiate Plugin Class
78+
Plugin::instance();

0 commit comments

Comments
 (0)