Enjoy Instagram feed on website with WordPress Widget and Shortcode - Version 6.1.0

Version Description

  • feat: added new dashboard widget showing some plugin stats
  • feat: added cron scheduler for instagram token refresh
  • feat: new filters add HTML or execute code before the shortcode displays
  • fix: slide different height with carousel showcase style
Download this release

Release Info

Developer designemotions
Plugin Icon 128x128 Enjoy Instagram feed on website with WordPress Widget and Shortcode
Version 6.1.0
Comparing to
See all releases

Code changes from version 6.0.6 to 6.1.0

assets/css/dashboard-widget.css ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #ei_dashboard_widget_stats .inside {
2
+ padding: 0;
3
+ margin: 0;
4
+ }
5
+
6
+ #dashboard-widgets .ei-stats-wrapper {
7
+ display: flex;
8
+ flex-direction: row;
9
+ }
10
+
11
+ #dashboard-widgets .ei-stats-left {
12
+ width: 165px;
13
+ padding: 12px 0 6px 12px;
14
+ text-align: center;
15
+ }
16
+
17
+ #dashboard-widgets .ei-stats-left img {
18
+ width: 100%;
19
+ height: auto;
20
+ }
21
+
22
+ #dashboard-widgets .ei-stats {
23
+ padding: 12px 12px 6px 12px;
24
+ width: 100%;
25
+ }
26
+
27
+ #dashboard-widgets .ei-stats ul {
28
+ list-style: none;
29
+ margin: 0;
30
+ }
31
+
32
+ #dashboard-widgets .ei-stats li {
33
+ display: flex;
34
+ justify-content: space-between;
35
+ }
36
+
37
+ #dashboard-widgets .ei-premium-link {
38
+ border-top: 1px solid #eee;
39
+ padding: 12px;
40
+ }
assets/css/ei-icons.css ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @font-face {
2
+ font-family: 'ei-icons';
3
+ src: url('../fonts/ei-icons.eot?st3hq0');
4
+ src: url('../fonts/ei-icons.eot?st3hq0#iefix') format('embedded-opentype'),
5
+ url('../fonts/ei-icons.ttf?st3hq0') format('truetype'),
6
+ url('../fonts/ei-icons.woff?st3hq0') format('woff'),
7
+ url('../fonts/ei-icons.svg?st3hq0#ei-icons') format('svg');
8
+ font-weight: normal;
9
+ font-style: normal;
10
+ font-display: block;
11
+ }
12
+
13
+ [class^="ei-icons-"], [class*=" ei-icons-"] {
14
+ /* use !important to prevent issues with browser extensions that change fonts */
15
+ font-family: 'ei-icons' !important;
16
+ speak: never;
17
+ font-style: normal;
18
+ font-weight: 400;
19
+ font-variant: normal;
20
+ text-transform: none;
21
+ line-height: 1;
22
+ width: 16px;
23
+ height: 16px;
24
+ font-size: 16px;
25
+ display: inline-block;
26
+ vertical-align: top;
27
+ text-align: center;
28
+ /* Better Font Rendering =========== */
29
+ -webkit-font-smoothing: antialiased;
30
+ -moz-osx-font-smoothing: grayscale;
31
+ }
32
+
33
+ .ei-icons-database:before {
34
+ content: "\e900";
35
+ }
36
+ .ei-icons-hash:before {
37
+ content: "\e901";
38
+ }
39
+ .ei-icons-heart:before {
40
+ content: "\e902";
41
+ }
42
+ .ei-icons-instagram:before {
43
+ content: "\e903";
44
+ }
45
+ .ei-icons-thumbs-down:before {
46
+ content: "\e904";
47
+ }
48
+ .ei-icons-thumbs-up:before {
49
+ content: "\e905";
50
+ }
51
+ .ei-icons-users:before {
52
+ content: "\e906";
53
+ }
assets/css/enjoy-instagram.css CHANGED
@@ -46,6 +46,15 @@ Edited by: Vito Caruso */
46
  width: 50px;
47
  border-radius: 50%;
48
  }
 
 
 
 
 
 
 
 
 
49
 
50
  .enjoy-instagram-username {
51
  margin: 10px 0 20px 0;
46
  width: 50px;
47
  border-radius: 50%;
48
  }
49
+ .fancybox-container .top-caption {
50
+ font-size: 16px;
51
+ text-rendering:optimizeLegibility;
52
+ }
53
+ .fancybox-container .caption-text {
54
+ font-size: 14px;
55
+ line-height: 22px;
56
+ text-rendering:optimizeLegibility;
57
+ }
58
 
59
  .enjoy-instagram-username {
60
  margin: 10px 0 20px 0;
assets/css/showcase_carousel.css CHANGED
@@ -5,6 +5,11 @@
5
  border-color: #D2D2D2;
6
  height: 100%;
7
  box-sizing: border-box;
 
 
 
 
 
8
  }
9
 
10
  .ei-showcase .enjoy-instagram-ig-picture-wrapper, .enjoy-instagram-ig-username-wrapper {
5
  border-color: #D2D2D2;
6
  height: 100%;
7
  box-sizing: border-box;
8
+ width:100%
9
+ }
10
+
11
+ .ei-showcase .swiper-slide {
12
+ height:auto!important;
13
  }
14
 
15
  .ei-showcase .enjoy-instagram-ig-picture-wrapper, .enjoy-instagram-ig-username-wrapper {
assets/fonts/ei-icons.eot ADDED
Binary file
assets/fonts/ei-icons.svg ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
+ <svg xmlns="http://www.w3.org/2000/svg">
4
+ <metadata>Generated by IcoMoon</metadata>
5
+ <defs>
6
+ <font id="ei-icons" horiz-adv-x="1024">
7
+ <font-face units-per-em="1024" ascent="960" descent="-64" />
8
+ <missing-glyph horiz-adv-x="1024" />
9
+ <glyph unicode="&#x20;" horiz-adv-x="512" d="" />
10
+ <glyph unicode="&#xe900;" glyph-name="database" d="M170.667 725.248c0 0 0.128 4.053 9.088 12.288 10.453 9.6 28.629 20.608 55.723 31.147 63.957 24.96 163.029 41.984 276.523 41.984s212.565-17.024 276.565-41.984c27.051-10.539 45.269-21.547 55.723-31.147 8.747-8.064 9.045-11.989 9.045-12.288 0-0.128-0.299-4.053-9.088-12.117-10.453-9.6-28.629-20.608-55.723-31.147-63.957-24.96-163.029-41.984-276.523-41.984s-212.565 17.024-276.565 41.984c-27.051 10.539-45.269 21.547-55.723 31.147-8.875 8.192-9.045 12.117-9.045 12.117zM853.333 318.635v-190.763c-1.749-4.139-4.096-7.723-9.259-12.416-10.453-9.6-28.629-20.565-55.595-31.061-63.787-24.832-162.517-41.728-276.48-41.728s-212.693 16.896-276.48 41.728c-27.008 10.496-45.141 21.461-55.595 31.061-5.12 4.693-7.509 8.277-8.491 10.325l-0.256 192.597c10.581-5.376 21.76-10.325 33.365-14.848 76.672-29.824 186.752-47.531 307.456-47.531s230.784 17.707 307.456 47.531c11.819 4.608 23.168 9.6 33.877 15.104zM853.333 617.515v-190.421c0-0.171 0-0.341 0-0.555-1.749-4.139-4.096-7.723-9.259-12.416-10.453-9.6-28.629-20.565-55.595-31.061-63.787-24.832-162.517-41.728-276.48-41.728s-212.693 16.896-276.48 41.728c-27.008 10.496-45.141 21.461-55.595 31.061-5.12 4.693-7.509 8.277-8.491 10.325-0.043 1.707-0.171 3.371-0.384 4.992l-0.213 188.032c10.581-5.461 21.888-10.411 33.621-15.019 76.843-29.952 187.221-47.787 307.541-47.787s230.699 17.835 307.541 47.787c11.776 4.608 23.125 9.6 33.792 15.061zM85.333 725.334v-597.333c0-2.475 0.085-4.949 0.299-7.424 2.432-28.373 18.133-51.072 36.565-68.011 21.248-19.499 50.133-35.157 82.347-47.701 76.672-29.824 186.752-47.531 307.456-47.531s230.784 17.707 307.456 47.531c32.213 12.544 61.099 28.203 82.347 47.701 18.432 16.939 34.133 39.637 36.565 68.011 0.213 2.475 0.299 4.949 0.299 7.424v597.333c0 2.389-0.085 4.779-0.299 7.168-2.347 28.331-18.005 50.987-36.352 67.84-21.248 19.584-50.219 35.285-82.475 47.872-76.843 29.952-187.221 47.787-307.541 47.787s-230.699-17.835-307.541-47.787c-32.256-12.587-61.227-28.331-82.475-47.872-18.347-16.853-34.005-39.552-36.352-67.84-0.213-2.389-0.299-4.779-0.299-7.168z" />
11
+ <glyph unicode="&#xe901;" glyph-name="hash" d="M606.549 512l-18.944-170.667h-170.155l18.944 170.667zM640.256 815.36l-24.235-218.027h-170.155l23.168 208.64c2.603 23.424-14.293 44.501-37.675 47.104s-44.501-14.293-47.104-37.717l-24.235-218.027h-189.355c-23.552 0-42.667-19.115-42.667-42.667s19.115-42.667 42.667-42.667h179.883l-18.944-170.667h-160.939c-23.552 0-42.667-19.115-42.667-42.667s19.115-42.667 42.667-42.667h151.424l-23.168-208.64c-2.603-23.424 14.293-44.501 37.675-47.104s44.501 14.293 47.104 37.675l24.277 218.069h170.155l-23.168-208.64c-2.603-23.424 14.293-44.501 37.675-47.104s44.501 14.293 47.104 37.675l24.235 218.069h189.355c23.552 0 42.667 19.115 42.667 42.667s-19.115 42.667-42.667 42.667h-179.883l18.944 170.667h160.939c23.552 0 42.667 19.115 42.667 42.667s-19.115 42.667-42.667 42.667h-151.424l23.168 208.64c2.603 23.424-14.293 44.501-37.675 47.104s-44.501-14.293-47.104-37.675z" />
12
+ <glyph unicode="&#xe902;" glyph-name="heart" d="M859.008 711.808c37.547-37.589 56.277-86.656 56.277-135.851s-18.773-98.261-56.277-135.765l-347.008-347.008-347.008 347.008c-37.504 37.504-56.235 86.571-56.235 135.808s18.731 98.304 56.235 135.808 86.571 56.235 135.808 56.235 98.304-18.731 135.808-56.235l45.227-45.227c16.683-16.683 43.691-16.683 60.331 0l45.312 45.312c37.504 37.504 86.571 56.235 135.765 56.192s98.261-18.773 135.765-56.277zM919.339 772.139c-54.144 54.144-125.184 81.237-196.096 81.28s-141.952-27.051-196.139-81.195l-15.104-15.147-15.061 15.061c-54.144 54.144-125.227 81.237-196.139 81.237s-141.995-27.093-196.139-81.237-81.237-125.227-81.237-196.139 27.093-141.995 81.237-196.139l377.173-377.173c16.683-16.683 43.691-16.683 60.331 0l377.173 377.173c54.144 54.144 81.237 125.184 81.28 196.096s-27.051 141.952-81.28 196.181z" />
13
+ <glyph unicode="&#xe903;" glyph-name="instagram" d="M298.667 896c-70.699 0-134.741-28.715-181.035-74.965s-74.965-110.336-74.965-181.035v-426.667c0-70.699 28.715-134.741 74.965-181.035s110.336-74.965 181.035-74.965h426.667c70.699 0 134.741 28.715 181.035 74.965s74.965 110.336 74.965 181.035v426.667c0 70.699-28.715 134.741-74.965 181.035s-110.336 74.965-181.035 74.965zM298.667 810.667h426.667c47.147 0 89.728-19.072 120.661-50.005s50.005-73.515 50.005-120.661v-426.667c0-47.147-19.072-89.728-50.005-120.661s-73.515-50.005-120.661-50.005h-426.667c-47.147 0-89.728 19.072-120.661 50.005s-50.005 73.515-50.005 120.661v426.667c0 47.147 19.072 89.728 50.005 120.661s73.515 50.005 120.661 50.005zM724.864 459.819c-6.4 41.472-24.363 79.232-50.944 109.525-32.171 36.736-76.971 62.507-128.384 70.144-19.797 3.157-41.387 3.285-63.019 0.085-58.283-8.619-107.563-40.149-140.032-83.925s-48.341-100.139-39.68-158.379 40.149-107.563 83.925-140.032 100.139-48.341 158.379-39.68 107.563 40.149 140.032 83.925 48.341 100.139 39.68 158.379zM640.469 447.275c5.205-34.987-4.267-68.651-23.808-95.019s-49.067-45.184-84.011-50.347-68.651 4.267-95.019 23.808-45.184 49.067-50.347 84.011 4.267 68.651 23.808 95.019 49.067 45.184 84.011 50.347c13.355 1.963 26.24 1.792 37.12 0.085 31.573-4.693 58.283-20.053 77.568-42.069 16-18.261 26.88-41.088 30.72-65.835zM746.667 618.667c23.552 0 42.667 19.115 42.667 42.667s-19.115 42.667-42.667 42.667-42.667-19.115-42.667-42.667 19.115-42.667 42.667-42.667z" />
14
+ <glyph unicode="&#xe904;" glyph-name="thumbs-down" d="M469.333 298.667c0 23.552-19.115 42.667-42.667 42.667h-242.304c-2.773 0.085-6.528 0.469-6.528 0.469-11.648 1.749-21.419 8.021-27.947 16.896s-9.6 20.053-7.851 31.659l58.88 383.915c1.579 10.197 6.656 19.115 13.867 25.6 7.637 6.869 17.707 10.923 29.269 10.795h438.613v-417.621l-153.941-346.368c-13.099 4.181-24.832 11.435-34.389 20.992-15.488 15.488-25.003 36.736-25.003 60.331zM384 256v-128c0-47.104 19.157-89.856 50.005-120.661s73.557-50.005 120.661-50.005c17.28 0 32.171 10.283 38.997 25.344l170.667 384c2.56 5.717 3.712 11.733 3.669 17.323v469.333c0 23.552-19.115 42.667-42.667 42.667h-481.28c-32.725 0.384-63.232-11.989-86.229-32.555-21.547-19.285-36.565-45.909-41.259-76.075l-58.88-384.085c-5.333-34.987 4.096-68.864 23.467-95.189s48.939-45.355 83.84-50.645c7.040-1.067 14.208-1.579 20.992-1.451zM725.333 810.667h113.92c15.403 0.256 28.757-5.077 38.912-14.165 9.088-8.149 15.531-19.2 17.835-31.829v-289.579c-1.579-14.507-8.875-26.88-19.413-35.541-10.027-8.277-22.912-13.056-36.736-12.843l-114.517-0.043c-23.552 0-42.667-19.115-42.667-42.667s19.115-42.667 42.667-42.667h113.323c34.56-0.512 66.944 11.52 92.16 32.256 26.539 21.803 45.184 53.376 50.176 90.027 0.213 1.707 0.341 3.712 0.341 5.717v298.667c0 1.792-0.128 3.797-0.384 5.845-4.736 34.261-21.547 64.427-45.867 86.187-25.6 22.912-59.605 36.608-95.829 35.925h-113.92c-23.552 0-42.667-19.115-42.667-42.667s19.115-42.667 42.667-42.667z" />
15
+ <glyph unicode="&#xe905;" glyph-name="thumbs-up" d="M554.667 554.667c0-23.552 19.115-42.667 42.667-42.667h242.304c2.773-0.085 6.528-0.469 6.528-0.469 11.648-1.749 21.419-8.021 27.947-16.896s9.6-20.053 7.851-31.659l-58.88-383.915c-1.579-10.197-6.656-19.115-13.867-25.6-7.68-6.869-17.707-10.923-29.269-10.795h-438.613v417.621l153.941 346.368c13.099-4.181 24.832-11.435 34.389-20.992 15.488-15.488 25.003-36.736 25.003-60.331zM640 597.334v128c0 47.104-19.157 89.856-50.005 120.661s-73.557 50.005-120.661 50.005c-17.28 0-32.171-10.283-38.997-25.344l-170.667-384c-2.56-5.717-3.712-11.733-3.669-17.323v-469.333c0-23.552 19.115-42.667 42.667-42.667h481.28c32.725-0.384 63.232 11.989 86.229 32.555 21.547 19.285 36.565 45.909 41.259 76.075l58.88 384.085c5.333 34.987-4.096 68.864-23.467 95.189s-48.939 45.355-83.84 50.645c-7.040 1.067-14.208 1.579-20.992 1.451zM298.667 42.667h-128c-11.776 0-22.4 4.736-30.165 12.501s-12.501 18.389-12.501 30.165v298.667c0 11.776 4.736 22.4 12.501 30.165s18.389 12.501 30.165 12.501h128c23.552 0 42.667 19.115 42.667 42.667s-19.115 42.667-42.667 42.667h-128c-35.328 0-67.413-14.379-90.496-37.504s-37.504-55.168-37.504-90.496v-298.667c0-35.328 14.379-67.413 37.504-90.496s55.168-37.504 90.496-37.504h128c23.552 0 42.667 19.115 42.667 42.667s-19.115 42.667-42.667 42.667z" />
16
+ <glyph unicode="&#xe906;" glyph-name="users" d="M768 42.667v85.333c0 58.88-23.936 112.299-62.464 150.869s-91.989 62.464-150.869 62.464h-341.333c-58.88 0-112.299-23.936-150.869-62.464s-62.464-91.989-62.464-150.869v-85.333c0-23.552 19.115-42.667 42.667-42.667s42.667 19.115 42.667 42.667v85.333c0 35.371 14.293 67.285 37.504 90.496s55.125 37.504 90.496 37.504h341.333c35.371 0 67.285-14.293 90.496-37.504s37.504-55.125 37.504-90.496v-85.333c0-23.552 19.115-42.667 42.667-42.667s42.667 19.115 42.667 42.667zM597.333 640c0 58.88-23.936 112.299-62.464 150.869s-91.989 62.464-150.869 62.464-112.299-23.936-150.869-62.464-62.464-91.989-62.464-150.869 23.936-112.299 62.464-150.869 91.989-62.464 150.869-62.464 112.299 23.936 150.869 62.464 62.464 91.989 62.464 150.869zM512 640c0-35.371-14.293-67.285-37.504-90.496s-55.125-37.504-90.496-37.504-67.285 14.293-90.496 37.504-37.504 55.125-37.504 90.496 14.293 67.285 37.504 90.496 55.125 37.504 90.496 37.504 67.285-14.293 90.496-37.504 37.504-55.125 37.504-90.496zM1024 42.667v85.333c-0.043 53.12-19.499 101.76-51.84 139.136-27.819 32.128-65.195 55.936-107.904 67.243-22.784 6.016-46.123-7.552-52.139-30.336s7.552-46.123 30.336-52.139c25.899-6.869 48.469-21.248 65.195-40.619 19.371-22.443 30.976-51.456 31.019-83.285v-85.333c0-23.552 19.115-42.667 42.667-42.667s42.667 19.115 42.667 42.667zM672.085 763.776c34.261-8.789 61.653-30.507 78.379-58.752s22.656-62.72 13.867-96.981c-7.509-29.355-24.533-53.589-47.147-70.485-13.397-10.027-28.8-17.451-45.355-21.803-22.784-5.973-36.437-29.312-30.421-52.096s29.312-36.437 52.096-30.421c27.179 7.125 52.565 19.413 74.752 36.011 37.717 28.16 66.219 68.821 78.72 117.675 14.592 57.045 4.693 114.731-23.125 161.621s-73.6 83.328-130.645 97.963c-22.827 5.845-46.080-7.936-51.925-30.763s7.936-46.080 30.763-51.925z" />
17
+ </font></defs></svg>
assets/fonts/ei-icons.ttf ADDED
Binary file
assets/fonts/ei-icons.woff ADDED
Binary file
assets/images/icon-256x256.jpg ADDED
Binary file
enjoyinstagram.php CHANGED
@@ -11,7 +11,7 @@
11
  * Plugin Name: Enjoy Instagram
12
  * Plugin URI: https://www.mediabetaprojects.com/enjoy-instagram-premium/
13
  * Description: Instagram Responsive Images Gallery and Carousel, works with Shortcodes and Widgets.
14
- * Version: 6.0.6
15
  * Requires at least: 4.0
16
  * Requires PHP: 7.2
17
  * Author: Mediabeta Srl
@@ -22,7 +22,7 @@
22
  * License URI: http://www.gnu.org/licenses/gpl-3.0.html
23
  */
24
 
25
- ! defined( 'ENJOYINSTAGRAM_VERSION' ) && define( 'ENJOYINSTAGRAM_VERSION', '6.0.6' );
26
  ! defined( 'ENJOYINSTAGRAM_FILE' ) && define( 'ENJOYINSTAGRAM_FILE', __FILE__ );
27
  ! defined( 'ENJOYINSTAGRAM_URL' ) && define( 'ENJOYINSTAGRAM_URL', plugin_dir_url( __FILE__ ) );
28
  ! defined( 'ENJOYINSTAGRAM_DIR' ) && define( 'ENJOYINSTAGRAM_DIR', plugin_dir_path( __FILE__ ) );
@@ -33,6 +33,7 @@
33
  ! defined( 'ENJOYINSTAGRAM_GRAPH_API_REDIRECT' ) && define( 'ENJOYINSTAGRAM_GRAPH_API_REDIRECT', 'https://www.mediabetaprojects.com/enjoy-instagram-api/graph-api-redirect.php' );
34
  ! defined( 'ENJOYINSTAGRAM_BASIC_DISPLAY_API_REDIRECT' ) && define( 'ENJOYINSTAGRAM_BASIC_DISPLAY_API_REDIRECT', 'https://www.mediabetaprojects.com/enjoy-instagram-api/basic-display-redirect.php' );
35
  ! defined( 'ENJOYINSTAGRAM_CACHE_DIR_NAME' ) && define( 'ENJOYINSTAGRAM_CACHE_DIR_NAME', 'ei-cache' );
 
36
 
37
  include_once ABSPATH . 'wp-admin/includes/plugin.php';
38
 
@@ -48,6 +49,13 @@ if ( ! is_plugin_active( 'enjoy-instagram-premium/enjoyinstagram.php' ) ) {
48
 
49
  register_activation_hook( __FILE__, 'ei_require_activation_class' );
50
 
 
 
 
 
 
 
 
51
  /**
52
  * Bootstraps enjoy instagram plugin
53
  *
11
  * Plugin Name: Enjoy Instagram
12
  * Plugin URI: https://www.mediabetaprojects.com/enjoy-instagram-premium/
13
  * Description: Instagram Responsive Images Gallery and Carousel, works with Shortcodes and Widgets.
14
+ * Version: 6.1.0
15
  * Requires at least: 4.0
16
  * Requires PHP: 7.2
17
  * Author: Mediabeta Srl
22
  * License URI: http://www.gnu.org/licenses/gpl-3.0.html
23
  */
24
 
25
+ ! defined( 'ENJOYINSTAGRAM_VERSION' ) && define( 'ENJOYINSTAGRAM_VERSION', '6.1.0' );
26
  ! defined( 'ENJOYINSTAGRAM_FILE' ) && define( 'ENJOYINSTAGRAM_FILE', __FILE__ );
27
  ! defined( 'ENJOYINSTAGRAM_URL' ) && define( 'ENJOYINSTAGRAM_URL', plugin_dir_url( __FILE__ ) );
28
  ! defined( 'ENJOYINSTAGRAM_DIR' ) && define( 'ENJOYINSTAGRAM_DIR', plugin_dir_path( __FILE__ ) );
33
  ! defined( 'ENJOYINSTAGRAM_GRAPH_API_REDIRECT' ) && define( 'ENJOYINSTAGRAM_GRAPH_API_REDIRECT', 'https://www.mediabetaprojects.com/enjoy-instagram-api/graph-api-redirect.php' );
34
  ! defined( 'ENJOYINSTAGRAM_BASIC_DISPLAY_API_REDIRECT' ) && define( 'ENJOYINSTAGRAM_BASIC_DISPLAY_API_REDIRECT', 'https://www.mediabetaprojects.com/enjoy-instagram-api/basic-display-redirect.php' );
35
  ! defined( 'ENJOYINSTAGRAM_CACHE_DIR_NAME' ) && define( 'ENJOYINSTAGRAM_CACHE_DIR_NAME', 'ei-cache' );
36
+ ! defined( 'ENJOYINSTAGRAM_REFRESH_THRESHOLD_OFFSET' ) && define( 'ENJOYINSTAGRAM_REFRESH_THRESHOLD_OFFSET', 40 * DAY_IN_SECONDS );
37
 
38
  include_once ABSPATH . 'wp-admin/includes/plugin.php';
39
 
49
 
50
  register_activation_hook( __FILE__, 'ei_require_activation_class' );
51
 
52
+ function ei_deactivation() {
53
+ require_once 'includes/class.enjoyinstagram-scheduler.php';
54
+ EI_Scheduler::get_instance()->unregister();
55
+ }
56
+
57
+ register_deactivation_hook( __FILE__, 'ei_deactivation' );
58
+
59
  /**
60
  * Bootstraps enjoy instagram plugin
61
  *
includes/class.enjoyinstagram-admin.php CHANGED
@@ -365,6 +365,7 @@ class EnjoyInstagram_Admin {
365
 
366
  $is_business = 'graph' === $_GET['api'];
367
  $access_token = sanitize_text_field( $_GET['access_token'] );
 
368
  $redirect_uri = $this->build_admin_url( 'users-settings' );
369
  $data = ei_api()->get_user_accounts( $access_token, $is_business );
370
 
@@ -376,7 +377,9 @@ class EnjoyInstagram_Admin {
376
  enjoyinstagram_add_notice( $message, 'error' );
377
  } else {
378
  foreach ( $data as $profile ) {
379
- $profile['access_token'] = $access_token;
 
 
380
  enjoyinstagram()->add_user( $profile['username'], $profile );
381
  enjoyinstagram_add_notice(
382
  // translators: Notice message.
365
 
366
  $is_business = 'graph' === $_GET['api'];
367
  $access_token = sanitize_text_field( $_GET['access_token'] );
368
+ $expires_in = sanitize_text_field( $_GET['expires_in'] );
369
  $redirect_uri = $this->build_admin_url( 'users-settings' );
370
  $data = ei_api()->get_user_accounts( $access_token, $is_business );
371
 
377
  enjoyinstagram_add_notice( $message, 'error' );
378
  } else {
379
  foreach ( $data as $profile ) {
380
+ $profile['last_token_refresh_timestamp'] = null;
381
+ $profile['access_token'] = $access_token;
382
+ $profile['token_expires_timestamp'] = time() + (int) $expires_in;
383
  enjoyinstagram()->add_user( $profile['username'], $profile );
384
  enjoyinstagram_add_notice(
385
  // translators: Notice message.
includes/class.enjoyinstagram-api-connection.php CHANGED
@@ -310,6 +310,44 @@ class Enjoy_Instagram_Api_Connection {
310
  return $this->map_media( $filtered_medias );
311
  }
312
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
313
  /**
314
  * Map instagram media in a custom format
315
  *
310
  return $this->map_media( $filtered_medias );
311
  }
312
 
313
+ /**
314
+ * Refresh the user access token
315
+ *
316
+ * @param array $user
317
+ *
318
+ * @return array|false
319
+ *
320
+ * @since 6.1.0
321
+ */
322
+ public function refresh_access_token( $user ) {
323
+ if ( ! $user['business'] ) {
324
+ $resp = $this->_get_remote_data(
325
+ 'refresh_access_token',
326
+ [
327
+ 'grant_type' => 'ig_refresh_token',
328
+ 'access_token' => $user['access_token'],
329
+ ],
330
+ false
331
+ );
332
+
333
+ if ( is_wp_error( $resp ) ) {
334
+ $this->last_error = sprintf(
335
+ // translators: api error while refreshing the user access token
336
+ __(
337
+ 'There was an error while refreshing the access token form user %1$s: %2$s',
338
+ 'enjoy-instagram'
339
+ ),
340
+ $user['username'],
341
+ $resp->get_error_message()
342
+ );
343
+
344
+ return false;
345
+ }
346
+
347
+ return $resp;
348
+ }
349
+ }
350
+
351
  /**
352
  * Map instagram media in a custom format
353
  *
includes/class.enjoyinstagram-dashboard-widget.php ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This class handles the wp dashbaord widget display
4
+ */
5
+
6
+ if ( ! defined( 'ABSPATH' ) ) {
7
+ exit; // exit if call directly
8
+ }
9
+
10
+ /**
11
+ * Class Enjoy_Instagram_Dashboard_Widgets
12
+ *
13
+ * @since 6.1.0
14
+ */
15
+ class Enjoy_Instagram_Dashboard_Widgets {
16
+ /**
17
+ * Enjoy_Instagram_Dashboard_Widgets constructor.
18
+ */
19
+ public function __construct() {
20
+ add_action( 'wp_dashboard_setup', [ $this, 'create_widgets' ], - 10000 );
21
+ }
22
+
23
+ /**
24
+ * Adds widgets handler to the wp dashboard
25
+ *
26
+ * @return void
27
+ */
28
+ public function create_widgets() {
29
+ wp_add_dashboard_widget( 'ei_dashboard_widget_stats', __( 'Enjoy Instagram Stats', 'enjoy-instagram' ), [ $this, 'show_stats_widget' ] );
30
+ }
31
+
32
+ /**
33
+ * Show the stats widget
34
+ *
35
+ * @return void
36
+ */
37
+ public function show_stats_widget() {
38
+ wp_enqueue_style( 'ei-icons', ENJOYINSTAGRAM_ASSETS_URL . '/css/ei-icons.css', [], ENJOYINSTAGRAM_VERSION );
39
+ wp_enqueue_style( 'ei-dashboard-widget', ENJOYINSTAGRAM_ASSETS_URL . '/css/dashboard-widget.css', [], ENJOYINSTAGRAM_VERSION );
40
+
41
+ $db_stats = ei_db()->stats();
42
+
43
+ ?>
44
+ <div class="ei-stats-wrapper">
45
+ <div class="ei-stats-left">
46
+ <img src="<?php echo ENJOYINSTAGRAM_ASSETS_URL . '/images/icon-256x256.jpg'; ?>">
47
+ <a href="<?php echo ei_admin()->get_tab_url( 'shortcode-settings' ) ?>">
48
+ <?php _e( 'Create shortcode', 'default' ) ?>
49
+ </a>
50
+ </div>
51
+ <div class="ei-stats">
52
+ <ul>
53
+ <li>
54
+ <span>
55
+ <i class="ei-icons-users"></i>
56
+ <?php _e( 'Linked accounts', 'enjoy-instagram' ); ?>
57
+ </span>
58
+ <span><strong><?php echo count( enjoyinstagram()->get_users() ); ?></strong></span>
59
+ </li>
60
+ <li>
61
+ <span>
62
+ <i class="ei-icons-instagram"></i>
63
+ <?php _e( 'Images captured', 'enjoy-instagram' ); ?>
64
+ </span>
65
+ <span><strong><?php echo $db_stats['media']['count']; ?></strong></span>
66
+ </li>
67
+ <li>
68
+ <span>
69
+ <i class="ei-icons-hash"></i>
70
+ <?php _e( 'Hashtags', 'enjoy-instagram' ); ?>
71
+ </span>
72
+ <span><strong><?php echo $db_stats['hashtag']['count']; ?></strong></span>
73
+ </li>
74
+ <?php if ( enjoyinstagram()->is_premium() ) : ?>
75
+ <li>
76
+ <span>
77
+ <i class="ei-icons-thumbs-up"></i>
78
+ <?php _e( 'Moderated - Approved', 'enjoy-instagram' ); ?>
79
+ </span>
80
+ <span><strong><?php echo $db_stats['moderated_approved']['count']; ?></strong></span>
81
+ </li>
82
+ <li>
83
+ <span>
84
+ <i class="ei-icons-thumbs-down"></i>
85
+ <?php _e( 'Moderatd - Rejected', 'enjoy-instagram' ); ?>
86
+ </span>
87
+ <span><strong><?php echo $db_stats['moderated_rejected']['count']; ?></strong></span>
88
+ </li>
89
+ <?php endif; ?>
90
+ </ul>
91
+ </div>
92
+
93
+ </div>
94
+ <?php if ( ! enjoyinstagram()->is_premium() ) : ?>
95
+ <div class="ei-premium-link">
96
+ <?php
97
+ echo sprintf(
98
+ // translators: Message for premium link
99
+ __( 'If you need more features <a href="%s" target="_blank">Try the premium version!</a>', 'enjoy-instagram' ),
100
+ ei_admin()->get_premium_url(
101
+ [
102
+ 'utm_source' => 'website',
103
+ 'utm_medium' => 'backend-widget',
104
+ 'utm_campaign' => 'try-the-premium-version',
105
+ ]
106
+ )
107
+ )
108
+ ?>
109
+ </div>
110
+ <?php endif; ?>
111
+ <?php
112
+ }
113
+ }
114
+
includes/class.enjoyinstagram-db.php CHANGED
@@ -493,14 +493,20 @@ class EnjoyInstagram_DB {
493
  global $wpdb;
494
 
495
  return [
496
- 'media' => [
497
  'count' => $wpdb->get_var( 'SELECT COUNT(*) FROM ' . $this->main_table ),
498
  'structure' => $wpdb->get_var( 'SHOW CREATE TABLE ' . $this->main_table, 1 ),
499
  ],
500
- 'hashtag' => [
501
  'count' => $wpdb->get_var( 'SELECT COUNT(*) FROM ' . $this->hashtags_table ),
502
  'structure' => $wpdb->get_var( 'SHOW CREATE TABLE ' . $this->hashtags_table, 1 ),
503
  ],
 
 
 
 
 
 
504
  ];
505
  }
506
  }
493
  global $wpdb;
494
 
495
  return [
496
+ 'media' => [
497
  'count' => $wpdb->get_var( 'SELECT COUNT(*) FROM ' . $this->main_table ),
498
  'structure' => $wpdb->get_var( 'SHOW CREATE TABLE ' . $this->main_table, 1 ),
499
  ],
500
+ 'hashtag' => [
501
  'count' => $wpdb->get_var( 'SELECT COUNT(*) FROM ' . $this->hashtags_table ),
502
  'structure' => $wpdb->get_var( 'SHOW CREATE TABLE ' . $this->hashtags_table, 1 ),
503
  ],
504
+ 'moderated_approved' => [
505
+ 'count' => $wpdb->get_var( 'SELECT COUNT(*) FROM ' . $this->main_table . ' WHERE moderate = "approved"' ),
506
+ ],
507
+ 'moderated_rejected' => [
508
+ 'count' => $wpdb->get_var( 'SELECT COUNT(*) FROM ' . $this->main_table . ' WHERE moderate = "rejected"' ),
509
+ ],
510
  ];
511
  }
512
  }
includes/class.enjoyinstagram-scheduler.php ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class EI_Scheduler
4
+ *
5
+ * @since 6.1.0
6
+ */
7
+
8
+ if ( ! defined( 'ABSPATH' ) ) {
9
+ exit; // exit if call directly
10
+ }
11
+
12
+ final class EI_Scheduler {
13
+ /**
14
+ * Single plugin instance
15
+ *
16
+ * @var EI_Scheduler
17
+ */
18
+ protected static $instance;
19
+
20
+ /**
21
+ * Returns single instance of the class
22
+ *
23
+ * @return EI_Scheduler
24
+ */
25
+ public static function get_instance() {
26
+ if ( null === self::$instance ) {
27
+ self::$instance = new self();
28
+ }
29
+
30
+ return self::$instance;
31
+ }
32
+
33
+ /**
34
+ * Init the plugin scheduler inside the wp cron
35
+ *
36
+ * @return void
37
+ */
38
+ public function init() {
39
+ if ( ! wp_next_scheduled( 'ei_twicedaily' ) ) {
40
+ wp_schedule_event( time(), 'twicedaily', 'ei_twicedaily' );
41
+ }
42
+
43
+ add_action( 'ei_twicedaily', [ $this, 'do_token_refresh' ] );
44
+ }
45
+
46
+ /**
47
+ * Try refreshing user tokens
48
+ *
49
+ * @return void
50
+ */
51
+ public function do_token_refresh() {
52
+ $users = enjoyinstagram()->get_users();
53
+
54
+ if ( empty( $users ) ) {
55
+ return;
56
+ }
57
+
58
+ foreach ( $users as $user ) {
59
+ if ( ! $user['business'] ) {
60
+
61
+ $should_refresh = ! isset( $user['token_expires_timestamp'] );
62
+
63
+ if ( ! $should_refresh ) {
64
+ $threshold = $user['token_expires_timestamp'] - ENJOYINSTAGRAM_REFRESH_THRESHOLD_OFFSET;
65
+ $should_refresh = $threshold < time();
66
+ }
67
+
68
+ if ( $should_refresh ) {
69
+ $api = ei_api();
70
+ $resp = $api->refresh_access_token( $user );
71
+
72
+ if ( false === $resp ) {
73
+ enjoyinstagram_add_notice( $api->last_error, 'error' );
74
+ continue;
75
+ }
76
+
77
+ $now = time();
78
+ $user['access_token'] = $resp['access_token'];
79
+ $user['token_expires_timestamp'] = $now + (int) $resp['expires_in'];
80
+ $user['last_token_refresh_timestamp'] = $now;
81
+
82
+ enjoyinstagram()->update_user( $user );
83
+ }
84
+ }
85
+ }
86
+ }
87
+
88
+ /**
89
+ * Remove EI schedules from the wp cron
90
+ *
91
+ * @return void
92
+ */
93
+ public function unregister() {
94
+ wp_clear_scheduled_hook( 'ei_twicedaily' );
95
+ }
96
+ }
includes/class.enjoyinstagram-shortcodes.php CHANGED
@@ -319,8 +319,29 @@ class EnjoyInstagram_Shortcodes {
319
  }
320
 
321
  ob_start();
 
 
 
 
 
 
 
 
 
 
 
 
322
  include $view;
323
 
 
 
 
 
 
 
 
 
 
324
  $content = ob_get_clean();
325
 
326
  return $content ? $content : '';
319
  }
320
 
321
  ob_start();
322
+
323
+ /**
324
+ * Add HTML or execute code before the shortcode displays.
325
+ *
326
+ * @param array $settings
327
+ *
328
+ * @since 1.1.0
329
+ */
330
+ do_action( 'enjoyinstagram_before_shortcode', $settings );
331
+ do_action( 'enjoyinstagram_before_shortcode_' . $view, $settings );
332
+
333
+ // include shortcode template
334
  include $view;
335
 
336
+ /**
337
+ * Add HTML or execute code after the shortcode displays.
338
+ *
339
+ * @param array $settings
340
+ *
341
+ * @since 1.1.0
342
+ */
343
+ do_action( 'enjoyinstagram_after_shortcode', $settings );
344
+ do_action( 'enjoyinstagram_after_shortcode_' . $view, $settings );
345
  $content = ob_get_clean();
346
 
347
  return $content ? $content : '';
includes/class.enjoyinstagram.php CHANGED
@@ -75,15 +75,21 @@ final class EnjoyInstagram {
75
 
76
  require_once( 'class.enjoyinstagram-api-connection.php' );
77
  require_once( 'class.enjoyinstagram-db.php' );
 
78
  require_once( 'class.enjoyinstagram-shortcodes.php' );
79
  // widgets
80
  require_once( 'widgets/widgets.php' );
81
  require_once( 'widgets/widgets_grid.php' );
 
 
 
82
 
83
  // require admin class
84
  if ( is_admin() ) {
85
  require_once( 'class.enjoyinstagram-admin.php' );
86
  }
 
 
87
  }
88
 
89
  /**
@@ -179,6 +185,22 @@ final class EnjoyInstagram {
179
  return true;
180
  }
181
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
182
  /**
183
  * Schedule event sync. Use cron if active, otherwise use custom
184
  *
@@ -363,6 +385,10 @@ final class EnjoyInstagram {
363
  continue;
364
  }
365
 
 
 
 
 
366
  if ( $this->is_premium() ) {
367
  $user['active'] = true;
368
  }
75
 
76
  require_once( 'class.enjoyinstagram-api-connection.php' );
77
  require_once( 'class.enjoyinstagram-db.php' );
78
+ require_once( 'class.enjoyinstagram-scheduler.php' );
79
  require_once( 'class.enjoyinstagram-shortcodes.php' );
80
  // widgets
81
  require_once( 'widgets/widgets.php' );
82
  require_once( 'widgets/widgets_grid.php' );
83
+ require_once( 'class.enjoyinstagram-dashboard-widget.php' );
84
+
85
+ new Enjoy_Instagram_Dashboard_Widgets();
86
 
87
  // require admin class
88
  if ( is_admin() ) {
89
  require_once( 'class.enjoyinstagram-admin.php' );
90
  }
91
+
92
+ EI_Scheduler::get_instance()->init();
93
  }
94
 
95
  /**
185
  return true;
186
  }
187
 
188
+ /**
189
+ * Update a single account data
190
+ *
191
+ * @param array $user
192
+ *
193
+ * @return void
194
+ *
195
+ * @since 6.1.0
196
+ */
197
+ public function update_user( $user ) {
198
+ if ( ! empty( $user ) ) {
199
+ $this->_users[ $user['username'] ] = array_merge( $this->_users[ $user['username'] ], (array) $user );
200
+ update_option( 'enjoy_instagram_options', $this->_users );
201
+ }
202
+ }
203
+
204
  /**
205
  * Schedule event sync. Use cron if active, otherwise use custom
206
  *
385
  continue;
386
  }
387
 
388
+ if ( ! isset( $user['last_token_refresh_timestamp'] ) ) {
389
+ $user['last_token_refresh_timestamp'] = null;
390
+ }
391
+
392
  if ( $this->is_premium() ) {
393
  $user['active'] = true;
394
  }
readme.txt CHANGED
@@ -4,8 +4,8 @@ Donate link: https://www.google.com/url?q=https%3A%2F%2Fwww.paypal.com%2Fcgi-bin
4
  Tags: instagram carousel, instagram, instagram feed, instagram widget, instagram grid
5
  Requires at least: 4.0
6
  Tested up to: 5.7
7
- Version: 6.0.6
8
- Stable tag: 6.0.6
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -210,6 +210,11 @@ In the Setting section yon can customize grid and/or Carousel view
210
  8. Front End View Example
211
 
212
  == Changelog ==
 
 
 
 
 
213
  = 6.0.6 =
214
  * fix: images captured option always reset to 20 items
215
  = 6.0.5 =
4
  Tags: instagram carousel, instagram, instagram feed, instagram widget, instagram grid
5
  Requires at least: 4.0
6
  Tested up to: 5.7
7
+ Version: 6.1.0
8
+ Stable tag: 6.1.0
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
210
  8. Front End View Example
211
 
212
  == Changelog ==
213
+ = 6.1.0 =
214
+ * feat: added new dashboard widget showing some plugin stats
215
+ * feat: added cron scheduler for instagram token refresh
216
+ * feat: new filters add HTML or execute code before the shortcode displays
217
+ * fix: slide different height with carousel showcase style
218
  = 6.0.6 =
219
  * fix: images captured option always reset to 20 items
220
  = 6.0.5 =
templates/admin/diagnostic.php CHANGED
@@ -27,14 +27,18 @@ Images in cache: <?php echo $cached_images ? count( $cached_images ) : 0 . "\
27
  <?php
28
 
29
  foreach ( $users as $user ) {
 
 
30
  // phpcs:ignore
31
  var_export(
32
  [
33
- 'id' => $user['id'],
34
- 'token' => $user['access_token'],
35
- 'username' => $user['username'],
36
- 'business' => $user['business'],
37
- 'active' => $user['active'],
 
 
38
  ]
39
  );
40
  }
@@ -62,11 +66,11 @@ Version: <?php echo get_option( 'enjoy_instagram_installed_db_version' )
62
 
63
  *Media*
64
  Count: <?php echo $stats['media']['count'] . "\n"; ?>
65
- <?php echo $stats['media']['structure'] . "\n"; ?>
66
 
67
  *Hashtag*
68
  Count: <?php echo $stats['hashtag']['count'] . "\n"; ?>
69
- <?php echo $stats['hashtag']['structure'] . "\n"; ?>
70
 
71
 
72
  ## ACTIVE PLUGINS: ##
27
  <?php
28
 
29
  foreach ( $users as $user ) {
30
+ $token_expire_date = gmdate( 'Y-m-d H:i:s', $user['token_expires_timestamp'] );
31
+ $token_expires_timestamp = isset( $user['token_expires_timestamp'] ) ? $user['token_expires_timestamp'] . ' (' . $token_expire_date . ')' : null;
32
  // phpcs:ignore
33
  var_export(
34
  [
35
+ 'id' => $user['id'],
36
+ 'token' => $user['access_token'],
37
+ 'token_expires_timestamp' => $token_expires_timestamp,
38
+ 'last_token_refresh_timestamp' => $user['last_token_refresh_timestamp'],
39
+ 'username' => $user['username'],
40
+ 'business' => $user['business'],
41
+ 'active' => $user['active'],
42
  ]
43
  );
44
  }
66
 
67
  *Media*
68
  Count: <?php echo $stats['media']['count'] . "\n"; ?>
69
+ <?php echo $stats['media']['structure'] . "\n"; ?>
70
 
71
  *Hashtag*
72
  Count: <?php echo $stats['hashtag']['count'] . "\n"; ?>
73
+ <?php echo $stats['hashtag']['structure'] . "\n"; ?>
74
 
75
 
76
  ## ACTIVE PLUGINS: ##
templates/shortcodes/carousel.php CHANGED
@@ -86,9 +86,9 @@ if ( isset( $settings['theme'] ) ) {
86
  var maxHeight = 0;
87
  var slides = [];
88
 
89
- for(var i in this.slides) {
90
  var slide = this.slides[i];
91
- if(slide.height) {
92
  maxHeight = Math.max(maxHeight, slide.offsetHeight);
93
  slides.push(slide);
94
  }
@@ -99,7 +99,7 @@ if ( isset( $settings['theme'] ) ) {
99
  })
100
  <?php endif; ?>
101
 
102
- for(var i in this.imagesToLoad) {
103
  var img = this.imagesToLoad[i];
104
  if (img && img.className && img.className.indexOf('ig-img') !== -1) {
105
  img.style.height = img.width + 'px';
@@ -268,7 +268,7 @@ if ( isset( $settings['theme'] ) ) {
268
  </div>
269
  <div style=" clear:both"></div>
270
  <div class="enjoy-instagram-text-wrapper">
271
- <span><?php echo nl2br( mb_strimwidth( $entry['caption']['text'], 0, 100, '...' ) ); ?></span>
272
  </div>
273
  </div>
274
  <?php endif; ?>
86
  var maxHeight = 0;
87
  var slides = [];
88
 
89
+ for (var i in this.slides) {
90
  var slide = this.slides[i];
91
+ if (slide.height) {
92
  maxHeight = Math.max(maxHeight, slide.offsetHeight);
93
  slides.push(slide);
94
  }
99
  })
100
  <?php endif; ?>
101
 
102
+ for (var i in this.imagesToLoad) {
103
  var img = this.imagesToLoad[i];
104
  if (img && img.className && img.className.indexOf('ig-img') !== -1) {
105
  img.style.height = img.width + 'px';
268
  </div>
269
  <div style=" clear:both"></div>
270
  <div class="enjoy-instagram-text-wrapper">
271
+ <span><?php echo mb_strimwidth( $entry['caption']['text'], 0, 100, '...' ); ?></span>
272
  </div>
273
  </div>
274
  <?php endif; ?>