Skip to content

Commit 4147ede

Browse files
committed
v2.2.0
1. Button Load Elementor - ISE. 2. Style Tab. 3. Added ability to Load More using Button. 4. Added ability to disable loaded animation. 5. Added ability to select Loading Type between Animation and Text. 6. Added ability to customize Last Text and Error Text. 7. Added Loading animation to Elementor Products widget infinite scroll. 8. Added ability to add Loading text. 9. Added ability to Style Button. 10. Added ability to Style Loading Text, Last Text and Error Text.
1 parent 7b3dc71 commit 4147ede

File tree

8 files changed

+1625
-557
lines changed

8 files changed

+1625
-557
lines changed

README.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
**Requires at least:** 5.0\
55
**Tested up to:** 5.5.1\
66
**Requires PHP:** 5.6\
7-
**Stable tag:** 2.1.2\
7+
**Stable tag:** 2.2.0\
88
**License:** GPLv3\
99
**License URI:** https://www.gnu.org/licenses/gpl-3.0.html
1010

@@ -17,6 +17,7 @@ Infinite Scroll Elementor pulls the next posts automatically when the reader app
1717
### Widgets ###
1818

1919
1. Infinite Scroll Elementor - ISE
20+
2. Button Load Elementor - ISE
2021

2122
### Pagination applicable to ###
2223

@@ -28,13 +29,35 @@ Infinite Scroll Elementor pulls the next posts automatically when the reader app
2829
### Options ###
2930

3031
1. Support for Other Elementor Addons.
32+
2. Enable or Disable Loading Animation.
33+
3. Customizable Last Text and Error Text.
34+
4. Ability to style Button.
35+
5. Ability to style Loading Animation.
36+
37+
### Minimum Requirements ###
38+
39+
* WordPress 5.0 or greater
40+
* PHP version 5.6 or greater
41+
* MySQL version 5.0 or greater
42+
* Elementor version 2.0.0 or greater
3143

3244
## Tutorial ##
3345

3446
For tutorial check [documentation](https://joychetry.com/infinite-scroll-elementor/).
3547

3648
## Changelog ##
3749

50+
### 2.2.0 - 2020-09-26 ###
51+
* New: Button Load Elementor - ISE.
52+
* New: Style Tab.
53+
* Tweak: Added ability to Load More using Button.
54+
* Tweak: Added ability to disable loaded animation.
55+
* Tweak: Added ability to select Loading Type between Animation and Text.
56+
* Tweak: Added ability to customize Last Text and Error Text.
57+
* Tweak: Added Loading animation to Elementor Products widget infinite scroll.
58+
* Tweak: Added ability to add Loading text.
59+
* Tweak: Added ability to Style Button.
60+
* Tweak: Added ability to Style Loading Text, Last Text and Error Text.
3861

3962
### 2.1.2 - 2020-09-10 ###
4063
* Tweak: General Fixes.

includes/shortcuts.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<?php
22

33
// Add links in plugins list
4-
function ISE_add_action_links($links) {
4+
function ISE_add_action_links($links)
5+
{
56
$plugin_shortcuts = array(
6-
'<a href="https://joychetry.com/infinite-scroll-elementor/#changelog" target="_blank">Changelog</a>',
7+
'<a href="https://joychetry.com/infinite-scroll-elementor/#Changelog" target="_blank">Changelog</a>',
78
'<a href="https://www.buymeacoffee.com/joychetry/" target="_blank" style="color:#3db634;">Buy developer a coffee</a>'
89
);
910
return array_merge($links, $plugin_shortcuts);
10-
}
11+
}

includes/validation.php

Lines changed: 68 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,84 @@
11
<?php
22
namespace InfiniteScrollElementorNameSpace;
33

4-
class Plugin {
4+
class Plugin
5+
{
6+
private static $_instance = null;
57

6-
private static $_instance = null;
8+
public static function instance()
9+
{
10+
if (is_null(self::$_instance)) {
11+
self::$_instance = new self();
12+
}
13+
return self::$_instance;
14+
}
715

8-
public static function instance() {
9-
if ( is_null( self::$_instance ) ) {
10-
self::$_instance = new self();
11-
}
12-
return self::$_instance;
13-
}
16+
public function widget_scripts()
17+
{
18+
wp_enqueue_script('infinite-scroll-js', plugin_dir_url(__FILE__) . '../assets/js/infinite-scroll.pkgd.min.js', '', '', true);
19+
}
1420

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-
}
21+
public function widget_styles()
22+
{
23+
wp_register_style('infinite-scroll-elementor-css', plugins_url('../assets/css/infinite-scroll-elementor.css', __FILE__));
24+
}
1825

19-
public function widget_styles() {
20-
wp_register_style( 'infinite-scroll-elementor-css', plugins_url( '../assets/css/infinite-scroll-elementor.css', __FILE__ ) );
21-
}
26+
private function include_widgets_files()
27+
{
28+
require_once(__DIR__ . '/widgets/infinite-scroll-elementor-ise.php');
29+
require_once(__DIR__ . '/widgets/button-load-elementor-ise.php');
30+
}
2231

23-
private function include_widgets_files() {
24-
require_once( __DIR__ . '/widgets/infinite-scroll-elementor-ise.php' );
25-
}
32+
/**
33+
* Register Widgets
34+
*
35+
* Register new Elementor widgets.
36+
*
37+
* @since 1.0.0
38+
* @access public
39+
*/
40+
public function register_widgets()
41+
{
42+
// Its is now safe to include Widgets files
43+
$this->include_widgets_files();
2644

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();
45+
// Register Widgets
46+
\Elementor\Plugin::instance()->widgets_manager->register_widget_type(new Widgets\ISE_InfiniteScroll());
47+
\Elementor\Plugin::instance()->widgets_manager->register_widget_type(new Widgets\ISE_ButtonLoad());
48+
}
49+
50+
/**
51+
* Plugin class constructor
52+
*
53+
* Register plugin action hooks and filters
54+
*
55+
* @since 1.0.0
56+
* @access public
57+
*/
58+
public function __construct()
59+
{
3860

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() {
61+
// Register widgets scripts
62+
add_action('elementor/frontend/after_register_scripts', [ $this, 'widget_scripts' ]);
63+
64+
// Register widgets styles
65+
add_action('elementor/frontend/after_enqueue_styles', [ $this, 'widget_styles' ]);
5266

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-
67+
// Register widgets
68+
add_action('elementor/widgets/widgets_registered', [ $this, 'register_widgets' ]);
69+
6270
// 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+
add_action('elementor/init', function () {
72+
\Elementor\Plugin::$instance->elements_manager->add_category(
73+
'infinite-scroll-elementor-category',
74+
[
75+
'title' => __('Infinite Scroll Elementor', 'infinite-scroll-elementor-td'),
76+
],
77+
1 // Position
78+
);
7179
});
72-
73-
}
74-
80+
}
7581
}
7682

7783
// Instantiate Plugin Class
78-
Plugin::instance();
84+
Plugin::instance();

0 commit comments

Comments
 (0)