BlossomThemes Social Feed - Version 2.0.2

Version Description

Released on: 24th March, 2021

Feature:

  • Lazy load implementation added for Instagram images.

Fixes:

  • Minor bug fixes.
Download this release

Release Info

Developer blossomthemes
Plugin Icon 128x128 BlossomThemes Social Feed
Version 2.0.2
Comparing to
See all releases

Code changes from version 2.0.1 to 2.0.2

README.txt CHANGED
@@ -1,164 +1,176 @@
1
- === BlossomThemes Social Feed ===
2
- Contributors: blossomthemes
3
- Donate link: https://blossomthemes.com
4
- Tags: instagram, popup, responsive, insta widget
5
- Requires at least: 4.3
6
- Tested up to: 5.6
7
- Requires PHP: 5.6
8
- Stable tag: 2.0.1
9
- License: GPLv2 or later
10
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
-
12
- Show instagram feed on your website using shortcode and widget.
13
-
14
- == Description ==
15
-
16
- BlossomThemes Social Feed plugin allows you to show your Instagram profile on your website. The plugin works best with BlossomThemes’ themes.
17
-
18
- You can display up to 25 photos with maximum 10 photos in each row.
19
-
20
- The plugin generates shortcode and widget. So, you can show your Instagram feed either inside your posts and/or on the sidebars.
21
-
22
- The plugin is very easy to use.
23
-
24
- = Generating your Instagram Shortcode =
25
-
26
- Once activated, a menu named “BlossomThemes Social Feed” will be created on the WordPress dashboard.
27
-
28
- Go to BlossomThemes Social Feed. Then, on the General tab, click Connect with Instagram, the Access Token, and your Instagram username gets captured automatically once you authorize the plugin to access your photos. Select number of photos to display (max. 25), select number of photos per row (max. 10 photos per row), and then click on “Save Changes”.
29
-
30
- Then, go to Usage tab, copy the shortcode and use it on your posts. As easy as that!
31
-
32
- = Using Widget =
33
-
34
- The plugin will create a widget called “BlossomThemes: Instagram”. So, go to Appearance> Widgets on your Admin dashboard, select the BlossomThemes: Instagram widget and place it in the desired sidebar.
35
-
36
- If you do not enter the Instagram username in the widget, the username assigned on the main plugin page (on BlossomThemes Social Feed) will be used.
37
-
38
- = Tutorial Link =
39
-
40
- [How to authorize Instagram account for BlossomThemes Social Feed Plugin?](https://blossomthemes.com/authenticate-instagram-account/)
41
-
42
- == Installation ==
43
- **From your WordPress dashboard**
44
-
45
- 1. Visit 'Plugins > Add New',
46
- 2. Search for 'BlossomThemes Social Feed' and install the plugin.
47
- 3. Activate ‘BlossomThemes Social Feed’ from your Plugins page.
48
-
49
- == Screenshots ==
50
-
51
- 1. General Tab Backend
52
- 2. Usage Tab Backend
53
- 3. BlossomThemes Instagram Widget
54
-
55
- == Images ==
56
- All images are under Creative Commons Public Domain deed CC0.
57
-
58
- * Plugin Banner Image
59
- Links:
60
- https://stocksnap.io/photo/Q2WJXI3CSE,
61
- https://stocksnap.io/photo/EPDJ57Y4TC,
62
- https://stocksnap.io/photo/ZT9WYAA3Y2,
63
- https://stocksnap.io/photo/MHP7KONPB9
64
-
65
- License: https://stocksnap.io/license
66
-
67
- == Changelog ==
68
-
69
- = 2.0.1 =
70
-
71
- Released on: 23rd November, 2020
72
-
73
- Fixes:
74
-
75
- * Instragram caption escaping fixes.
76
- * Minor bug fixes.
77
-
78
- = 2.0.0 =
79
-
80
- Released on: 17th March, 2020
81
-
82
- Important:
83
-
84
- * BlossomThemes Social Feed discontinued with Instagram's old API and henceforth will be using the new Instagram Basic Display API. This will disrupt feeds created from personal connected accounts. You will need to reconnect the account on the BlossomThemes Social Feed Settings page. For help, please refer to [this](https://blossomthemes.com/authenticate-instagram-account/) tutorial.
85
-
86
- Features:
87
-
88
- * Support added for the new Instagram Basic Display API.
89
-
90
- Fixes:
91
-
92
- * Minor bug fixes.
93
-
94
- = 1.2.0 =
95
-
96
- Released on: 18th November, 2019
97
-
98
- Features:
99
-
100
- * Fetch new Posts feature added.
101
-
102
- Fixes:
103
-
104
- * Minor bug fixes.
105
-
106
- = 1.1.10 =
107
- * Fix: Initial Instagram connection issue
108
-
109
- = 1.1.9 =
110
- * Feature: Posts fetch interval added
111
- * Improvement: Split the plugin settings page into general and usage template
112
-
113
- = 1.1.8 =
114
- * Plugin name renamed due to Instagram Trademark issues
115
- * Minor SEO issues fixed
116
-
117
- = 1.1.7 =
118
- * Plugin name renamed due to Instagram Trademark issues
119
-
120
- = 1.1.6 =
121
- * Instagram Settings Issue fixed
122
-
123
- = 1.1.5 =
124
- * Instagram Configuration Video Tutorial Added
125
-
126
- = 1.1.4 =
127
- * Instagram Admin Notice Added
128
-
129
- = 1.1.3 =
130
- * Instagram API integration
131
-
132
- = 1.1.0 =
133
- * Instagram widget follow text issue fixed
134
-
135
- = 1.0.9 =
136
- * Image size for shortcode
137
-
138
- = 1.0.8 =
139
- * Resource Minification
140
- * Image size load smaller
141
-
142
- = 1.0.7 =
143
- * Notice Fixed
144
-
145
- = 1.0.6 =
146
- * API updated
147
-
148
- = 1.0.5 =
149
- * API updated
150
-
151
- = 1.0.4 =
152
- * Function changed
153
-
154
- = 1.0.3 =
155
- * No username issue fixed
156
-
157
- = 1.0.2 =
158
- * Issue fixed
159
-
160
- = 1.0.1 =
161
- * Compatibility tested
162
-
163
- = 1.0.0 =
 
 
 
 
 
 
 
 
 
 
 
 
164
  * Minor design fixes and code clean-up
1
+ === BlossomThemes Social Feed ===
2
+ Contributors: blossomthemes
3
+ Donate link: https://blossomthemes.com
4
+ Tags: instagram, popup, responsive, insta widget
5
+ Requires at least: 4.3
6
+ Tested up to: 5.7
7
+ Requires PHP: 5.6
8
+ Stable tag: 2.0.2
9
+ License: GPLv2 or later
10
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
+
12
+ Show instagram feed on your website using shortcode and widget.
13
+
14
+ == Description ==
15
+
16
+ BlossomThemes Social Feed plugin allows you to show your Instagram profile on your website. The plugin works best with BlossomThemes’ themes.
17
+
18
+ You can display up to 25 photos with maximum 10 photos in each row.
19
+
20
+ The plugin generates shortcode and widget. So, you can show your Instagram feed either inside your posts and/or on the sidebars.
21
+
22
+ The plugin is very easy to use.
23
+
24
+ = Generating your Instagram Shortcode =
25
+
26
+ Once activated, a menu named “BlossomThemes Social Feed” will be created on the WordPress dashboard.
27
+
28
+ Go to BlossomThemes Social Feed. Then, on the General tab, click Connect with Instagram, the Access Token, and your Instagram username gets captured automatically once you authorize the plugin to access your photos. Select number of photos to display (max. 25), select number of photos per row (max. 10 photos per row), and then click on “Save Changes”.
29
+
30
+ Then, go to Usage tab, copy the shortcode and use it on your posts. As easy as that!
31
+
32
+ = Using Widget =
33
+
34
+ The plugin will create a widget called “BlossomThemes: Instagram”. So, go to Appearance> Widgets on your Admin dashboard, select the BlossomThemes: Instagram widget and place it in the desired sidebar.
35
+
36
+ If you do not enter the Instagram username in the widget, the username assigned on the main plugin page (on BlossomThemes Social Feed) will be used.
37
+
38
+ = Tutorial Link =
39
+
40
+ [How to authorize Instagram account for BlossomThemes Social Feed Plugin?](https://blossomthemes.com/authenticate-instagram-account/)
41
+
42
+ == Installation ==
43
+ **From your WordPress dashboard**
44
+
45
+ 1. Visit 'Plugins > Add New',
46
+ 2. Search for 'BlossomThemes Social Feed' and install the plugin.
47
+ 3. Activate ‘BlossomThemes Social Feed’ from your Plugins page.
48
+
49
+ == Screenshots ==
50
+
51
+ 1. General Tab Backend
52
+ 2. Usage Tab Backend
53
+ 3. BlossomThemes Instagram Widget
54
+
55
+ == Images ==
56
+ All images are under Creative Commons Public Domain deed CC0.
57
+
58
+ * Plugin Banner Image
59
+ Links:
60
+ https://stocksnap.io/photo/Q2WJXI3CSE,
61
+ https://stocksnap.io/photo/EPDJ57Y4TC,
62
+ https://stocksnap.io/photo/ZT9WYAA3Y2,
63
+ https://stocksnap.io/photo/MHP7KONPB9
64
+
65
+ License: https://stocksnap.io/license
66
+
67
+ == Changelog ==
68
+
69
+ = 2.0.2 =
70
+
71
+ Released on: 24th March, 2021
72
+
73
+ Feature:
74
+
75
+ * Lazy load implementation added for Instagram images.
76
+
77
+ Fixes:
78
+
79
+ * Minor bug fixes.
80
+
81
+ = 2.0.1 =
82
+
83
+ Released on: 23rd November, 2020
84
+
85
+ Fixes:
86
+
87
+ * Instragram caption escaping fixes.
88
+ * Minor bug fixes.
89
+
90
+ = 2.0.0 =
91
+
92
+ Released on: 17th March, 2020
93
+
94
+ Important:
95
+
96
+ * BlossomThemes Social Feed discontinued with Instagram's old API and henceforth will be using the new Instagram Basic Display API. This will disrupt feeds created from personal connected accounts. You will need to reconnect the account on the BlossomThemes Social Feed Settings page. For help, please refer to [this](https://blossomthemes.com/authenticate-instagram-account/) tutorial.
97
+
98
+ Features:
99
+
100
+ * Support added for the new Instagram Basic Display API.
101
+
102
+ Fixes:
103
+
104
+ * Minor bug fixes.
105
+
106
+ = 1.2.0 =
107
+
108
+ Released on: 18th November, 2019
109
+
110
+ Features:
111
+
112
+ * Fetch new Posts feature added.
113
+
114
+ Fixes:
115
+
116
+ * Minor bug fixes.
117
+
118
+ = 1.1.10 =
119
+ * Fix: Initial Instagram connection issue
120
+
121
+ = 1.1.9 =
122
+ * Feature: Posts fetch interval added
123
+ * Improvement: Split the plugin settings page into general and usage template
124
+
125
+ = 1.1.8 =
126
+ * Plugin name renamed due to Instagram Trademark issues
127
+ * Minor SEO issues fixed
128
+
129
+ = 1.1.7 =
130
+ * Plugin name renamed due to Instagram Trademark issues
131
+
132
+ = 1.1.6 =
133
+ * Instagram Settings Issue fixed
134
+
135
+ = 1.1.5 =
136
+ * Instagram Configuration Video Tutorial Added
137
+
138
+ = 1.1.4 =
139
+ * Instagram Admin Notice Added
140
+
141
+ = 1.1.3 =
142
+ * Instagram API integration
143
+
144
+ = 1.1.0 =
145
+ * Instagram widget follow text issue fixed
146
+
147
+ = 1.0.9 =
148
+ * Image size for shortcode
149
+
150
+ = 1.0.8 =
151
+ * Resource Minification
152
+ * Image size load smaller
153
+
154
+ = 1.0.7 =
155
+ * Notice Fixed
156
+
157
+ = 1.0.6 =
158
+ * API updated
159
+
160
+ = 1.0.5 =
161
+ * API updated
162
+
163
+ = 1.0.4 =
164
+ * Function changed
165
+
166
+ = 1.0.3 =
167
+ * No username issue fixed
168
+
169
+ = 1.0.2 =
170
+ * Issue fixed
171
+
172
+ = 1.0.1 =
173
+ * Compatibility tested
174
+
175
+ = 1.0.0 =
176
  * Minor design fixes and code clean-up
admin/class-blossomthemes-instagram-feed-admin.php CHANGED
@@ -73,7 +73,7 @@ class Blossomthemes_Instagram_Feed_Admin {
73
  * class.
74
  */
75
 
76
- wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/blossomthemes-instagram-feed-admin.min.css', array(), $this->version, 'all' );
77
 
78
  }
79
 
@@ -97,7 +97,7 @@ class Blossomthemes_Instagram_Feed_Admin {
97
  */
98
 
99
 
100
- wp_register_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/blossomthemes-instagram-feed-admin.min.js', array( 'jquery' ), $this->version, false );
101
  wp_localize_script( $this->plugin_name, 'blossomthemesInstagramFeed', array(
102
  'ajaxurl' => admin_url('admin-ajax.php')
103
  ));
73
  * class.
74
  */
75
 
76
+ wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/blossomthemes-instagram-feed-admin.css', array(), $this->version, 'all' );
77
 
78
  }
79
 
97
  */
98
 
99
 
100
+ wp_register_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/blossomthemes-instagram-feed-admin.js', array( 'jquery' ), $this->version, false );
101
  wp_localize_script( $this->plugin_name, 'blossomthemesInstagramFeed', array(
102
  'ajaxurl' => admin_url('admin-ajax.php')
103
  ));
admin/css/blossomthemes-instagram-feed-admin.css CHANGED
@@ -1,94 +1,140 @@
1
- .btss-backend-sidebar {
2
- display: inline-block;
3
- float: right;
4
- width: 20%
5
- }
6
-
7
- .btss-backend-sidebar .thumbnail {
8
- padding: 12px;
9
- line-height: 1.4em;
10
- font-size: 13px;
11
- border: 1px solid #e5e5e5;
12
- box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
13
- background: #fff;
14
- margin-bottom: 20px
15
- }
16
-
17
- form.btif-settings-form {
18
- background: #fff;
19
- padding: 10px;
20
- width: 78%;
21
- float: left
22
- }
23
-
24
- .thumbnail-review {
25
- background: #fff;
26
- padding: 12px;
27
- margin: 0
28
- }
29
-
30
- .btif-option-field-wrap label {
31
- margin: 10px 15px 10px 0;
32
- display: inline-block;
33
- font-weight: 600
34
- }
35
-
36
- .btif-inner-wrap .nav-tab-active,
37
- .btif-inner-wrap .nav-tab-active:focus,
38
- .btif-inner-wrap .nav-tab-active:focus:active,
39
- .btif-inner-wrap .nav-tab-active:hover {
40
- border-bottom: 1px solid #fff;
41
- background: #fff;
42
- color: #000
43
- }
44
-
45
- .btif-inner-wrap {
46
- background: #fff;
47
- width: 77.5%;
48
- float: left;
49
- padding: 15px;
50
- border: 1px solid #ddd
51
- }
52
-
53
- .blossomthemes-instagram-feed-settings {
54
- display: none
55
- }
56
-
57
- .blossomthemes-instagram-feed-settings.general {
58
- display: block
59
- }
60
-
61
- div#blossomthemes-instagram-feed-settings-usage .shortcode-usage {
62
- width: 30%
63
- }
64
-
65
- .btif-option-field-wrap label {
66
- width: 150px;
67
- padding-right: 20px;
68
- margin: 0;
69
- }
70
- .btif-option-field-wrap input[type="text"],
71
- .btif-option-field-wrap input[type="number"],
72
- .btif-option-field-wrap select {
73
- width: 320px;
74
- height: 35px;
75
- box-shadow: none;
76
- }
77
-
78
- .btif-option-field-wrap {
79
- margin-bottom: 25px;
80
- }
81
-
82
- p.btif-description {
83
- margin-left: 175px;
84
- font-style: italic;
85
- }
86
-
87
- .btif-settings-form .button-connect {
88
- margin-bottom: 40px;
89
- }
90
-
91
- .btif-settings-form .blossomthemes-instagram-feed-settings-submit {
92
- border-top: 1px solid rgba(0,0,0,0.1);
93
- margin-top: 40px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  }
1
+ .btss-backend-sidebar {
2
+ display: inline-block;
3
+ float: right;
4
+ width: 20%
5
+ }
6
+
7
+ .btss-backend-sidebar .thumbnail {
8
+ padding: 12px;
9
+ line-height: 1.4em;
10
+ font-size: 13px;
11
+ border: 1px solid #e5e5e5;
12
+ box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
13
+ background: #fff;
14
+ margin-bottom: 20px
15
+ }
16
+
17
+ form.btif-settings-form {
18
+ background: #fff;
19
+ padding: 10px;
20
+ width: 78%;
21
+ float: left
22
+ }
23
+
24
+ .thumbnail-review {
25
+ background: #fff;
26
+ padding: 12px;
27
+ margin: 0
28
+ }
29
+
30
+ .btif-option-field-wrap label {
31
+ margin: 10px 15px 10px 0;
32
+ display: inline-block;
33
+ font-weight: 600
34
+ }
35
+
36
+ .btif-inner-wrap .nav-tab-active,
37
+ .btif-inner-wrap .nav-tab-active:focus,
38
+ .btif-inner-wrap .nav-tab-active:focus:active,
39
+ .btif-inner-wrap .nav-tab-active:hover {
40
+ border-bottom: 1px solid #fff;
41
+ background: #fff;
42
+ color: #000
43
+ }
44
+
45
+ .btif-inner-wrap {
46
+ background: #fff;
47
+ width: 77.5%;
48
+ float: left;
49
+ padding: 15px;
50
+ border: 1px solid #ddd
51
+ }
52
+
53
+ .blossomthemes-instagram-feed-settings {
54
+ display: none
55
+ }
56
+
57
+ .blossomthemes-instagram-feed-settings.general {
58
+ display: block
59
+ }
60
+
61
+ div#blossomthemes-instagram-feed-settings-usage .shortcode-usage {
62
+ width: 30%
63
+ }
64
+
65
+ .btif-option-field-wrap label {
66
+ width: 150px;
67
+ padding-right: 20px;
68
+ margin: 0
69
+ }
70
+
71
+ .btif-option-field-wrap input[type="text"],
72
+ .btif-option-field-wrap input[type="number"],
73
+ .btif-option-field-wrap select {
74
+ width: 320px;
75
+ height: 35px;
76
+ box-shadow: none
77
+ }
78
+
79
+ .btif-option-field-wrap {
80
+ margin-bottom: 25px;
81
+ }
82
+
83
+ .blossomthemes-instagram-feed-settings
84
+ .btif-option-field-wrap:last-child {
85
+ display: flex;
86
+ flex: auto;
87
+ align-items: center;
88
+ }
89
+
90
+ #btif-fetch-new-posts {
91
+ height: 35px;
92
+ display: flex;
93
+ justify-content: center;
94
+ align-items: center;
95
+ }
96
+
97
+ #btif-fetch-new-posts-loader,
98
+ #btif-fetch-new-posts-success,
99
+ #btif-fetch-new-posts-failure {
100
+ display: inline-flex;
101
+ }
102
+
103
+
104
+ p.btif-description {
105
+ margin-left: 175px;
106
+ font-style: italic
107
+ }
108
+
109
+ .btif-settings-form .button-connect {
110
+ margin-bottom: 40px
111
+ }
112
+
113
+ .btif-settings-form .blossomthemes-instagram-feed-settings-submit {
114
+ border-top: 1px solid rgba(0, 0, 0, .1);
115
+ margin-top: 40px
116
+ }
117
+
118
+ .blossomthemes-instagram-feed-settings .btif-option-field-wrap:nth-last-of-type(2) {
119
+ display: flex;
120
+ flex-wrap: wrap;
121
+ align-items: center;
122
+ }
123
+
124
+ .blossomthemes-instagram-feed-settings .btif-option-field-wrap:nth-last-of-type(2) input,
125
+ .blossomthemes-instagram-feed-settings .btif-option-field-wrap:nth-last-of-type(2) select {
126
+ margin-right: 10px;
127
+ }
128
+
129
+ .blossomthemes-instagram-feed-settings .btif-option-field-wrap:nth-last-of-type(2) #btif-fetch-new-posts {
130
+ display: inline-flex;
131
+ }
132
+
133
+ /* .blossomthemes-instagram-feed-settings .btif-option-field-wrap:last-child {
134
+ display: block;
135
+ } */
136
+
137
+ .blossomthemes-instagram-feed-settings .btif-option-field-wrap:last-child p.btif-description {
138
+ margin-left: 8px;
139
+ margin-top: 8px;
140
  }
admin/css/blossomthemes-instagram-feed-admin.min.css DELETED
@@ -1,116 +0,0 @@
1
- .btss-backend-sidebar {
2
- display: inline-block;
3
- float: right;
4
- width: 20%
5
- }
6
-
7
- .btss-backend-sidebar .thumbnail {
8
- padding: 12px;
9
- line-height: 1.4em;
10
- font-size: 13px;
11
- border: 1px solid #e5e5e5;
12
- box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
13
- background: #fff;
14
- margin-bottom: 20px
15
- }
16
-
17
- form.btif-settings-form {
18
- background: #fff;
19
- padding: 10px;
20
- width: 78%;
21
- float: left
22
- }
23
-
24
- .thumbnail-review {
25
- background: #fff;
26
- padding: 12px;
27
- margin: 0
28
- }
29
-
30
- .btif-option-field-wrap label {
31
- margin: 10px 15px 10px 0;
32
- display: inline-block;
33
- font-weight: 600
34
- }
35
-
36
- .btif-inner-wrap .nav-tab-active,
37
- .btif-inner-wrap .nav-tab-active:focus,
38
- .btif-inner-wrap .nav-tab-active:focus:active,
39
- .btif-inner-wrap .nav-tab-active:hover {
40
- border-bottom: 1px solid #fff;
41
- background: #fff;
42
- color: #000
43
- }
44
-
45
- .btif-inner-wrap {
46
- background: #fff;
47
- width: 77.5%;
48
- float: left;
49
- padding: 15px;
50
- border: 1px solid #ddd
51
- }
52
-
53
- .blossomthemes-instagram-feed-settings {
54
- display: none
55
- }
56
-
57
- .blossomthemes-instagram-feed-settings.general {
58
- display: block
59
- }
60
-
61
- div#blossomthemes-instagram-feed-settings-usage .shortcode-usage {
62
- width: 30%
63
- }
64
-
65
- .btif-option-field-wrap label {
66
- width: 150px;
67
- padding-right: 20px;
68
- margin: 0
69
- }
70
-
71
- .btif-option-field-wrap input[type="text"],
72
- .btif-option-field-wrap input[type="number"],
73
- .btif-option-field-wrap select {
74
- width: 320px;
75
- height: 35px;
76
- box-shadow: none
77
- }
78
-
79
- .btif-option-field-wrap {
80
- margin-bottom: 25px;
81
- }
82
-
83
- .blossomthemes-instagram-feed-settings
84
- .btif-option-field-wrap:last-child {
85
- display: flex;
86
- flex: auto;
87
- align-items: center;
88
- }
89
-
90
- #btif-fetch-new-posts {
91
- height: 35px;
92
- display: flex;
93
- justify-content: center;
94
- align-items: center;
95
- }
96
-
97
- #btif-fetch-new-posts-loader,
98
- #btif-fetch-new-posts-success,
99
- #btif-fetch-new-posts-failure {
100
- display: inline-flex;
101
- }
102
-
103
-
104
- p.btif-description {
105
- margin-left: 175px;
106
- font-style: italic
107
- }
108
-
109
- .btif-settings-form .button-connect {
110
- margin-bottom: 40px
111
- }
112
-
113
- .btif-settings-form .blossomthemes-instagram-feed-settings-submit {
114
- border-top: 1px solid rgba(0, 0, 0, .1);
115
- margin-top: 40px
116
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/js/{blossomthemes-instagram-feed-admin.min.js → blossomthemes-instagram-feed-admin.js} RENAMED
@@ -1,12 +1,12 @@
1
  jQuery(document).ready(function($) {
2
- $(".btss-tab-trigger").click(function() {
3
  $(".btss-tab-trigger").removeClass("nav-tab-active"), $(this).addClass("nav-tab-active");
4
  var s = $(this).data("configuration");
5
  $(".blossomthemes-instagram-feed-settings").hide(), $("#blossomthemes-instagram-feed-settings-" + s).show();
6
  });
7
 
8
  // Fetched new instagram posts.
9
- $("#btif-fetch-new-posts").click(function(event){
10
  $.ajax({
11
  url: blossomthemesInstagramFeed.ajaxurl,
12
  type: 'post',
1
  jQuery(document).ready(function($) {
2
+ $(".btss-tab-trigger").on('click', function() {
3
  $(".btss-tab-trigger").removeClass("nav-tab-active"), $(this).addClass("nav-tab-active");
4
  var s = $(this).data("configuration");
5
  $(".blossomthemes-instagram-feed-settings").hide(), $("#blossomthemes-instagram-feed-settings-" + s).show();
6
  });
7
 
8
  // Fetched new instagram posts.
9
+ $("#btif-fetch-new-posts").on('click', function(event){
10
  $.ajax({
11
  url: blossomthemesInstagramFeed.ajaxurl,
12
  type: 'post',
blossomthemes-instagram-feed.php CHANGED
@@ -1,84 +1,84 @@
1
- <?php
2
- /**
3
- * The plugin bootstrap file
4
- *
5
- * This file is read by WordPress to generate the plugin information in the plugin
6
- * admin area. This file also includes all of the dependencies used by the plugin,
7
- * registers the activation and deactivation functions, and defines a function
8
- * that starts the plugin.
9
- *
10
- * @link https://blossomthemes.com
11
- * @since 1.0.0
12
- * @package Blossomthemes_Instagram_Feed
13
- *
14
- * @wordpress-plugin
15
- * Plugin Name: BlossomThemes Social Feed
16
- * Plugin URI: https://wordpress.org/plugins/blossomthemes-instagram-feed
17
- * Description: Show instagram feed on your website using shortcode and widget.
18
- * Version: 2.0.1
19
- * Author: blossomthemes
20
- * Author URI: https://blossomthemes.com
21
- * License: GPL-2.0+
22
- * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
23
- * Text Domain: blossomthemes-instagram-feed
24
- * Domain Path: /languages
25
- */
26
-
27
- // If this file is called directly, abort.
28
- if ( ! defined( 'WPINC' ) ) {
29
- die;
30
- }
31
-
32
- define( 'BTIF_BASE_PATH', dirname( __FILE__ ) );
33
- define( 'BTIF_FILE_PATH', __FILE__ );
34
- define( 'BTIF_FILE_URL', rtrim( plugin_dir_url( __FILE__ ), '/' ) );
35
- define( 'BTIF_PLUGIN_VERSION', '2.0.1' );
36
-
37
- // Instagram API image limit.
38
- if ( ! defined( 'BTIF_INSTAGRAM_API_IMAGE_LIMIT' ) ) {
39
- define( 'BTIF_INSTAGRAM_API_IMAGE_LIMIT', 25 );
40
- }
41
-
42
- /**
43
- * The code that runs during plugin activation.
44
- * This action is documented in includes/class-blossomthemes-instagram-feed-activator.php
45
- */
46
- function activate_blossomthemes_instagram_feed() {
47
- require_once plugin_dir_path( __FILE__ ) . 'includes/class-blossomthemes-instagram-feed-activator.php';
48
- Blossomthemes_Instagram_Feed_Activator::activate();
49
- }
50
-
51
- /**
52
- * The code that runs during plugin deactivation.
53
- * This action is documented in includes/class-blossomthemes-instagram-feed-deactivator.php
54
- */
55
- function deactivate_blossomthemes_instagram_feed() {
56
- require_once plugin_dir_path( __FILE__ ) . 'includes/class-blossomthemes-instagram-feed-deactivator.php';
57
- Blossomthemes_Instagram_Feed_Deactivator::deactivate();
58
- }
59
-
60
- register_activation_hook( __FILE__, 'activate_blossomthemes_instagram_feed' );
61
- register_deactivation_hook( __FILE__, 'deactivate_blossomthemes_instagram_feed' );
62
-
63
- /**
64
- * The core plugin class that is used to define internationalization,
65
- * admin-specific hooks, and public-facing site hooks.
66
- */
67
- require plugin_dir_path( __FILE__ ) . 'includes/class-blossomthemes-instagram-feed.php';
68
-
69
- /**
70
- * Begins execution of the plugin.
71
- *
72
- * Since everything within the plugin is registered via hooks,
73
- * then kicking off the plugin from this point in the file does
74
- * not affect the page life cycle.
75
- *
76
- * @since 1.0.0
77
- */
78
- function run_blossomthemes_instagram_feed() {
79
-
80
- $plugin = new Blossomthemes_Instagram_Feed();
81
- $plugin->run();
82
-
83
- }
84
- run_blossomthemes_instagram_feed();
1
+ <?php
2
+ /**
3
+ * The plugin bootstrap file
4
+ *
5
+ * This file is read by WordPress to generate the plugin information in the plugin
6
+ * admin area. This file also includes all of the dependencies used by the plugin,
7
+ * registers the activation and deactivation functions, and defines a function
8
+ * that starts the plugin.
9
+ *
10
+ * @link https://blossomthemes.com
11
+ * @since 1.0.0
12
+ * @package Blossomthemes_Instagram_Feed
13
+ *
14
+ * @wordpress-plugin
15
+ * Plugin Name: BlossomThemes Social Feed
16
+ * Plugin URI: https://wordpress.org/plugins/blossomthemes-instagram-feed
17
+ * Description: Show instagram feed on your website using shortcode and widget.
18
+ * Version: 2.0.2
19
+ * Author: blossomthemes
20
+ * Author URI: https://blossomthemes.com
21
+ * License: GPL-2.0+
22
+ * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
23
+ * Text Domain: blossomthemes-instagram-feed
24
+ * Domain Path: /languages
25
+ */
26
+
27
+ // If this file is called directly, abort.
28
+ if ( ! defined( 'WPINC' ) ) {
29
+ die;
30
+ }
31
+
32
+ define( 'BTIF_BASE_PATH', dirname( __FILE__ ) );
33
+ define( 'BTIF_FILE_PATH', __FILE__ );
34
+ define( 'BTIF_FILE_URL', rtrim( plugin_dir_url( __FILE__ ), '/' ) );
35
+ define( 'BTIF_PLUGIN_VERSION', '2.0.2' );
36
+
37
+ // Instagram API image limit.
38
+ if ( ! defined( 'BTIF_INSTAGRAM_API_IMAGE_LIMIT' ) ) {
39
+ define( 'BTIF_INSTAGRAM_API_IMAGE_LIMIT', 25 );
40
+ }
41
+
42
+ /**
43
+ * The code that runs during plugin activation.
44
+ * This action is documented in includes/class-blossomthemes-instagram-feed-activator.php
45
+ */
46
+ function activate_blossomthemes_instagram_feed() {
47
+ require_once plugin_dir_path( __FILE__ ) . 'includes/class-blossomthemes-instagram-feed-activator.php';
48
+ Blossomthemes_Instagram_Feed_Activator::activate();
49
+ }
50
+
51
+ /**
52
+ * The code that runs during plugin deactivation.
53
+ * This action is documented in includes/class-blossomthemes-instagram-feed-deactivator.php
54
+ */
55
+ function deactivate_blossomthemes_instagram_feed() {
56
+ require_once plugin_dir_path( __FILE__ ) . 'includes/class-blossomthemes-instagram-feed-deactivator.php';
57
+ Blossomthemes_Instagram_Feed_Deactivator::deactivate();
58
+ }
59
+
60
+ register_activation_hook( __FILE__, 'activate_blossomthemes_instagram_feed' );
61
+ register_deactivation_hook( __FILE__, 'deactivate_blossomthemes_instagram_feed' );
62
+
63
+ /**
64
+ * The core plugin class that is used to define internationalization,
65
+ * admin-specific hooks, and public-facing site hooks.
66
+ */
67
+ require plugin_dir_path( __FILE__ ) . 'includes/class-blossomthemes-instagram-feed.php';
68
+
69
+ /**
70
+ * Begins execution of the plugin.
71
+ *
72
+ * Since everything within the plugin is registered via hooks,
73
+ * then kicking off the plugin from this point in the file does
74
+ * not affect the page life cycle.
75
+ *
76
+ * @since 1.0.0
77
+ */
78
+ function run_blossomthemes_instagram_feed() {
79
+
80
+ $plugin = new Blossomthemes_Instagram_Feed();
81
+ $plugin->run();
82
+
83
+ }
84
+ run_blossomthemes_instagram_feed();
includes/class-blossomthemes-instagram-feed-settings.php CHANGED
@@ -108,6 +108,8 @@ class BlossomThemes_Instagram_Feed_Settings {
108
  if ( isset( $_GET['error_reason'] ) ) {
109
  update_option( 'blossomthemes_instagram_invalid_token', true, false );
110
  }
 
 
111
 
112
  extract( $options );
113
 
@@ -122,13 +124,14 @@ class BlossomThemes_Instagram_Feed_Settings {
122
  $settings = get_option( 'blossomthemes_instagram_feed_settings' );
123
 
124
  $settings = wp_parse_args( $settings, array(
125
- 'access_token' => '',
126
- 'username' => '',
127
- 'photos' => 5,
128
- 'photos_row' => 5,
129
- 'follow_me' => 'Follow Me!',
130
- 'pull_duration' => 1,
131
- 'pull_unit' => 'days',
 
132
  ) );
133
 
134
  return $settings;
108
  if ( isset( $_GET['error_reason'] ) ) {
109
  update_option( 'blossomthemes_instagram_invalid_token', true, false );
110
  }
111
+
112
+ $options['enable_lazy_load'] = isset( $options['enable_lazy_load'] ) && '' != $options['enable_lazy_load'] ? $options['enable_lazy_load'] : '';
113
 
114
  extract( $options );
115
 
124
  $settings = get_option( 'blossomthemes_instagram_feed_settings' );
125
 
126
  $settings = wp_parse_args( $settings, array(
127
+ 'access_token' => '',
128
+ 'username' => '',
129
+ 'photos' => 5,
130
+ 'photos_row' => 5,
131
+ 'follow_me' => 'Follow Me!',
132
+ 'pull_duration' => 1,
133
+ 'pull_unit' => 'days',
134
+ 'enable_lazy_load' => '',
135
  ) );
136
 
137
  return $settings;
includes/template/backend/general.php CHANGED
@@ -157,5 +157,20 @@
157
  </span>
158
  </button>
159
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
160
  </div>
161
  <?php
157
  </span>
158
  </button>
159
  </div>
160
+
161
+ <!-- Lazy Load enable input -->
162
+ <div class="btif-option-field-wrap">
163
+ <label for="blossomthemes_instagram_feed_settings[enable_lazy_load]">
164
+ <?php _e('Lazy Load', 'blossomthemes-instagram-feed'); ?>
165
+ </label>
166
+ <input id="blossomthemes_instagram_feed_settings[enable_lazy_load]"
167
+ name="blossomthemes_instagram_feed_settings[enable_lazy_load]" type="checkbox"
168
+ value="1" <?php checked( $enable_lazy_load, 1 ); ?>/>
169
+
170
+ <p class="btif-description">
171
+ <?php _e( 'Enable lazy loading of Instagram images.', 'blossomthemes-instagram-feed' ); ?>
172
+ </p>
173
+ </div>
174
+ <!-- ./ Lazy Load enable input -->
175
  </div>
176
  <?php
includes/widgets/widget-blossomthemes-instagram-feed.php CHANGED
@@ -41,7 +41,7 @@ class BlossomThemes_Instagram_Widget extends WP_Widget {
41
  $title = empty( $instance['title'] ) ? '' : $instance['title'];
42
  $settings['photos'] = empty( $instance['number'] ) ? 6 : $instance['number'];
43
  $settings['photos_row'] = empty( $instance['per_row'] ) ? 5 : $instance['per_row'];
44
- $username = empty( $instance['username'] ) ? $options['username'] : $instance['username'];
45
  $instaUrl = 'https://www.instagram.com/'.$username ;
46
  $settings['follow_me'] = 'Follow Me!';
47
 
41
  $title = empty( $instance['title'] ) ? '' : $instance['title'];
42
  $settings['photos'] = empty( $instance['number'] ) ? 6 : $instance['number'];
43
  $settings['photos_row'] = empty( $instance['per_row'] ) ? 5 : $instance['per_row'];
44
+ $username = empty( $instance['username'] ) ? $settings['username'] : $instance['username'];
45
  $instaUrl = 'https://www.instagram.com/'.$username ;
46
  $settings['follow_me'] = 'Follow Me!';
47
 
languages/blossomthemes-instagram-feed.pot CHANGED
@@ -1,14 +1,14 @@
1
- # Copyright (C) 2020 blossomthemes
2
  # This file is distributed under the GPL-2.0+.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: BlossomThemes Social Feed 2.0.1\n"
6
  "Report-Msgid-Bugs-To: \n"
7
- "POT-Creation-Date: 2020-11-23 06:26:43+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
- "PO-Revision-Date: 2020-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: WP Travel Engine\n"
13
  "Language-Team: \n"
14
  "X-Poedit-KeywordsList: "
@@ -147,6 +147,14 @@ msgstr ""
147
  msgid "Fetch new posts"
148
  msgstr ""
149
 
 
 
 
 
 
 
 
 
150
  #. Plugin Name of the plugin/theme
151
  msgid "BlossomThemes Social Feed"
152
  msgstr ""
1
+ # Copyright (C) 2021 blossomthemes
2
  # This file is distributed under the GPL-2.0+.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: BlossomThemes Social Feed 2.0.2\n"
6
  "Report-Msgid-Bugs-To: \n"
7
+ "POT-Creation-Date: 2021-03-24 12:18:38+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2021-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: WP Travel Engine\n"
13
  "Language-Team: \n"
14
  "X-Poedit-KeywordsList: "
147
  msgid "Fetch new posts"
148
  msgstr ""
149
 
150
+ #: includes/template/backend/general.php:164
151
+ msgid "Lazy Load"
152
+ msgstr ""
153
+
154
+ #: includes/template/backend/general.php:171
155
+ msgid "Enable lazy loading of Instagram images."
156
+ msgstr ""
157
+
158
  #. Plugin Name of the plugin/theme
159
  msgid "BlossomThemes Social Feed"
160
  msgstr ""
public/class-blossomthemes-instagram-feed-public.php CHANGED
@@ -73,7 +73,7 @@ class Blossomthemes_Instagram_Feed_Public {
73
  * class.
74
  */
75
 
76
- wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/blossomthemes-instagram-feed-public.min.css', array(), $this->version, 'all' );
77
  wp_enqueue_style( 'magnific-popup', plugin_dir_url( __FILE__ ) . 'css/magnific-popup.min.css', array(), '1.0.0', 'all' );
78
  }
79
 
@@ -96,7 +96,7 @@ class Blossomthemes_Instagram_Feed_Public {
96
  * class.
97
  */
98
 
99
- wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/blossomthemes-instagram-feed-public.min.js', array( 'jquery' ), $this->version, true );
100
 
101
  $magnific_popup = apply_filters('btif_magnific_popup_enqueue',true);
102
  if( $magnific_popup == true )
@@ -104,6 +104,13 @@ class Blossomthemes_Instagram_Feed_Public {
104
  wp_enqueue_script( 'magnific-popup', plugin_dir_url( __FILE__ ) . 'js/jquery.magnific-popup.min.js', array( 'jquery' ), '1.0.0', true );
105
  }
106
 
 
 
 
 
 
 
 
107
  }
108
 
109
  /**
@@ -116,7 +123,7 @@ class Blossomthemes_Instagram_Feed_Public {
116
  if( is_admin() || $btif_assets == true ) return $tag;
117
 
118
  $async_files = apply_filters( 'btif_js_async_files', array(
119
- plugin_dir_url( __FILE__ ) . 'js/blossomthemes-instagram-feed-public.min.js',
120
  plugin_dir_url( __FILE__ ) . 'js/jquery.magnific-popup.min.js'
121
  ) );
122
 
73
  * class.
74
  */
75
 
76
+ wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/blossomthemes-instagram-feed-public.css', array(), $this->version, 'all' );
77
  wp_enqueue_style( 'magnific-popup', plugin_dir_url( __FILE__ ) . 'css/magnific-popup.min.css', array(), '1.0.0', 'all' );
78
  }
79
 
96
  * class.
97
  */
98
 
99
+ wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/blossomthemes-instagram-feed-public.js', array( 'jquery' ), $this->version, true );
100
 
101
  $magnific_popup = apply_filters('btif_magnific_popup_enqueue',true);
102
  if( $magnific_popup == true )
104
  wp_enqueue_script( 'magnific-popup', plugin_dir_url( __FILE__ ) . 'js/jquery.magnific-popup.min.js', array( 'jquery' ), '1.0.0', true );
105
  }
106
 
107
+ // Get feed settings.
108
+ $settings = BlossomThemes_Instagram_Feed_Settings::get_settings();
109
+
110
+ if( $settings['enable_lazy_load'] ) {
111
+ wp_enqueue_script( 'jquery-lazy', plugin_dir_url( __FILE__ ) . 'js/jquery.lazy.min.js', array( 'jquery' ), '1.7.10', true );
112
+ }
113
+
114
  }
115
 
116
  /**
123
  if( is_admin() || $btif_assets == true ) return $tag;
124
 
125
  $async_files = apply_filters( 'btif_js_async_files', array(
126
+ plugin_dir_url( __FILE__ ) . 'js/blossomthemes-instagram-feed-public.js',
127
  plugin_dir_url( __FILE__ ) . 'js/jquery.magnific-popup.min.js'
128
  ) );
129
 
public/css/{blossomthemes-instagram-feed-public.min.css → blossomthemes-instagram-feed-public.css} RENAMED
File without changes
public/js/blossomthemes-instagram-feed-public.js ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function(e) {
2
+ e(".popup-gallery").magnificPopup({
3
+ delegate: "a",
4
+ type: "image",
5
+ gallery: {
6
+ enabled: !0
7
+ }
8
+ }), e(".popup-modal").magnificPopup({
9
+ type: "inline",
10
+ preloader: !1,
11
+ focus: "#username",
12
+ modal: !0
13
+ }), e(document).on("click", ".popup-modal-dismiss", function(p) {
14
+ p.preventDefault(), e.magnificPopup.close()
15
+ });
16
+
17
+ if (e.fn.Lazy) {
18
+ e('.btif-lazy-load').Lazy({
19
+ // your configuration goes here
20
+ scrollDirection: 'vertical',
21
+ effect: 'fadeIn',
22
+ visibleOnly: true,
23
+ // called after an element was successfully handled
24
+ afterLoad: function(element) {
25
+ var imageAlt = element.data('alt');
26
+ element.attr("alt", imageAlt);
27
+ element.removeAttr( "data-alt" )
28
+ },
29
+ onError: function(element) {
30
+ console.log('error loading ' + element.data('src'));
31
+ },
32
+ });
33
+ }
34
+ });
public/js/blossomthemes-instagram-feed-public.min.js DELETED
@@ -1,16 +0,0 @@
1
- jQuery(document).ready(function(e) {
2
- e(".popup-gallery").magnificPopup({
3
- delegate: "a",
4
- type: "image",
5
- gallery: {
6
- enabled: !0
7
- }
8
- }), e(".popup-modal").magnificPopup({
9
- type: "inline",
10
- preloader: !1,
11
- focus: "#username",
12
- modal: !0
13
- }), e(document).on("click", ".popup-modal-dismiss", function(p) {
14
- p.preventDefault(), e.magnificPopup.close()
15
- });
16
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
public/js/jquery.lazy.min.js ADDED
@@ -0,0 +1,2 @@
 
 
1
+ /*! jQuery & Zepto Lazy v1.7.10 - http://jquery.eisbehr.de/lazy - MIT&GPL-2.0 license - Copyright 2012-2018 Daniel 'Eisbehr' Kern */
2
+ !function(t,e){"use strict";function r(r,a,i,u,l){function f(){L=t.devicePixelRatio>1,i=c(i),a.delay>=0&&setTimeout(function(){s(!0)},a.delay),(a.delay<0||a.combined)&&(u.e=v(a.throttle,function(t){"resize"===t.type&&(w=B=-1),s(t.all)}),u.a=function(t){t=c(t),i.push.apply(i,t)},u.g=function(){return i=n(i).filter(function(){return!n(this).data(a.loadedName)})},u.f=function(t){for(var e=0;e<t.length;e++){var r=i.filter(function(){return this===t[e]});r.length&&s(!1,r)}},s(),n(a.appendScroll).on("scroll."+l+" resize."+l,u.e))}function c(t){var i=a.defaultImage,o=a.placeholder,u=a.imageBase,l=a.srcsetAttribute,f=a.loaderAttribute,c=a._f||{};t=n(t).filter(function(){var t=n(this),r=m(this);return!t.data(a.handledName)&&(t.attr(a.attribute)||t.attr(l)||t.attr(f)||c[r]!==e)}).data("plugin_"+a.name,r);for(var s=0,d=t.length;s<d;s++){var A=n(t[s]),g=m(t[s]),h=A.attr(a.imageBaseAttribute)||u;g===N&&h&&A.attr(l)&&A.attr(l,b(A.attr(l),h)),c[g]===e||A.attr(f)||A.attr(f,c[g]),g===N&&i&&!A.attr(E)?A.attr(E,i):g===N||!o||A.css(O)&&"none"!==A.css(O)||A.css(O,"url('"+o+"')")}return t}function s(t,e){if(!i.length)return void(a.autoDestroy&&r.destroy());for(var o=e||i,u=!1,l=a.imageBase||"",f=a.srcsetAttribute,c=a.handledName,s=0;s<o.length;s++)if(t||e||A(o[s])){var g=n(o[s]),h=m(o[s]),b=g.attr(a.attribute),v=g.attr(a.imageBaseAttribute)||l,p=g.attr(a.loaderAttribute);g.data(c)||a.visibleOnly&&!g.is(":visible")||!((b||g.attr(f))&&(h===N&&(v+b!==g.attr(E)||g.attr(f)!==g.attr(F))||h!==N&&v+b!==g.css(O))||p)||(u=!0,g.data(c,!0),d(g,h,v,p))}u&&(i=n(i).filter(function(){return!n(this).data(c)}))}function d(t,e,r,i){++z;var o=function(){y("onError",t),p(),o=n.noop};y("beforeLoad",t);var u=a.attribute,l=a.srcsetAttribute,f=a.sizesAttribute,c=a.retinaAttribute,s=a.removeAttribute,d=a.loadedName,A=t.attr(c);if(i){var g=function(){s&&t.removeAttr(a.loaderAttribute),t.data(d,!0),y(T,t),setTimeout(p,1),g=n.noop};t.off(I).one(I,o).one(D,g),y(i,t,function(e){e?(t.off(D),g()):(t.off(I),o())})||t.trigger(I)}else{var h=n(new Image);h.one(I,o).one(D,function(){t.hide(),e===N?t.attr(C,h.attr(C)).attr(F,h.attr(F)).attr(E,h.attr(E)):t.css(O,"url('"+h.attr(E)+"')"),t[a.effect](a.effectTime),s&&(t.removeAttr(u+" "+l+" "+c+" "+a.imageBaseAttribute),f!==C&&t.removeAttr(f)),t.data(d,!0),y(T,t),h.remove(),p()});var m=(L&&A?A:t.attr(u))||"";h.attr(C,t.attr(f)).attr(F,t.attr(l)).attr(E,m?r+m:null),h.complete&&h.trigger(D)}}function A(t){var e=t.getBoundingClientRect(),r=a.scrollDirection,n=a.threshold,i=h()+n>e.top&&-n<e.bottom,o=g()+n>e.left&&-n<e.right;return"vertical"===r?i:"horizontal"===r?o:i&&o}function g(){return w>=0?w:w=n(t).width()}function h(){return B>=0?B:B=n(t).height()}function m(t){return t.tagName.toLowerCase()}function b(t,e){if(e){var r=t.split(",");t="";for(var a=0,n=r.length;a<n;a++)t+=e+r[a].trim()+(a!==n-1?",":"")}return t}function v(t,e){var n,i=0;return function(o,u){function l(){i=+new Date,e.call(r,o)}var f=+new Date-i;n&&clearTimeout(n),f>t||!a.enableThrottle||u?l():n=setTimeout(l,t-f)}}function p(){--z,i.length||z||y("onFinishedAll")}function y(t,e,n){return!!(t=a[t])&&(t.apply(r,[].slice.call(arguments,1)),!0)}var z=0,w=-1,B=-1,L=!1,T="afterLoad",D="load",I="error",N="img",E="src",F="srcset",C="sizes",O="background-image";"event"===a.bind||o?f():n(t).on(D+"."+l,f)}function a(a,o){var u=this,l=n.extend({},u.config,o),f={},c=l.name+"-"+ ++i;return u.config=function(t,r){return r===e?l[t]:(l[t]=r,u)},u.addItems=function(t){return f.a&&f.a("string"===n.type(t)?n(t):t),u},u.getItems=function(){return f.g?f.g():{}},u.update=function(t){return f.e&&f.e({},!t),u},u.force=function(t){return f.f&&f.f("string"===n.type(t)?n(t):t),u},u.loadAll=function(){return f.e&&f.e({all:!0},!0),u},u.destroy=function(){return n(l.appendScroll).off("."+c,f.e),n(t).off("."+c),f={},e},r(u,l,a,f,c),l.chainable?a:u}var n=t.jQuery||t.Zepto,i=0,o=!1;n.fn.Lazy=n.fn.lazy=function(t){return new a(this,t)},n.Lazy=n.lazy=function(t,r,i){if(n.isFunction(r)&&(i=r,r=[]),n.isFunction(i)){t=n.isArray(t)?t:[t],r=n.isArray(r)?r:[r];for(var o=a.prototype.config,u=o._f||(o._f={}),l=0,f=t.length;l<f;l++)(o[t[l]]===e||n.isFunction(o[t[l]]))&&(o[t[l]]=i);for(var c=0,s=r.length;c<s;c++)u[r[c]]=t[0]}},a.prototype.config={name:"lazy",chainable:!0,autoDestroy:!0,bind:"load",threshold:500,visibleOnly:!1,appendScroll:t,scrollDirection:"both",imageBase:null,defaultImage:"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",placeholder:null,delay:-1,combined:!1,attribute:"data-src",srcsetAttribute:"data-srcset",sizesAttribute:"data-sizes",retinaAttribute:"data-retina",loaderAttribute:"data-loader",imageBaseAttribute:"data-imagebase",removeAttribute:!0,handledName:"handled",loadedName:"loaded",effect:"show",effectTime:0,enableThrottle:!0,throttle:250,beforeLoad:e,afterLoad:e,onError:e,onFinishedAll:e},n(t).on("load",function(){o=!0})}(window);
public/partials/blossomthemes-instagram-feed-public-display.php CHANGED
@@ -1,38 +1,48 @@
1
- <?php
2
-
3
- /**
4
- * Provide a public-facing view for the plugin
5
- *
6
- * This file is used to markup the public-facing aspects of the plugin.
7
- *
8
- * @link https://blossomthemes.com
9
- * @since 1.0.0
10
- *
11
- * @package Blossomthemes_Instagram_Feed
12
- * @subpackage Blossomthemes_Instagram_Feed/public/partials
13
- */
14
- ?>
15
-
16
- <!-- This file should primarily consist of HTML with a little bit of PHP. -->
17
- <ul class="popup-gallery photos-<?php echo $settings['photos_row'];?>">
18
- <?php foreach ( $items as $item ) : ?>
19
- <li>
20
- <?php if( 'VIDEO' === $item->media_type ) : ?>
21
- <a href="<?php echo esc_url($item->media_url); ?>" class="mfp-iframe">
22
- <img src="<?php echo esc_url($item->thumbnail_url); ?>"
23
- alt="<?php echo esc_attr($item->caption); ?>">
24
- </a>
25
- <?php else: ?>
26
- <a href="<?php echo esc_url($item->media_url); ?>">
27
- <img src="<?php echo esc_url($item->media_url); ?>"
28
- alt="<?php echo esc_attr($item->caption); ?>">
29
- </a>
30
- <?php endif; ?>
31
- </li>
32
- <?php endforeach; ?>
33
- </ul>
34
-
35
- <a class="profile-link" href="<?php echo esc_url($instaUrl);?>" target="_blank" rel="noreferrer">
36
- <span class="insta-icon"><i class="fab fa-instagram"></i></span><?php echo esc_html( $settings['follow_me'] );?>
37
- </a>
38
- <?php
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Provide a public-facing view for the plugin
5
+ *
6
+ * This file is used to markup the public-facing aspects of the plugin.
7
+ *
8
+ * @link https://blossomthemes.com
9
+ * @since 1.0.0
10
+ *
11
+ * @package Blossomthemes_Instagram_Feed
12
+ * @subpackage Blossomthemes_Instagram_Feed/public/partials
13
+ */
14
+ ?>
15
+
16
+ <!-- This file should primarily consist of HTML with a little bit of PHP. -->
17
+ <ul class="popup-gallery photos-<?php echo $settings['photos_row'];?>">
18
+ <?php foreach ( $items as $item ) : ?>
19
+ <li>
20
+ <?php if( 'VIDEO' === $item->media_type ) : ?>
21
+ <a href="<?php echo esc_url($item->media_url); ?>" class="mfp-iframe">
22
+ <?php if( $settings['enable_lazy_load'] ) : ?>
23
+ <img class="btif-lazy-load" data-src="<?php echo esc_url($item->thumbnail_url); ?>"
24
+ data-alt="<?php echo esc_attr($item->caption); ?>">
25
+ <?php else: ?>
26
+ <img src="<?php echo esc_url($item->thumbnail_url); ?>"
27
+ alt="<?php echo esc_attr($item->caption); ?>">
28
+ <?php endif; ?>
29
+ </a>
30
+ <?php else: ?>
31
+ <a href="<?php echo esc_url($item->media_url); ?>">
32
+ <?php if( $settings['enable_lazy_load'] ) : ?>
33
+ <img class="btif-lazy-load" data-src="<?php echo esc_url($item->media_url); ?>"
34
+ data-alt="<?php echo esc_attr($item->caption); ?>">
35
+ <?php else: ?>
36
+ <img src="<?php echo esc_url($item->media_url); ?>"
37
+ alt="<?php echo esc_attr($item->caption); ?>">
38
+ <?php endif; ?>
39
+ </a>
40
+ <?php endif; ?>
41
+ </li>
42
+ <?php endforeach; ?>
43
+ </ul>
44
+
45
+ <a class="profile-link" href="<?php echo esc_url($instaUrl);?>" target="_blank" rel="noreferrer">
46
+ <span class="insta-icon"><i class="fab fa-instagram"></i></span><?php echo esc_html( $settings['follow_me'] );?>
47
+ </a>
48
+ <?php