WD Instagram Feed – Instagram Gallery - Version 1.4.32

Version Description

Download this release

Release Info

Developer 10web
Plugin Icon 128x128 WD Instagram Feed – Instagram Gallery
Version 1.4.32
Comparing to
See all releases

Code changes from version 1.4.31 to 1.4.32

config.php CHANGED
@@ -3,7 +3,7 @@ if ( !defined('ABSPATH') ) {
3
  exit;
4
  }
5
 
6
- define('WDI_VERSION', '1.4.31');
7
  define('WDI_IS_FREE', TRUE);
8
  define('WDI_PREFIX', 'wdi');
9
  define('WDI_DIR', WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__)));
3
  exit;
4
  }
5
 
6
+ define('WDI_VERSION', '1.4.32');
7
  define('WDI_IS_FREE', TRUE);
8
  define('WDI_PREFIX', 'wdi');
9
  define('WDI_DIR', WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__)));
framework/WDILibraryEmbed.php CHANGED
@@ -78,8 +78,11 @@ class WDILibraryEmbed {
78
  // code...
79
  break;
80
  }
81
- // We are developing dynamic HTML here where all variables inside output already escaped.
82
- /* phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped */
83
- echo $html_to_insert;
 
 
 
84
  }
85
  }
78
  // code...
79
  break;
80
  }
81
+ echo wp_kses($html_to_insert, array(
82
+ "div" => array("class" => true, "style" => true, "frameborder" => true, "allowfullscreen" => true),
83
+ "img" => array("class" => true, "style" => true, "src" => true, "data-id" => true),
84
+ "video" => array("class" => true, "style" => true, "onclick" => true, "controls" => true, "data-id" => true),
85
+ "source" => array("src" => true, "type" => true),
86
+ ));
87
  }
88
  }
framework/WDI_form_builder.php CHANGED
@@ -19,11 +19,6 @@ public function __construct() {
19
  $name = $element['CONST'].'['.(isset($element['name']) ? $element['name'] : 'NOT_SET') . ']';
20
  $id = isset($element['id']) ? $element['id'] : 'WDI_'.$element['name'];
21
  $type = isset($element['input_type']) ? $element['input_type'] : 'text';
22
- $attrs = ' ';
23
- foreach ($element['attr'] as $attr) {
24
- $attrs .= esc_attr($attr['name']) . '="' . esc_attr($attr['value']) . '" ';
25
- }
26
- $attr = $attrs;
27
 
28
  $input_size= isset($element['input_size']) ? $element['input_size'] : '20';
29
  $label = isset($element['label']) ? $element['label'] : '';
@@ -47,9 +42,10 @@ public function __construct() {
47
  ?>
48
  <input type="<?php echo esc_attr($type); ?>" id="<?php echo esc_attr($id); ?>" name="<?php echo esc_attr($name); ?>" value="<?php echo esc_attr($value); ?>"
49
  <?php
50
- // All arguments in the $attr are esc.
51
- /* phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped */
52
- echo $attr; ?> size="<?php echo esc_attr($input_size); ?>">
 
53
  <?php
54
  if($label!='' && $label['place']=='after'){
55
  ?>
@@ -483,11 +479,6 @@ public function __construct() {
483
  $width = isset($element['width']) ? ($element['width']) : '';
484
  $break = isset($element['break']) ? '<br/>' : '';
485
  $disable = (isset($element['switched']) && $element['switched']=='off') ? 'disabled' : '' ;
486
- $attrs = ' ';
487
- foreach ($element['attr'] as $attr) {
488
- $attrs .= $attr['name'] . '="' . $attr['value'] . '" ';
489
- }
490
- $attr = $attrs;
491
 
492
  $defaults = $element['defaults'];
493
  $current_settings = isset($feed_row) ? $feed_row : '';
@@ -511,9 +502,9 @@ public function __construct() {
511
  ?>
512
  <input
513
  <?php
514
- // All arguments in the $attr are esc.
515
- /* phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped */
516
- echo $attr;
517
  ?>
518
  <?php echo esc_attr($disable); ?> type="checkbox" class="checkbox" name="<?php echo esc_attr($name); ?>" id="<?php echo esc_attr($id) ?>" <?php checked(1,$opt_value)?> value="1">
519
  <?php
19
  $name = $element['CONST'].'['.(isset($element['name']) ? $element['name'] : 'NOT_SET') . ']';
20
  $id = isset($element['id']) ? $element['id'] : 'WDI_'.$element['name'];
21
  $type = isset($element['input_type']) ? $element['input_type'] : 'text';
 
 
 
 
 
22
 
23
  $input_size= isset($element['input_size']) ? $element['input_size'] : '20';
24
  $label = isset($element['label']) ? $element['label'] : '';
42
  ?>
43
  <input type="<?php echo esc_attr($type); ?>" id="<?php echo esc_attr($id); ?>" name="<?php echo esc_attr($name); ?>" value="<?php echo esc_attr($value); ?>"
44
  <?php
45
+ foreach ($element['attr'] as $attr) {
46
+ echo esc_attr($attr['name']) . '="' . esc_attr($attr['value']) . '" ';
47
+ } ?>
48
+ size="<?php echo esc_attr($input_size); ?>">
49
  <?php
50
  if($label!='' && $label['place']=='after'){
51
  ?>
479
  $width = isset($element['width']) ? ($element['width']) : '';
480
  $break = isset($element['break']) ? '<br/>' : '';
481
  $disable = (isset($element['switched']) && $element['switched']=='off') ? 'disabled' : '' ;
 
 
 
 
 
482
 
483
  $defaults = $element['defaults'];
484
  $current_settings = isset($feed_row) ? $feed_row : '';
502
  ?>
503
  <input
504
  <?php
505
+ foreach ($element['attr'] as $attr) {
506
+ echo esc_attr($attr['name']) . '="' . esc_attr($attr['value']) . '" ';
507
+ }
508
  ?>
509
  <?php echo esc_attr($disable); ?> type="checkbox" class="checkbox" name="<?php echo esc_attr($name); ?>" id="<?php echo esc_attr($id) ?>" <?php checked(1,$opt_value)?> value="1">
510
  <?php
frontend/shortcode.php CHANGED
@@ -306,16 +306,7 @@ function wdi_load_frontend_scripts_ajax($additional_scripts = array(), $addition
306
  if(!isset($wp_scripts->registered[$handle])) {
307
  continue;
308
  }
309
-
310
- if(!empty($wp_scripts->registered[$handle]->extra['data'])) {
311
- echo wp_kses('<script>' . str_replace('&quot;', '"', $wp_scripts->registered[$handle]->extra['data']) . '</script>', array('script' =>array()));
312
- }
313
-
314
- if(strpos($wp_scripts->registered[$handle]->src, '/wp-includes/js/') === 0) {
315
- echo wp_kses(sprintf($script_tag, $wp_scripts->base_url . $wp_scripts->registered[$handle]->src, $wp_scripts->registered[$handle]->ver), array('script' => array('src' => true)));
316
- } else {
317
- echo wp_kses(sprintf($script_tag, $wp_scripts->registered[$handle]->src, $wp_scripts->registered[$handle]->ver), array('script' => array('src' => true)));
318
- }
319
  }
320
 
321
  $styles_handles = array(
@@ -325,23 +316,11 @@ function wdi_load_frontend_scripts_ajax($additional_scripts = array(), $addition
325
  );
326
 
327
  $styles_handles = array_merge($styles_handles, $additional_styles);
328
- $style_tag = "<link rel='stylesheet' id='%s' href='%s?ver=%s' type='text/css' media='all' />";
329
-
330
  foreach($styles_handles as $handle) {
331
  if(!isset($wp_styles->registered[$handle])) {
332
  continue;
333
  }
334
-
335
- if(!empty($wp_styles->registered[$handle]->extra['data'])) {
336
- echo wp_kses('<script>' . $wp_styles->registered[$handle]->extra['data'] . '</script>', array('script' => array()));
337
- }
338
-
339
- if(strpos($wp_styles->registered[$handle]->src, '/wp-includes/js/') === 0) {
340
- echo wp_kses(sprintf($style_tag, $handle, $wp_styles->base_url . $wp_styles->registered[$handle]->src, $wp_styles->registered[$handle]->ver), array('link' => array('rel' => true, 'id' => true, 'href' => true, 'type' => true, 'media' => true)));
341
- }
342
- else {
343
- echo wp_kses(sprintf($style_tag, $handle, $wp_styles->registered[$handle]->src, $wp_styles->registered[$handle]->ver), array('link' => array('rel' => true, 'id' => true, 'href' => true, 'type' => true, 'media' => true)));
344
- }
345
  }
346
  }
347
 
306
  if(!isset($wp_scripts->registered[$handle])) {
307
  continue;
308
  }
309
+ wp_print_scripts($handle);
 
 
 
 
 
 
 
 
 
310
  }
311
 
312
  $styles_handles = array(
316
  );
317
 
318
  $styles_handles = array_merge($styles_handles, $additional_styles);
 
 
319
  foreach($styles_handles as $handle) {
320
  if(!isset($wp_styles->registered[$handle])) {
321
  continue;
322
  }
323
+ wp_print_styles($handle);
 
 
 
 
 
 
 
 
 
 
324
  }
325
  }
326
 
frontend/views/imagebrowser.php CHANGED
@@ -151,7 +151,8 @@ class WDI_ImageBrowser_view {
151
  $theme_path_parts = pathinfo($file_url);
152
 
153
  if(WDILibrary::is_ajax() || WDILibrary::elementor_is_active()) {
154
- echo sprintf("<link rel='stylesheet' id='%s' href='%s' type='text/css' media='all' />", esc_html($theme_path_parts['filename']), esc_url_raw($file_url . '?key=' . $generator->get_file_key()));
 
155
  }
156
  else {
157
  wp_enqueue_style($theme_path_parts['filename'], $file_url . '?key=' . $generator->get_file_key());
151
  $theme_path_parts = pathinfo($file_url);
152
 
153
  if(WDILibrary::is_ajax() || WDILibrary::elementor_is_active()) {
154
+ wp_register_style($theme_path_parts['filename'], esc_url_raw($file_url), array(), $generator->get_file_key(), true);
155
+ wp_print_styles($theme_path_parts['filename']);
156
  }
157
  else {
158
  wp_enqueue_style($theme_path_parts['filename'], $file_url . '?key=' . $generator->get_file_key());
frontend/views/thumbnails.php CHANGED
@@ -157,7 +157,8 @@ class WDI_Thumbnails_view {
157
  if ( $file_url !== "" ) {
158
  $theme_path_parts = pathinfo($file_url);
159
  if ( WDILibrary::is_ajax() || WDILibrary::elementor_is_active() ) {
160
- echo sprintf("<link rel='stylesheet' id='%s' href='%s' type='text/css' media='all' />", esc_html($theme_path_parts['filename']), esc_url_raw($file_url . '?key=' . $generator->get_file_key()));
 
161
  }
162
  else {
163
  wp_enqueue_style($theme_path_parts['filename'], $file_url . '?key=' . $generator->get_file_key());
157
  if ( $file_url !== "" ) {
158
  $theme_path_parts = pathinfo($file_url);
159
  if ( WDILibrary::is_ajax() || WDILibrary::elementor_is_active() ) {
160
+ wp_register_style($theme_path_parts['filename'], esc_url_raw($file_url), array(), $generator->get_file_key(), true);
161
+ wp_print_styles($theme_path_parts['filename']);
162
  }
163
  else {
164
  wp_enqueue_style($theme_path_parts['filename'], $file_url . '?key=' . $generator->get_file_key());
readme.txt CHANGED
@@ -1,1002 +1,10 @@
1
- === 10Web Social Photo Feed ===
2
  Contributors: webdorado,10web,progmastery
3
- Tags: custom instagram feed, feed, instagram, hashtag, Instagram feed, instagram gallery, instagram posts, Instagram images, Instagram photos, lightbox, photos,instagram account
4
- Requires at least: 3.9
5
  Requires PHP: 5.2
6
  Tested up to: 5.8
7
- Stable tag: 1.4.31
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
- Formerly "10Web Instagram Feed". 10Web Social Photo Feed for Instagram is the leading plugin for easily presenting a customizable Instagram feed on your website.
12
-
13
- == Description ==
14
-
15
- 10Web Social Photo Feed for Instagram is the leading plugin for easily presenting a customizable Instagram feed on your website.
16
-
17
- = Useful Links: =
18
-
19
- [Live Demo](https://demo.10web.io/instagram-feed/)
20
-
21
- [Premium 10Web Social Photo Feed for Instagram](https://10web.io/plugins/wordpress-instagram-feed/)
22
-
23
- [Special Offer for all Premium Plugins](https://10web.io/plugins-bundle-pricing/)
24
-
25
-
26
- https://www.youtube.com/watch?v=CgZNya0HZCQ
27
-
28
-
29
- 10Web Social Photo Feed for Instagram is a user-friendly WordPress plugin that can help you bring Instagram feeds with the media of your Instagram account to any of your posts and pages. It will take couple of minutes to set up and customize to your needs. 10Web Social Photo Feed for Instagram's settings and features will allow you to take full control over how to display the feeds and the content on your website.
30
-
31
- 10Web Social Photo Feed for Instagram is a perfect fit for bloggers, photography websites, travel and food blogs and for WordPress users that want to spice up their posts with the latest images and videos from their Instagram profiles. The plugin is responsive and scales perfectly to screens of all sizes, providing better user experience across the board.
32
-
33
-
34
- == Benefits ==
35
- * **Increase user engagement** - Engagement on Instagram is higher than on any other social platform. Keep your visitors engaged and significantly increase surfing time and visitor retention on your website.
36
- * **Increase brand/blog awareness** - Let your site visitors get into conversation and connect with your blog or brand. Keep your visitors tuned and increase your blog's/brand's awareness.
37
- * **Save your time** – Keep your posts authentic with content from your Instagram account without any manual work involved. Your feeds will be fresh and up to date and synced automatically.
38
- * **Add appeal to your website** - Stunning display views, custom styling features and image lightbox effects will bring vibrancy to your posts and pages, and add to your website's overall look and feel.
39
- * **Control** - Take pure charge of what content to display and how to display it with an extensive list of content and display settings. Specify the number of photos you display on the page and choose what happens when a visitor clicks on an image from the feed. Custom styled display views and filtered Instagram content will be a great addition to any post you publish.
40
- * **Minimal effort** – Set the plugin up and have it up and running in no time and with minimal efforts. Out of box solution that's user-friendly and simple in use.
41
- * **Support** - The team behind 10Web Social Photo Feed for Instagram provides timely and effective support to all its users. We keep standards high and response time low.
42
- * **Resource efficient** - WordPress 10Web Social Photo Feed for Instagram plugin loads the images pretty fast as no feed data is stored in the database. All the images, videos, captions and comments are retrieved directly from the Instagram in the front-end.
43
-
44
-
45
-
46
- == What's in it ==
47
-
48
- = CUSTOMIZABLE LAYOUTS =
49
- Display the feeds in one of the available layouts Thumbnail, Image Browser, Masonry (Premium version), Blog Style(Premium version). Whether you want to have small sized image thumbnails or larger images displayed you'll find the right layout for that. Customize layouts to get exactly what you need and display the metadata that's most relevant for your niche.
50
-
51
- = INSTAGRAM GALLERY =
52
- Create Instagram galleries on your website by embedding entire timelines to your posts using a shortcode or the plugin's Instagram widget on your sidebar.
53
-
54
- = INDIVIDUAL AND MIXED FEEDS =
55
- You can choose to show a single feed on your pages and posts, but you can make things more interesting and create mixed feeds (Premium version). With single feeds you can show posts from your Instagram account and single hashtag. Mixed feeds, on the other hand, can contain your Instagram account and multiple hashtags. A front end filter is available for mixed feeds (Premium version).
56
-
57
- = FILTERED FEEDS =
58
- Use Conditional Filters of the 10Web Social Photo Feed for Instagram plugin to display or skip certain content from the feeds by setting up a filter logic and condition types. Add custom condition types if necessary and fine-tune your feeds. Conditional Filters option is available for Premium version only.
59
-
60
- = INSTAGRAM WIDGET =
61
- Want to show Instagram feeds on your website sidebar? Do it quick and easy with the help of the Instagram Feed Widget.
62
-
63
- = LIGHTBOX =
64
- 10Web Social Photo Feed for Instagram features a powerful lightbox. It provides support for HTML5 video, 15 transition effects (Premium version), filmstrip (Premium version) and carousel features. The lightbox works great with Instagram touch as well.
65
-
66
- = SCROLL AND PAGINATION =
67
- The plugin comes with a classic pagination with next and previous buttons. You can also choose the infinite scroll option (Premium version) to bring better user experience. This allows to view more images when scrolling the page down. You can set the the number of images you want to show per page.
68
-
69
- = THEMES =
70
- Choose from the two default themes offered by the plugin or create multifarious themes (Premium version) by customizing the colors, sizes and display styles. 10Web Social Photo Feed for Instagram allows you to have separate layout settings for each theme with custom settings for header, user data and pagination.
71
-
72
- = SETTINGS/CUSTOMIZATION =
73
-
74
- *Some customizations described here are available in Premium version. Please refer to feature summary for additional info.*
75
-
76
- 10Web Social Photo Feed for Instagram comes with extensive customization options for the feeds, layouts, themes and content display. Every new feed you add to your website has its own settings for the feed and for the lightbox that pops up when people click on an image or video. Upon clicking on the image you can choose to redirect people to Instagram, open the image in the lightbox, or chose the custom redirect option. There are various image sorting options available based on the date, likes, comments, and on random basis. Media loading options include load more button, infinite Instagram scrolling, or classic pagination with next and previous buttons. You can enable "Follow on Instagram" button from the feed settings and let your visitors follow the displayed Instagram accounts directly from your site. The number of photos you display on the page or post can be specified from the feed settings, as well as the number of the loading images.
77
-
78
-
79
- [Premium version adds](https://10web.io/plugins/wordpress-instagram-feed/)
80
-
81
- * Masonry Layout feeds
82
- * Blog Style Layout feeds
83
- * Image metadata (Instagram tag,image caption, comments, like) display
84
- * Mixed and multiple feeds (Instagram account posts with multiple hashtags)
85
- * Fully Customizable Themes
86
- * Vertical/horizontal filmstrip in lightbox
87
- * HTML5 Video Support in Lightbox
88
- * Blog Style and Image Browser views for displaying Instagram videos
89
- * 15 Lightbox transition effects
90
- * Social sharing buttons (Facebook, Twitter, Google+, LinkedIn and Pinterest)
91
- * Infinite scroll for the feed (Similar to Instagram standard)
92
- * Instagram Comments display in Lightbox
93
- * Instagram Hashtag filtering options
94
- * Conditional Filters
95
-
96
- ###IMPORTANT:
97
- If you think you found a bug in 10Web Social Photo Feed for Instagram or wonder how to add Instagram to your website, or how to get Instagram plugin up and running, please check out [Support Forum](https://wordpress.org/support/plugin/wd-instagram-feed). Additional information on how to download Instagram plugin to your website you can find in our user manual If you do not find a solution in the forum, do not hesitate to [click here to contact us](https://10web.io/contact-us/).
98
-
99
- == Installation ==
100
-
101
- #### Thank you for your interest in 10Web Social Photo Feed for Instagram.
102
-
103
- Here are two ways of installing 10Web Social Photo Feed for Instagram: via WordPress backend and via FTP. Let's discuss each case individually:
104
-
105
- **Installing via WordPress**
106
-
107
- Login to the WordPress Administrator Panel.
108
- Go to Plugins > Add New > Upload.
109
- Click Choose file button and select the zip folder of 10Web Social Photo Feed for Instagram plugin and press Install now button.
110
- Click Activate button.
111
-
112
- **Installing via FTP**
113
-
114
- Login to your hosting space via an FTP software, e.g. FileZilla.
115
- Unzip the downloaded 10Web Social Photo Feed for Instagram plugin folder without making any changes to the folder.
116
- Upload the Instagram plugin into the following location wp-content>wp-plugins.
117
- Login to the WordPress Administrator Panel.
118
- Activate 10Web Social Photo Feed for Instagram by going to Plugins and pressing Activate button.
119
-
120
- **Creating an Instagram Feed**
121
-
122
- Creating a responsive Instagram feed is simple and easy with this user-friendly Instagram importer plugin. Go to **10Web Social Photo Feed for Instagram > Feeds** and press **Add New.** Here you can choose Instagram feed layout and manage lightbox options. From the lightbox options you can enable filmstrip, slideshow, and take full control how custom feed images, image galleries, pictures, Instagram gallery, and videos of this social network are displayed within the lightbox.
123
-
124
- You can enable autoplay to play photos and Instagram group images similar to an image slider. To get an Instagram slider appearance in the lightbox you'll need to adjust the lightbox and image display settings. Lightbox works great with Instagram touch. The feed will be automatically updated once users share Instagram new images. The feeds support new Instagram carousel feature, and display the images of the responsive carousel.
125
-
126
- Create an Instagram feed based on one of the available layouts - Thumbnail, Masonry, Blog Style, Image Browser.
127
-
128
-
129
-
130
- == Frequently Asked Questions ==
131
-
132
- = What can I achieve using Instagram Feed plugin? =
133
-
134
- WordPress Instagram Feed is a user-friendly plugin with enhanced functionality, which lets you create and showcase Instagram feeds on your WordPress website. You can build **multiple feeds** with the media of **your Instagram account** or **hashtag** by completing just a few simple steps.
135
-
136
- You will need a couple of minutes to incorporate **Instagram API** to your website. The plugin will automatically create a feed from your Instagram profile. Additionally, you can build Instagram feeds and show posts of your username, as well as **hashtags.**
137
-
138
- Customize the features of the feeds by configuring advanced settings of Instagram Feed plugin. Its user-friendly tools and features allow you fully personalize your feeds, set up conditional filters for feed username and hashtags, modify **image lightbox** settings and more.
139
-
140
- Control the appearance and layout of your Instagram feed using 4 outstanding **layout types** and **theme options** of Instagram Feed plugin. You can publish the feeds with one of the following layouts:
141
-
142
- * Thumbnails,
143
- * Masonry,
144
- * Blog Style,
145
- * Image Browser.
146
-
147
- Furthermore, its **lightbox** feature allows you to also display the images as a beautiful image slider in a popup. The themes of Instagram Feed plugin let you modify each and every attribute of the feeds.
148
-
149
- With Instagram Feed plugin, you can showcase photos and videos, share wonderful food and travel blog pictures of Instagram with your website visitors. In case you use Instagram for e-commerce, this is the best Instagram plugin to engage your social network followers to your website.
150
-
151
- The plugin is designed with mobile-friendly layout, letting you provide great user experience on any screen size or device.
152
-
153
- = How can I get my Instagram Access Token? =
154
-
155
- To begin creating feeds with WordPress Instagram Feed plugin, you need to configure Instagram app for website and get **Instagram Access Token** first. This is a very simple process. Visit **Instagram Feed > Settings** page from WordPress administrative dashboard to start the setup.
156
-
157
- Press **Sign in with Instagram** button. In case you are logged in to [Instagram.com](https://www.instagram.com/) from your web browser, **Access Token** and **Username** fields will be automatically filled in. Otherwise, if there are no logged in users, a popup will appear letting you sign in.
158
-
159
- To use a different Instagram account, simply press **Reset access token and username** button. Afterwards, you can sign out from Instagram.com, and get access token for another Instagram user by logging in again.
160
-
161
- This is all you need to do, to be able to embed Instagram gallery to your WordPress website. You can then display your Instagram photos and videos as a responsive carousel, as widgets on the sidebar or footer of your site, and more.
162
-
163
- As soon as you sign in to Instagram and get Access Token, a sample feed is created with your account and placed on a **private page** of your WordPress website. You can view your Instagram image gallery by clicking on **View your feed** button, or modify its settings and appearance by pressing **Edit your feed.** The feed will also appear on **Instagram Feed > Feeds** page.
164
-
165
- Note, that this feed is not visible to website visitors, unless you edit its page and make it **public.**
166
-
167
- = How to embed Instagram media to my WordPress site? =
168
-
169
- To begin creating your first feed, navigate to **Feeds** page of Instagram Feed plugin. This page of our Instagram HTML plugin contains a list of all your feeds created with the plugin. You will see the feed of your Instagram timeline appearing on this list.
170
-
171
- Press **Add New** button to start building your feed and import Instagram posts to your WordPress website.
172
-
173
- Firstly, make sure to set a **Feed Title** for your feed. Then, let's configure the mandatory settings which are necessary for displaying the feed. Click on **Media** bar to expand these options.
174
-
175
- Use **Feed Media** drop-down box to choose the content of your Instagram feed. **Feed Usernames and Hashtags** option lets you input your Instagram username and display feeds containing images and videos of your account. You can also add **hashtags** and showcase your posts with those hashtags.
176
-
177
- Write the usernames without the **@** sign, however for hashtags, you do need to add **#** at the beginning.
178
-
179
- While using this Instagram media importer tool, make sure to specify one username or hashtag at a time, and press **Add** button each time.
180
-
181
- You can customize the **sorting** of the media on your feed using the following settings.
182
-
183
- **Sort Media By** allows you to choose the **parameter,** based on which the photos and videos on your Instagram feed will be ordered. You can select one of the following:
184
-
185
- * Date,
186
- * Likes,
187
- * Comments,
188
- * Random.
189
-
190
- **Sorting Order** option lets you specify the **direction** of ordering the Instagram media on your feed. It can have one of the following two values:
191
-
192
- * Ascending,
193
- * Descending.
194
-
195
- **Media** section of feed settings also allows you to change the action which takes place after users click on an image. With **Action OnClick** option, Instagram Feed plugin provides 4 functions for this:
196
-
197
- * **Open Lightbox.** Clicking on a post will open a popup box with the large version of the image or video, letting you navigate through the rest of your feed media just like a slider.
198
- * **Redirect To Instagram.** This option will redirect users to the same post on Instagram when they click on an item in the feed.
199
- * **Custom Redirect.** Select this option and specify a link in Redirect URL input box. Users will be taken to this page after clicking on a post in the feed.
200
- * **Do Nothing.** Clicking on posts of the feed will not trigger any functions.
201
-
202
- = Can I display more than one Instagram feeds on my website? =
203
-
204
- Yes, you can add as many Instagram feeds as you want to your website and show them on posts and pages.
205
-
206
- Add the Instagram feeds to posts and pages by using the **shortcode** provided or choosing from the list by clicking on the Instagram Feed button.
207
-
208
- = What layouts can I use to showcase my Instagram feed? =
209
-
210
- Instagram Feed plugin provides 4 beautiful layouts, which you can use to showcase the photos and videos on your Instagram feeds. Each of them can be fully personalized to fit the style of your website.
211
-
212
- Use **Select Layout** option and choose the appearance:
213
-
214
- * Thumbnails,
215
- * Masonry,
216
- * Blog Style,
217
- * Image Browser.
218
-
219
- Let's go through all 4 layouts and help you choose the one that suits your site the best.
220
-
221
- **Thumbnails Layout**
222
-
223
- **Thumbnails Layout** of Instagram Feed plugin provides an equally aligned beautiful Instagram grid, consisting of the thumbnail images of the media on your feed. All thumbnails on this layout are set to have the same dimensions, and you can assign the width and height you like.
224
-
225
- **Masonry Layout**
226
-
227
- Just like Thumbnails, **Masonry Layout** is also built with the thumbnail images of Instagram posts. However, its Instagram grid is not aligned equally. The thumbnail images are created as the exact miniatures of their large versions (i.e. the dimensions of thumbnails and large posts are proportional).
228
-
229
- **Blog Style Layout**
230
-
231
- **Blog Style Layout** is a perfect choice if you want to post a media file on Instagram and repost the content to WordPress website as a photo blog. The images are displayed with larger dimensions, than on Thumbnails and Masonry Layouts.
232
-
233
- You can enable captions, descriptions, and hashtags of the media and show them below the posts on your feed.
234
-
235
- **Image Browser Layout**
236
-
237
- Just like Blog Style, **Image Browser Layout** of Instagram Feed plugin also displays the posts with larger dimensions. However, this layout shows a single large image with navigation buttons, similar to a slideshow. You can navigate through the posts by clicking on **Next** and **Previous** buttons.
238
-
239
- = How can I personalize the features of my Instagram feed? =
240
-
241
- Instagram Feed social plugin comes with a number of advanced customization options, which you can use to change the functionality and features of your feeds. You can modify the feed as far as:
242
-
243
- * changing its **pagination** and **loading,**
244
- * defining the number of displayed and newly loaded posts,
245
- * personalizing the settings of all 4 layouts,
246
- * controlling the **sort order** of the media on your Instagram feed,
247
- * choosing the attributes to showcase with the feed,
248
-
249
- and much more.
250
-
251
- To begin configuring these options, edit your feed and open **Feed Settings** tab. Scroll down a bit to find the following two sections:
252
-
253
- * Layout and Pagination,
254
- * Advanced.
255
-
256
- Let's go through each section and discuss every option individually.
257
-
258
- **Layout and Pagination**
259
-
260
- **New Media Loading.** Select the method to use while loading more images and videos on your Instagram feed. You can choose one of the following options:
261
-
262
- * Pagination,
263
- * Load More Button,
264
- * Infinite Scroll,
265
- * None.
266
-
267
- **Number of Columns.** Set the number of columns which will be used to align Instagram media in **Thumbnails** and **Masonry** feeds.
268
-
269
- **Number of Images/Videos.** Specify the number of Instagram media to display when the feed is loaded initially.
270
-
271
- **Number of New Media.** Set the number of posts which will be added to the feed, after the user clicks on **Load More** button or triggers **Infinite Scroll.**
272
-
273
- **Combine and Sort Again After Loading More.** If this option is enabled, both newly loaded and existing media are mixed then resorted together according to **Sort Media By** setting.
274
-
275
- **Make Layout Not Responsive.** When this option is selected, the layout of the feed does not convert to single-column display on small screens. The feed width is shrunk, but the number of columns stays the same.
276
-
277
- **Number of Media for Initial Preload.** Specify the number of posts to preload, when an Instagram feed is first loaded. This option helps to load a few posts at once, then navigate through the media smoothly. Note, that this setting applies to **Image Browser** feeds only.
278
-
279
- **Number of Media for Pagination Preload.** Set the number of posts to preload, while the user navigates through the media by clicking on **Next** or **Previous** buttons. Note, that this option is applicable to **Image Browser** layout only.
280
-
281
- **Advanced**
282
-
283
- **Theme.** Select the theme which will be used to style the appearance of your Instagram feed. You can edit the theme or create a new one from **Instagram Feed > Themes** page.
284
-
285
- **Feed Media Resolution.** Choose the resolution of the media on your Instagram feed. You can select one of the following options:
286
-
287
- * Optimal,
288
- * Standard (640 pixels),
289
- * Low (320 pixels),
290
- * Thumbnail (150 pixels).
291
-
292
- In case **Optimal** is selected, the dimensions of the loaded media are calculated according to the width of feed container. This provides fast loading and no stretching images.
293
-
294
- **Featured Image.** Set the featured image of the header section of your Instagram feed. The image is pulled from the **user profile** or **hashtag** you select.
295
-
296
- **Show Feed Header.** Activate this option to display a header on your Instagram feed. It includes **Feed Title** and **Featured Image** you specified.
297
-
298
- **Show User Data.** If this option is enabled, additional details from the selected accounts and hashtags will be displayed on your Instagram feed. You can activate:
299
-
300
- * **Follow On Instagram** button,
301
- * Number of **Posts** and **Followers** of Instagram account/hashtag,
302
- * **User Bio** of your Instagram account.
303
-
304
- **Show Media Caption.** Enable this setting to display descriptions of Instagram photos or videos below them, fully or partially.
305
-
306
- **Show Full Description.** Activate this setting to show the full captions of Instagram media. Note that this option only applies to feeds with **Masonry** layout.
307
-
308
- **Show Number of Likes.** Mark this option as checked to display the number of likes on each Instagram post.
309
-
310
- **Show Number of Comments.** Display the number of comments on Instagram photos or videos with your feed.
311
-
312
- **Show Username On Image Thumb.** Activating this setting will let you show your Instagram account username on the images or videos of your feed.
313
-
314
- = Is it possible to modify the settings of Instagram lightbox? =
315
-
316
- Instagram Feed plugin comes with a popup box, which appears when users click on a photo or a video in the feed. It lets them display the larger versions of Instagram media, as well as play videos and navigate through the posts.
317
-
318
- To run the lightbox by clicking on the media, make sure **Action OnClick** option of **Feed Settings** tab is set to **Open Lightbox.**
319
-
320
- Just like other attributes of Instagram feeds, **Lightbox Settings** can be personalized as well. Edit your feed, then navigate to **Lightbox Settings** tab. Here you will find all the tools which help you tweak the features of the lightbox.
321
-
322
- The user-friendly lightbox options are divided into the following two main sections:
323
-
324
- * General Settings,
325
- * Advanced Settings.
326
-
327
- Let's discuss these two sections and discover the benefits of the options they provide.
328
-
329
- **General**
330
-
331
- **General** section of Lightbox Settings mainly provides options to modify the dimensions and effects on the popup box. You are able to make the following changes:
332
-
333
- * set the dimensions of the lightbox,
334
- * configure autoplay and choose from 14 amazing animation effects,
335
- * activate full-width lightbox,
336
-
337
- and more.
338
-
339
- **Advanced**
340
-
341
- With **Advanced** section of Lightbox settings, you have full control of what's shown with the popup pox of Instagram feed images and videos. It takes just a few steps to get the appearance of the lightbox exactly as you wish to have it.
342
-
343
- Lightbox Advanced options allow you to:
344
-
345
- * add a filmstrip to the lightbox, containing the thumbnails of Instagram posts,
346
- * customize the navigation on the lightbox, adding **Next** and **Previous** buttons,
347
- * activate image **captions** and display them on the image,
348
- * enable **right-click protection,** and thus disallow right-click on images and videos,
349
- * place **share, fullscreen, download** and other control buttons,
350
- * add **comments section** to the lightbox,
351
-
352
- and much more.
353
-
354
- = Can I create mixed Instagram feeds my Instagram account and multiple hashtags? =
355
-
356
- This option is available in **Premium** version. There, you can create mixed Instagram feeds with your Instagram account and several hashtags. You can even create the combination of both.
357
-
358
- = I see an invalid access Token error. What should I do? =
359
-
360
- If you are seeing this alert message on your Instagram Feed plugin, please note, that Instagram access tokens expire from time to time. Therefore you need to get new from your Instagram account again.
361
-
362
- Please sign in to your Instagram account and get a new token. Add it to **Instagram Feed > Settings** page.
363
-
364
- If the token will still cause "Invalid access token" error, revoke access for the plugin [here](www.instagram.com/accounts/manage_access/) and sign in again from **Settings** page.
365
-
366
- = I would like to display only the Instagram posts which have certain hashtags. How can this be done? =
367
-
368
- *You can definitely do this with premium version!*
369
-
370
- In case you wish to showcase Instagram feeds with additional, more definitive filters, **Conditional Filters** feature of Instagram Feed plugin will help you with it. This functionality allows you to show images of your Instagram account with a specific hashtag, skip images which belong to certain hashtags, and more.
371
-
372
- To begin creating additional filters for your Instagram feed, edit it and navigate to **Conditional Filters** tab. Use **Enable Conditional Filters** to activate the necessary tools.
373
-
374
- **Feeds to Filter** option shows the basis for conditional filters. These are the username and hashtags you have added to your Instagram feed. The filters will search among the posts of the username and hashtags, and pull those which fulfill the specified condition.
375
-
376
- Now let's configure the condition itself. First, you need to choose the logical operator of the condition using **Filter Logic** setting. Select one of the following 3 operators:
377
-
378
- * AND: Shows Instagram posts that belong to **all sources** of filtering.
379
- * OR: Shows Instagram media which belong to **at least one of the sources** of filtering.
380
- * NOR: Hides Instagram posts which belong to **at least one of the sources** of filtering.
381
-
382
- Afterwards, use **Add Condition** option to specify the parameter for the condition, which can be one of the following.
383
-
384
- * **Hashtag.** If you wish to filter your accout feed with a certain hashtag, you can use this option.
385
- * **Mention.** This option can be used for feeds both with hashtags and username, i.e. you can display posts where another user is mentioned.
386
- * **Description.** Just like Mentions, Description can be used both with hashtags and username. You can specify a single keyword or a phrase, which is used in descriptions of your Instagram posts.
387
- * **Instagram Media Link.** You are able to filter using the shareable link of Instagram media. Simply provide the full URL of the post, as the following example: https://www.instagram.com/p/Be6H6G9lmCQ/
388
-
389
- Afterwards, select the **Condition Type** for the filter, which corresponds to the parameter you are adding. For instance, in case you are adding #liveauthentic hashtag, the **Condition Type** needs to be set as **Hashtag** as well.
390
-
391
- Lastly, click **Add Condition** button, and the parameters you have added will be visible below **Result** section. Make sure to press **Save** after you finish configuring the filters.
392
-
393
- With **Result** option, you will see all of the added filters which will be applied to your Instagram feed.This feature is widely used on Instagram for eCommerce websites, as it serves like an Instagram feed with analytics.
394
-
395
- = How can I publish the Instagram Feed on my website? =
396
-
397
- Using WordPress Instagram feed plugin, you can publish your feeds with the following 3 different methods:
398
-
399
- * on a WordPress **page** or **post,**
400
- * as a **widget,**
401
- * on a **custom template** with a **PHP function.**
402
-
403
- A quick guide for this is provided with **How To Publish Feed** tab above your Instagram feed. Let's go through the necessary steps of each publishing method, and help you choose the one that fits your site the best.
404
-
405
- **Publishing the Feed on Pages or Posts**
406
-
407
- To publish Instagram feeds with this method, add or edit the page or post from WordPress administrative dashboard of your website. Click on **Add Instagram Feed** button from the top of the post editor. Afterwards, select the feed you wish to publish and press **Insert.**
408
-
409
- The **shortcode** of Instagram Feed plugin will be added to the content of your page/post.
410
-
411
- Alternatively, you can copy the shortcode from **Instagram Feed > Feeds** dashboard, under **Shortcode** column, and paste it into the content of your WordPress page/post.
412
-
413
- **Publishing Instagram Feed as a Widget**
414
-
415
- Navigate to **Appearance > Widgets** page from WordPress administrative dashboard to begin configuring your Instagram feed widget. Firstly, search for **Instagram Feed Widget** and drag it to the widget area, where you wish to display your feed.
416
-
417
- Provide a **Title** for your Instagram Feed, then choose the feed to publish using **Feed** drop-down box. Make sure to specify **Number of Columns,** as well as **Number of images** to show on your Instagram feed.
418
-
419
- Also, you can activate the following attributes and display them with your feed:
420
-
421
- * post **descriptions,**
422
- * **likes** and **comments,**
423
- * **Load More** button.
424
-
425
- **Publishing with PHP function**
426
-
427
- It is also possible to publish Instagram feeds on **custom PHP templates** using their **PHP functions.** To do this, simply copy the PHP function of your feed from **Instagram Feed > Feeds** page, then paste it to the necessary section of your custom template.
428
-
429
- = Is it possible to change the Instagram Feed themes to match my website? =
430
-
431
- *This is possible in Premium version.*
432
-
433
- Instagram Feed plugin provides a variety of user-friendly styling options, which let you customize the appearance and features of your Instagram feed even further. You can access these tools from **Instagram Feed > Themes** page.
434
-
435
- By default, Instagram Feed plugin comes with 2 themes:
436
-
437
- * Instagram,
438
- * Elegant.
439
-
440
- You can modify and use them on your feeds, or create a new theme with your own configurations. To select a default theme for your Instagram feeds, click on the star icon next to the corresponding entry.
441
-
442
- Each theme is divided into 2 main sections.
443
-
444
- **Customizing Feed**
445
-
446
- These theme settings allow you to modify global styling of your feeds, such as their width, text font, pagination attributes and more. This toolbox consists of the following sub-sections:
447
-
448
- * **General.** Configure the main parameters of the feed with these options, e.g. **feed container width** and **background color.**
449
- * **Header.** Edit header parameters, its text **font styles, image size, padding** and other attributes.
450
- * **User Data.** Set the appearance of user information section above the feeds, such as **text font size,** and the styling of **follow button** and **user bio.**
451
- * **Pagination.** Modify the styles of **Load More** button, as well as the font size, margins, and alignment of **Pagination** buttons.
452
- * **Thumbnails, Masonry, Blog Style** and **Image Browser.** Use the options on these tabs to modify default styles of layouts provided by Instagram Feed plugin. You can edit the border and padding of **photo wrapper,** text color and font of **post caption, comments** and **likes,** transparency of **image overlay,** and more.
453
-
454
- **Customizing Lightbox**
455
-
456
- You can customize each attribute of Instagram Feed lightbox using the tools in this section. They will help you change **lightbox background, control button** styles, **filmstrip** position and alignment, and more. Navigate through the following sub-sections to change the options:
457
-
458
- * General,
459
- * Control Buttons,
460
- * Close Button,
461
- * Navigation Buttons,
462
- * Filmstrip,
463
- * Info,
464
- * Comments.
465
-
466
- = Where can I change the settings of Instagram Feed plugin? =
467
-
468
- **Advanced Options** of Instagram Feed plugin allow you to modify a few global parameters, that apply to all feeds. Go to **Instagram Feed > Settings** page and click on **Advanced Options** bar to expand this toolbox.
469
-
470
- With **Minimal role to add and manage Feeds or Themes** option, you can select the WordPress user role which will have access to Instagram Feed plugin. The user roles of higher levels will also be able to modify and manage the feeds.
471
-
472
- **Custom CSS** lets you write your own CSS code for your Instagram feeds. This is handy, in case you need to make specific changes regarding the styling of your feed. Whereas with **Custom Javascript** you are able to apply additional scripts.
473
-
474
- For instance, let's consider you have a feed with **Thumbnails Layout,** and besides displaying the feed, you wish to expand captions for some posts. You can achieve this the following way.
475
-
476
- Firstly, you need to assign custom **wdi_feed_loaded** event of the plugin to the container of the Instagram feed, then set callback function for this event.
477
-
478
- Here is an example of a script, which expands captions of posts with 0, 1, 2, 3 indexes:
479
-
480
- `jQuery('#wdi_feed_0').on('wdi_feed_loaded',function(){
481
- jQuery('.wdi_photo_title').eq(0).trigger('click');
482
- jQuery('.wdi_photo_title').eq(1).trigger('click');
483
- jQuery('.wdi_photo_title').eq(2).trigger('click');
484
- jQuery('.wdi_photo_title').eq(3).trigger('click');
485
- });`
486
-
487
- Make sure to **Save** Changes after you finish modifying Advanced Options.
488
-
489
- **Uninstalling Instagram Feed Plugin**
490
-
491
- In case you wish to completely remove Instagram Feed plugin, you can **Uninstall** it using **Instagram Feed > Uninstall** menu item. However, it is important to note, that uninstalling the plugin will delete all feeds, reset all options to their defaults, and remove other data on the plugin.
492
-
493
- Please make sure you don't have any important information before you proceed.
494
-
495
-
496
- == Screenshots ==
497
-
498
- 1. WordPress 10Web Social Photo Feed for Instagram - Thumbnail layout
499
- 2. WordPress 10Web Social Photo Feed for Instagram - Image browser layout
500
- 3. WordPress 10Web Social Photo Feed for Instagram - Lightbox
501
- 4. WordPress 10Web Social Photo Feed for Instagram - Edit Instagram Feed
502
- 5. WordPress 10Web Social Photo Feed for Instagram - Theme Settings
503
-
504
- == Privacy Policy ==
505
- 10Web Social Photo Feed for Instagram plugin uses Instagram API on website front end. You have to authorize the plugin via sign in to get data from Instagram on your behalf. The plugin does not send any user’s data to Instagram. All the data received from Instagram via API is cached in WordPress database for some short customizable period to provide front end optimization. You can delete or update cached data. Instagram saves some cookies in browsers of website visitors via API data. These cookies are mostly used for security purposes. They are regulated under terms of Instagram’s privacy policy https://instagram.com/legal/privacy. The plugin asks for your consent to collect site administrator’s email address and site URL to offer customer support, deals and discounts on premium products and more.
506
-
507
- == Changelog ==
508
- = 1.4.31 =
509
- Fixed: Security issue.
510
-
511
- = 1.4.30 =
512
- Fixed: Security issue.
513
-
514
- = 1.4.29 =
515
- Fixed: Security issue.
516
-
517
- = 1.4.28 =
518
- Fixed: Security issue.
519
-
520
- = 1.4.27 =
521
- Fixed: Security issue.
522
-
523
- = 1.4.26 =
524
- Fixed: Security issue.
525
-
526
- = 1.4.25 =
527
- Fixed: Security issue.
528
- Changed: Set minimal (10 minutes) value for "Check for new posts every (min)".
529
-
530
- = 1.4.24 =
531
- Fixed: Recent Hashtags ordering.
532
- Fixed: Large images height in the lightbox.
533
- Fixed: Image in Pinterest share preview.
534
-
535
- = 1.4.23 =
536
- Improved: Cache logic.
537
- Fixed: Share to Twitter.
538
- Fixed: XSS vulnerabilities on widget title.
539
- Fixed: Pagination.
540
- Fixed: Show error message if "hashtag" is not found.
541
-
542
- = 1.4.22 =
543
- Fixed: XSS vulnerabilities on settings page.
544
- Fixed: Disable pagination during page load.
545
-
546
- = 1.4.21 =
547
- Fixed: Connecting to the Business account.
548
-
549
- = 1.4.20 =
550
- Fixed: Cache logic.
551
-
552
- = 1.4.19 =
553
- Fixed: XSS vulnerability.
554
-
555
- = 1.4.18 =
556
- Added: Possibility to show IGTV media in the feed.
557
- Fixed: Lightbox filmstrip issue.
558
- Fixed: Issue on changing account type from business to personal.
559
- Fixed: Show caption for posts loaded with load more.
560
- Fixed: Logic of cache.
561
-
562
- = 1.4.17 =
563
- Improved: Load more functionality.
564
- Fixed: Show thumbnails for Video posts.
565
- Fixed: Adding shortcode with classic editor.
566
-
567
- = 1.4.16 =
568
- Improved: Pagination logic.
569
- Fixed: Compatibility with PHP8.
570
-
571
- = 1.4.15 =
572
- Improved: Decreased load time on front end.
573
-
574
- = 1.4.14 =
575
- Fixed: Removing feed.
576
- Fixed: Deactivation after uninstall.
577
- Fixed: Duplicated images in filmstrip.
578
- Fixed: Load more.
579
-
580
- = 1.4.13 =
581
- Fixed: Preview in Elementor.
582
- Fixed: Issue when "Check for new posts every" option set to 0.
583
-
584
- = 1.4.12 =
585
- Fixed: Ordering for hashtag.
586
-
587
- = 1.4.11 =
588
- Fixed: Adding the Instagram Feed to the Elementor.
589
- Fixed: Feed preview.
590
- Fixed: Comments for feed.
591
-
592
- = 1.4.10 =
593
- Fixed: Open settings page after activation.
594
- Fixed: Load more functionality.
595
- Fixed: Feed does not work with hashtag for some cases.
596
- Fixed: Error after re-connecting a Business account.
597
-
598
- = 1.4.9 =
599
- Fixed: Filters logic.
600
- Fixed: Load more functionality.
601
- Fixed: Update user info on feed saving.
602
- Fixed: Hashtag removing functionality.
603
-
604
- = 1.4.8 =
605
- Fixed: JS error.
606
- Fixed: Broken images.
607
- Fixed: Uninstall functionality.
608
- Fixed: Requests limitation in API.
609
-
610
- = 1.4.7 =
611
- Fixed: Feed images view.
612
-
613
- == Changelog ==
614
- = 1.4.6 =
615
- Improved: Separate options for personal and business accounts.
616
- Improved: Increased loading time of feed.
617
- Fixed: Multiple accounts functionality.
618
-
619
- = 1.4.5 =
620
- Fixed: Missing images from post with multiple images.
621
- Fixed: Conflict with WP5.5.
622
- Fixed: Number of comments and likes.
623
- Fixed: Images ordering on Firefox.
624
-
625
- = 1.4.4 =
626
- Fixed: Decreased feed load time.
627
- Fixed: Business account.
628
-
629
- = 1.4.3 =
630
- Fixed: Getting User's metadata.
631
- Fixed: Reset access token.
632
- Fixed: Conditional filters.
633
-
634
- = 1.4.2 =
635
- Fixed: Feed Media Resolution.
636
- Fixed: Feed Header.
637
- Fixed: Show Follow on Instagram.
638
-
639
- = 1.4.1 =
640
- Fixed: Refresh a Long-Lived Token.
641
-
642
- = 1.4.0 =
643
- Changed: Using Instagram Basic Display API instead of Legacy API,
644
-
645
- = 1.3.26 =
646
- Fixed: JS error on Instagram feed front.
647
-
648
- = 1.3.25 =
649
- Fixed: Hashtag exclude.
650
- Fixed: Privacy policy text structure.
651
-
652
- = 1.3.24 =
653
- Removed: Banner to install Image optimizer.
654
-
655
- = 1.3.23 =
656
- Fixed: Minor bug.
657
-
658
- = 1.3.22 =
659
- Improved: Do not use Font Awesome.
660
- Fixed: Do not show username(no user) for hashtags.
661
-
662
- = 1.3.21 =
663
- Added: Ask a question button.
664
-
665
- = 1.3.20 =
666
- Fixed: Security issues
667
-
668
- = 1.3.18 =
669
- Fixed: Error from Instagram after connecting a Personal account.
670
- Fixed: Instagram Feed warning after deleting a feed.
671
- Fixed: Pagination problem on hashtag feeds..
672
-
673
- = 1.3.17 =
674
- Added: Feed edit links for Elementor widget.
675
-
676
- = 1.3.16 =
677
- Fixed: First time authorization.
678
-
679
- = 1.3.15 =
680
- Added: Banner to install 10Web manager.
681
-
682
- = 1.3.14 =
683
- New: Added contributor role in the option 'Minimal role to add and manage Feeds or Themes'.
684
- Fixed: Conditional filters for hashtags.
685
-
686
- = 1.3.13 =
687
- New: Option to get hashtag top media
688
- Improved: Notices during Facebook Log in
689
- Fixed: Occasional JS error on front end
690
-
691
- = 1.3.12 =
692
- Fixed: Conflict with Gutenberg.
693
-
694
- = 1.3.11 =
695
- New: Create hashtag feeds for business profiles using Instagram Graph API
696
-
697
- = 1.3.10 =
698
- Fixed: Gutenberg compatibility
699
- Fixed: Duplicate media when several filters are applied (Premium)
700
-
701
- = 1.3.9 =
702
- Fixed: Lib conflict with photo-gallery
703
-
704
- = 1.3.8 =
705
- Changed: Links to docs
706
- Fixed: Compatibility with Elementor
707
- Added: wdi_display_shortcode_button filter
708
-
709
- = 1.3.7 =
710
- New: Option to disable loading of Font-Awesome by the plugin
711
- Fixed: PHP notice in feed preview
712
- Fixed: Issue with admin styles for notices
713
-
714
- = 1.3.6 =
715
- Changed: Instagram Feed by 10Web
716
- Fixed: Minor bugs when saving feed and opening lightbox
717
-
718
- = 1.3.5 =
719
- Changed: Deactivation popup
720
-
721
- = 1.3.4 =
722
- New: Display website link in header along with bio
723
-
724
- = 1.3.3 =
725
- New: Cache debugging tools
726
- New: WD library updated
727
- New: GDPR compliance help
728
-
729
- = 1.3.2 =
730
- New: Signing up with multiple accounts
731
- Fixed: Settings page layout when language is not English
732
-
733
- = 1.3.1 =
734
- Fixed: Security issues. Reported by Karan Saini https://www.karansaini.com/
735
-
736
- = 1.3.0 =
737
- New: Caching of Instagram data. API rate limits do not constrain feed loading anymore.
738
- New: Compatibility with Gutenberg editor.
739
- Improved: It is possible now to manually edit access token.
740
- Changed: Plugin will output a warning when an incompatible version of Font-Awesome is loaded (SVG generated by JS)
741
- Fixed: Error when PHP filter extension is not enabled.
742
- Fixed: PHP warning in feed editor page appearing sometimes.
743
-
744
- = 1.2.19 =
745
- Fixed: Loading more images
746
-
747
- = 1.2.18 =
748
- Important: Instagram shut down its API partially without any warning. See [changelog](https://www.instagram.com/developer/endpoints/media/). It is not allowed anymore to display photos from other Instagram accounts which are not your own.
749
- Sorry.
750
-
751
- = 1.2.17 =
752
- Fixed: Video play issue on mac safari
753
- Changed: Uninstall moved to settings page
754
-
755
- = 1.2.16 =
756
- New: Instagram slideshow is supported in popup
757
- New: UX of feeds and themes admin screen, it is now similar to posts list screen
758
- New: Inline actions for feeds and themes in admin list view
759
- Improved: Theme styles are generated as CSS files, not inline styles. Faster page loading and better styles caching
760
- Improved: Popup is faster now and less data is being sent via AJAX
761
-
762
- = 1.2.15 =
763
- Added: "How to publish feed" tab in feeds editor screen
764
- Added: Closeable metaboxes in feeds editor screen
765
- Added: Feed preview button in feeds editor screen
766
- Changed: Save, apply and cancel buttons in feed and theme editor screens
767
- Changed: Feed and theme title input design
768
- Fixed: Minor bugs and conflicts with some themes
769
- Improved: Shortcode popup design
770
- Removed: Update submenu (Premium)
771
-
772
- = 1.2.14 =
773
- Fixed: Conflict with Page Builder by SiteOrigin
774
-
775
- = 1.2.13 =
776
- Fixed: Conflict with Divi
777
-
778
- = 1.2.12 =
779
- New: Customize feed media resolution. Choose between optimal or custom resolutions, fast loading and higher quality.
780
- Improved: Redesigned feed and theme editor screens.
781
- Improved: More user-friendly names and descriptions of feed settings.
782
- Improved: UX when access token is expired or have not been obtained yet.
783
- Improved: UX when there are JS errors on front-end.
784
- Fixed: Minor: do not include custom scroll bar JS if feed does not have popup.
785
-
786
- = 1.2.11 =
787
- Changed: Scripts and styles are minified by default
788
- Changed: Font-Awesome has been updated to version 4.7.0 and loaded from CDN
789
- Changed: Pagination buttons are smaller now in default theme
790
- Changed: Deactivation popup.
791
-
792
- = 1.2.10 =
793
- Fixed: CSS XSS vulnerability in lightbox
794
-
795
- = 1.2.9 =
796
- Changed: Web-Dorado links
797
-
798
- = 1.2.8 =
799
- Changed: Allow more users and hashtags in feed settings
800
-
801
- = 1.2.7 =
802
- Changed: Show notification to install Backup WD plugin only on plugin pages
803
-
804
- = 1.2.6 =
805
- Change: Introduction of Backup WD plugin
806
-
807
- = 1.2.5 =
808
- Change: "create_function" is not used anymore
809
-
810
- = 1.2.4 =
811
- Fixed: 10Web Social Photo Feed for Instagram compatibility issue with Better WordPress Minify plugin, thanks to @amityweb for bug report
812
-
813
- = 1.2.3 =
814
- Change: WD library updated to version 1.0.11
815
- Fixed: Error message when editing feed and token is expired
816
-
817
- = 1.2.2 =
818
- New: Redirection to custom URL
819
-
820
- = 1.2.1 =
821
- New: Option to disable loading of new images in feed
822
-
823
- = 1.2.0 =
824
- New: Default feed
825
- Fixed: Infinite scroll triggering (PRO)
826
- Fixed: "No media in feed" message on mobile masonry feed
827
- Fixed: Minor style conflicts with some themes
828
-
829
- = 1.1.30 =
830
- Changed: Frontend styles optimized, loads faster now
831
-
832
- = 1.1.29 =
833
- Fixed: Display only published feeds in feeds selector popup for shortcode
834
- Changed: UX improvement - no error message when user first inserts a widget then creates feeds
835
-
836
- = 1.1.28 =
837
- Fixed: Conflict with some themes
838
-
839
- = 1.1.27 =
840
- Fixed: Overriding window.onload function
841
- Changed: Some strings on frontend are translatable now
842
-
843
- = 1.1.26 =
844
- Fixed: Conflict with Beaver Builder
845
- Fixed: Frontend error messages in old Chrome and Safari browsers
846
- Changed: Translations hosted on WordPress.org
847
-
848
- = 1.1.25 =
849
- New: UX improvements: when authorizing and editing feeds
850
- Changed: JavaScript error notices on frontend
851
- Fixed: Updates page restored (PRO)
852
- Fixed: Deactivation popup in uninstall page (PRO)
853
- Fixed: Subscribe after uninstall
854
-
855
- = 1.1.24 =
856
- Added: Overview page
857
- Changed: Deactivation
858
-
859
- = 1.1.23 =
860
- Fixed: cropping of "landscape" images in thumbnails layout
861
-
862
- = 1.1.22 =
863
- New: message displayed on frontend if feed has no media
864
- Fixed: JS errors for media with Instagram's new "Slideshow" feature. This feature is not supported by Instagram's API yet.
865
- Changed: Errors by plugin and Instagram API are alerted in frontend only for admins, otherwise output the message to the Web Console
866
- Changed: Custom attribute "wdi_media_user" added to media containers in frontend. Useful for adding different event listeners, e.g. custom redirects for every user's media.
867
- Changed: Minor style conflicts fixed
868
-
869
- = 1.1.21 =
870
- New: Three new plugins added to featured plugins list: Ad Manager WD, Youtube WD and Staff Team WD
871
- Fixed: Colors and opacities of share buttons in lightbox (PRO)
872
-
873
- = 1.1.20 =
874
- New: Instagram feed displayed in AJAX-loaded content. AJAX request callback needs to call wp_footer() in the end.
875
-
876
- = 1.1.19 =
877
- Fixed: Strange bug in Instagram API when user feed pagination is null, causing JS errors in frontend
878
-
879
- = 1.1.18 =
880
- Fixed: Frontend filter colors (PRO)
881
- Changed: Featured plugins, brand new Mailchimp Forms WD plugin added
882
-
883
- = 1.1.17 =
884
- New: Option in feed settings to show small size images and low-bandwidth videos when viewed in mobile devices
885
- Fixed: Escaping in custom JS
886
- Change: WP 4.7 compatibility - language of frontend content in AJAX response
887
-
888
- = 1.1.16 =
889
- Fixed: Unicode "paragraph separator" symbol in media caption crashes lightbox
890
- Fixed: Javascript error in admin feed page and styling issue in lightbox because of some non-standard themes
891
-
892
- = 1.1.15 =
893
- New: Show hashtag media number in header
894
- Fixed: Scripts dependency on underscore.js
895
- Fixed: Compatibility issues with Yoast SEO
896
-
897
- = 1.1.14 =
898
- Fixed: Single user bio not shown
899
- Changed: Plugin logo
900
- Changed: Featured plugins logos
901
-
902
- = 1.1.13 =
903
- Fixed: Changes in database after plugin version update via FTP or AJAX requests with silent activation
904
-
905
- = 1.1.12 =
906
- New: Feed based on liked media (Pro)
907
- Fixed: Hidden media in last page
908
- Fixed: Minor issues
909
-
910
- = 1.1.11 =
911
- Added: Setting to show media descriptions in widget mode (PRO)
912
- Fixed: Untranslatable strings in widget editor
913
- Change: Featured plugins list
914
-
915
- = 1.1.10 =
916
- Added: New text in uninstall page
917
- Fixed: Video not centering issue on blogstyle
918
- Added: Swedish translations
919
-
920
- = 1.1.9 =
921
- New: Option to set minimal user role for adding and managing feeds and themes
922
- Fixed: Masonry feed thumbnails overlay opacity (Pro)
923
-
924
- = 1.1.8 =
925
- Changed: Font-Awesome updated to version 4.6.3
926
-
927
- = 1.1.7 =
928
- New: Featured themes admin page
929
- Fixed: Javascript error in hashtag feed
930
-
931
- = 1.1.6 =
932
- Change: Added compatibility with "All in one SEO pack" and other plugins running shortcodes in page head
933
-
934
- = 1.1.5 =
935
- Fixed: Javascript error on Firefox and Safari
936
-
937
- = 1.1.4 =
938
- Fixed: Error handling in case of wrong access_token
939
- Fixed: Image description not opening after pagination (Pro)
940
- Fixed: Do not show load more button if feed media are finished
941
- Fixed: Infinite scroll triggering bug (Pro)
942
-
943
- = 1.1.3 =
944
- New: French translation (Thanks to Guillaume Barjou)
945
- New: English US and UK translation files. Edit them to change default strings
946
- Fixed: Image sizes and overwflows in thumbnails layout
947
- Fixed: Lightbox filmstrip thumb styles (Pro)
948
-
949
-
950
- = 1.1.2 =
951
- Fixed: Bug when saving theme data to some MySQL 5.6 databases
952
- Changed: Pagination of hashtag feeds restored
953
- Changed: Check and get user id on frontend if empty for some unknown reason
954
-
955
- = 1.1.1 =
956
- Fixed: Bug when duplicating feeds
957
-
958
- = 1.1.0 =
959
- **IMPORTANT: Instagram changed the API. You need to get a new access token by using "Sign in with Instagram" button on the Settings page in order to keep your 10Web Social Photo Feed for Instagram plugin functioning after June 1.**
960
- new: Instagram new API
961
- new: Spanish translation (Thanks to Alexandro Lacadena Gomez)
962
-
963
- = 1.0.10 =
964
- Temporarily disable pagination in hashtag based feeds
965
- Changed: Russian Translations ( Thanks to Alex Petrin )
966
-
967
- = 1.0.9 =
968
- Added: Option for displaying image loading buttons in widgets
969
- Added: Permission for authors displaying instagram feeds on posts
970
-
971
- = 1.0.8 =
972
- Fixed: Infinite Scroll bug
973
- Changed: Show videos play button when redirect is enabled
974
-
975
- = 1.0.7 =
976
- ADD: Image Hover Effects (Pro)
977
-
978
- = 1.0.6 =
979
- New: Conditional Filters (Pro)
980
- New: Option for displaying username in masonry/thumbnails view (Pro)
981
- Fixed: Minor bugs
982
- New: Russian translation (Thanks to Ruslan Tertyshny).
983
-
984
- = 1.0.5 =
985
- New: New year promo
986
-
987
- = 1.0.4 =
988
- Fixed: Bug in layout
989
-
990
- = 1.0.3 =
991
- Fixed: PHP function in feeds list
992
-
993
- = 1.0.2 =
994
- Fixed: PHP error after plugin update
995
-
996
- = 1.0.1 =
997
- Fixed: PHP 5.3 compatibility
998
- Fixed: Video redirect bug
999
- Changed: User info styles
1000
-
1001
- = 1.0.0 =
1002
- Initial version
1
+ === 10WebSocial ===
2
  Contributors: webdorado,10web,progmastery
3
+ Requires at least: 4.6
 
4
  Requires PHP: 5.2
5
  Tested up to: 5.8
6
+ Stable tag: 1.4.32
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
+ 10Web
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
wd-instagram-feed.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: 10Web Social Photo Feed
4
  * Plugin URI: https://10web.io/plugins/wordpress-instagram-feed/?utm_source=instagram_feed&utm_medium=free_plugin
5
  * Description: 10Web Social Photo Feed is a user-friendly tool for displaying user or hashtag-based feeds on your website. You can create feeds with one of the available layouts. It allows displaying image metadata, open up images in lightbox, download them and even share in social networking websites.
6
- * Version: 1.4.31
7
  * Author: 10Web
8
  * Author URI: https://10Web.io/plugins/?utm_source=instagram_feed&utm_medium=free_plugin
9
  * License: GPLv2 or later
3
  * Plugin Name: 10Web Social Photo Feed
4
  * Plugin URI: https://10web.io/plugins/wordpress-instagram-feed/?utm_source=instagram_feed&utm_medium=free_plugin
5
  * Description: 10Web Social Photo Feed is a user-friendly tool for displaying user or hashtag-based feeds on your website. You can create feeds with one of the available layouts. It allows displaying image metadata, open up images in lightbox, download them and even share in social networking websites.
6
+ * Version: 1.4.32
7
  * Author: 10Web
8
  * Author URI: https://10Web.io/plugins/?utm_source=instagram_feed&utm_medium=free_plugin
9
  * License: GPLv2 or later
wd/assets/css/overview.css CHANGED
@@ -267,7 +267,6 @@ img.plugin_logo {
267
  .plugin_features .plugin_feature{
268
  width: 31%;
269
  margin: 0 1% 20px;
270
- /*float: left;*/
271
  display: inline-block;
272
  }
273
 
267
  .plugin_features .plugin_feature{
268
  width: 31%;
269
  margin: 0 1% 20px;
 
270
  display: inline-block;
271
  }
272
 
wd/includes/api.php CHANGED
@@ -32,6 +32,8 @@
32
 
33
  public function get_remote_data( $id ) {
34
  $remote_data_path = TEN_WEB_LIB_API_PLUGIN_DATA_PATH . '/' . $this->userhash;
 
 
35
  $request = wp_remote_get( ( str_replace( '_id_', $id, $remote_data_path ) ) );
36
 
37
  if ( !is_wp_error($request) || wp_remote_retrieve_response_code($request) === 200 ) {
@@ -45,6 +47,7 @@
45
  $wd_options = $this->config;
46
  $userhash = 'nohash';
47
  if ( file_exists( $wd_options->plugin_dir . '/.keep') && is_readable( $wd_options->plugin_dir . '/.keep' ) ) {
 
48
  $f = fopen( $wd_options->plugin_dir . '/.keep', 'r' );
49
  $userhash = fgets( $f );
50
  fclose( $f );
@@ -53,7 +56,9 @@
53
  }
54
 
55
  public function get_hash(){
56
- $response = wp_remote_get("https://api.web-dorado.com/hash/" . $_SERVER['REMOTE_ADDR'] . "/" . $_SERVER['HTTP_HOST']);
 
 
57
 
58
  $response_body = ( !is_wp_error($response) && isset($response["body"])) ? json_decode($response["body"], true) : null;
59
 
32
 
33
  public function get_remote_data( $id ) {
34
  $remote_data_path = TEN_WEB_LIB_API_PLUGIN_DATA_PATH . '/' . $this->userhash;
35
+ //wp_remote_get is a native WordPress function
36
+ /* phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.wp_remote_get_wp_remote_get */
37
  $request = wp_remote_get( ( str_replace( '_id_', $id, $remote_data_path ) ) );
38
 
39
  if ( !is_wp_error($request) || wp_remote_retrieve_response_code($request) === 200 ) {
47
  $wd_options = $this->config;
48
  $userhash = 'nohash';
49
  if ( file_exists( $wd_options->plugin_dir . '/.keep') && is_readable( $wd_options->plugin_dir . '/.keep' ) ) {
50
+ //phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_read_fopen
51
  $f = fopen( $wd_options->plugin_dir . '/.keep', 'r' );
52
  $userhash = fgets( $f );
53
  fclose( $f );
56
  }
57
 
58
  public function get_hash(){
59
+ //wp_remote_get is a native WordPress function
60
+ /* phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.wp_remote_get_wp_remote_get, WordPressVIPMinimum.Variables.ServerVariables.UserControlledHeaders, WordPress.Security.ValidatedSanitizedInput.InputNotValidated, WordPressVIPMinimum.Variables.RestrictedVariables.cache_constraints___SERVER__REMOTE_ADDR__, WordPress.Security.ValidatedSanitizedInput.InputNotValidated */
61
+ $response = wp_remote_get("https://api.web-dorado.com/hash/" . sanitize_text_field($_SERVER['REMOTE_ADDR']) . "/" . sanitize_text_field($_SERVER['HTTP_HOST']));
62
 
63
  $response_body = ( !is_wp_error($response) && isset($response["body"])) ? json_decode($response["body"], true) : null;
64
 
wd/includes/deactivate.php CHANGED
@@ -70,7 +70,7 @@ class TenWebLibDeactivate
70
  ?>
71
  <script>
72
  jQuery(document).ready(function () {
73
- tenwebReady("<?php echo $wd_options->prefix; ?>");
74
  });
75
  </script>
76
  <?php
@@ -116,7 +116,6 @@ class TenWebLibDeactivate
116
  if ( !empty($submit_and_deactivate) ) {
117
 
118
  if ( $submit_and_deactivate == 2 || $submit_and_deactivate == 3 ) {
119
- //$api = new TenWebLibApi( $wd_options );
120
 
121
  $data = array();
122
 
@@ -131,10 +130,10 @@ class TenWebLibDeactivate
131
  $user_last_name = get_user_meta($admin_data->ID, "last_name", true);
132
 
133
  $data["name"] = $user_first_name || $user_last_name ? $user_first_name . " " . $user_last_name : $admin_data->data->user_login;
134
-
135
  $response = wp_remote_post(TEN_WEB_LIB_DEACTIVATION_URL, array(
136
  'method' => 'POST',
137
- 'timeout' => 45,
138
  'redirection' => 5,
139
  'httpversion' => '1.0',
140
  'blocking' => true,
@@ -145,9 +144,6 @@ class TenWebLibDeactivate
145
  );
146
 
147
  $response_body = (!is_wp_error($response) && isset($response["body"])) ? json_decode($response["body"], true) : null;
148
- /*if (is_array($response_body) && $response_body["body"]["msg"] == "Access") {
149
-
150
- }*/
151
 
152
  }
153
  if ( $submit_and_deactivate == 2 || $submit_and_deactivate == 1 ) {
@@ -160,7 +156,7 @@ class TenWebLibDeactivate
160
  ),
161
  admin_url('plugins.php')
162
  );
163
- echo '<script>window.location.href="' . $deactivate_url . '";</script>';
164
  }
165
 
166
  }
70
  ?>
71
  <script>
72
  jQuery(document).ready(function () {
73
+ tenwebReady("<?php echo esc_js($wd_options->prefix); ?>");
74
  });
75
  </script>
76
  <?php
116
  if ( !empty($submit_and_deactivate) ) {
117
 
118
  if ( $submit_and_deactivate == 2 || $submit_and_deactivate == 3 ) {
 
119
 
120
  $data = array();
121
 
130
  $user_last_name = get_user_meta($admin_data->ID, "last_name", true);
131
 
132
  $data["name"] = $user_first_name || $user_last_name ? $user_first_name . " " . $user_last_name : $admin_data->data->user_login;
133
+ //If the internet connection is poor, the standard 5 seconds will not be enough
134
  $response = wp_remote_post(TEN_WEB_LIB_DEACTIVATION_URL, array(
135
  'method' => 'POST',
136
+ 'timeout' => 45,//phpcs:ignore WordPressVIPMinimum.Performance.RemoteRequestTimeout.timeout_timeout
137
  'redirection' => 5,
138
  'httpversion' => '1.0',
139
  'blocking' => true,
144
  );
145
 
146
  $response_body = (!is_wp_error($response) && isset($response["body"])) ? json_decode($response["body"], true) : null;
 
 
 
147
 
148
  }
149
  if ( $submit_and_deactivate == 2 || $submit_and_deactivate == 1 ) {
156
  ),
157
  admin_url('plugins.php')
158
  );
159
+ echo '<script>window.location.href="' . esc_url($deactivate_url) . '";</script>';
160
  }
161
 
162
  }
wd/includes/notices.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- if ( !defined( 'ABSPATH' ) ) {
3
  exit;
4
  }
5
 
@@ -23,7 +23,7 @@ class TenWebLibNotices {
23
 
24
  // Checks to ensure notices aren't disabled and the user has the correct permissions.
25
  public function wd_admin_notice() {
26
- $wd_options = $this->config;
27
  $settings = get_option($wd_options->prefix . '_admin_notice');
28
  if ( !isset( $settings['disable_admin_notices'] ) || ( isset( $settings['disable_admin_notices'] ) && $settings['disable_admin_notices'] == 0 ) ) {
29
  if ( current_user_can( 'manage_options' ) ) {
@@ -35,7 +35,7 @@ class TenWebLibNotices {
35
 
36
  // Primary notice function that can be called from an outside function sending necessary variables
37
  public function admin_notice( $admin_notices ) {
38
- $wd_options = $this->config;
39
  // Check options
40
  if ( !$this->wd_admin_notice() ) {
41
  return false;
@@ -59,17 +59,17 @@ class TenWebLibNotices {
59
  // Get the current date then set start date to either passed value or current date value and add interval
60
  $current_date = current_time( "n/j/Y" );
61
  $start = ( isset( $admin_notices[$slug]['start'] ) ? $admin_notices[$slug]['start'] : $current_date );
62
- $start = date( "n/j/Y", strtotime( $start ) );
63
  $date_array = explode( '/', $start );
64
  $interval = ( isset( $admin_notices[$slug]['int'] ) ? $admin_notices[$slug]['int'] : 0 );
65
 
66
  $date_array[1] += $interval;
67
- $start = date( "n/j/Y", mktime( 0, 0, 0, $date_array[0], $date_array[1], $date_array[2] ) );
68
 
69
  // This is the main notices storage option
70
  $admin_notices_option = get_option( $wd_options->prefix . '_admin_notice', array() );
71
  // Check if the message is already stored and if so just grab the key otherwise store the message and its associated date information
72
- if ( !array_key_exists( $slug, $admin_notices_option ) ) {
73
  $admin_notices_option[$slug]['start'] = $start;
74
  $admin_notices_option[$slug]['int'] = $interval;
75
  update_option( $wd_options->prefix . '_admin_notice', $admin_notices_option );
@@ -86,27 +86,27 @@ class TenWebLibNotices {
86
  $output_css = false;
87
 
88
  // Ensure the notice hasn't been hidden and that the current date is after the start date
89
- if ( $admin_display_check == 0 && strtotime($admin_display_start) <= strtotime($current_date ) ) {
90
 
91
  // Get remaining query string
92
- $query_str = ( isset( $admin_notices[$slug]['later_link'] ) ? $admin_notices[$slug]['later_link'] : esc_url(add_query_arg( $wd_options->prefix . '_admin_notice_ignore', $slug ) ) );
93
- if ( strpos($slug, 'promo' ) === FALSE ) {
 
94
  // Admin notice display output
95
  echo '<div class="update-nag wd-admin-notice">
96
- <div class="wd-notice-logo" style="background-image: url(' . $wd_options->wd_url_img . '/' . $wd_options->prefix . '_main_plugin.png);"></div>
97
- <p class="wd-notice-title">' . $admin_display_title . '</p>
98
- <p class="wd-notice-body">' . $admin_display_msg . '</p>
99
- <ul class="wd-notice-body wd-blue">' . $admin_display_link . '</ul>
100
- <a href="' . $query_str . '" class="dashicons dashicons-dismiss"></a>
101
  </div>';
102
- }
103
- else {
104
  echo '<div class="admin-notice-promo">';
105
- echo $admin_display_msg;
106
  echo '<ul class="notice-body-promo blue">
107
- ' . $admin_display_link . '
108
  </ul>';
109
- echo '<a href="' . $query_str . '" class="dashicons dashicons-dismiss close-promo"></a>';
110
  echo '</div>';
111
  }
112
  $this->notice_spam += 1;
@@ -129,72 +129,78 @@ class TenWebLibNotices {
129
 
130
  // Ignore function that gets ran at admin init to ensure any messages that were dismissed get marked
131
  public function admin_notice_ignore() {
132
- $wd_options = $this->config;
133
  // If user clicks to ignore the notice, update the option to not show it again
134
- if ( isset( $_GET[$wd_options->prefix . '_admin_notice_ignore'] ) ) {
135
- $admin_notices_option = get_option( $wd_options->prefix . '_admin_notice', array() );
136
- $admin_notice_ignore = sanitize_text_field($_GET[$wd_options->prefix . '_admin_notice_ignore']);
137
- $admin_notices_option[$admin_notice_ignore]['dismissed'] = 1;
138
- update_option( $wd_options->prefix . '_admin_notice', $admin_notices_option );
139
- $query_str = remove_query_arg( $wd_options->prefix . '_admin_notice_ignore' );
140
- wp_redirect( $query_str );
141
- exit;
 
 
142
  }
143
  }
144
 
145
  // Temp Ignore function that gets ran at admin init to ensure any messages that were temp dismissed get their start date changed
146
  public function admin_notice_temp_ignore() {
147
- $wd_options = $this->config;
148
  // If user clicks to temp ignore the notice, update the option to change the start date - default interval of 14 days
149
- if ( isset( $_GET[$wd_options->prefix . '_admin_notice_temp_ignore'] ) ) {
150
- $admin_notices_option = get_option( $wd_options->prefix . '_admin_notice', array() );
151
- $current_date = current_time( "n/j/Y" );
152
- $date_array = explode( '/', $current_date );
153
- $interval = (isset($_GET['wd_int']) ? intval($_GET['wd_int']) : 14);
154
- $date_array[1] += $interval;
155
- $new_start = date( "n/j/Y", mktime( 0, 0, 0, $date_array[0], $date_array[1], $date_array[2] ) );
156
-
157
- $admin_notice_temp_ignore = isset($_GET[$wd_options->prefix . '_admin_notice_temp_ignore']) ? sanitize_text_field($_GET[$wd_options->prefix . '_admin_notice_temp_ignore']) : '';
158
- if( $admin_notice_temp_ignore != '' ) {
159
- $admin_notices_option[$admin_notice_temp_ignore]['start'] = $new_start;
160
- $admin_notices_option[$admin_notice_temp_ignore]['dismissed'] = 0;
161
- update_option($wd_options->prefix . '_admin_notice', $admin_notices_option);
162
- $query_str = remove_query_arg(array( $wd_options->prefix . '_admin_notice_temp_ignore', 'wd_int' ));
163
- wp_redirect($query_str);
 
 
 
 
164
  }
165
- exit;
166
  }
167
  }
168
 
169
- public function admin_notice_pages($pages) {
170
- $wd_options = $this->config;
171
- foreach ( $pages as $key => $page ) {
172
- if (is_array($page)) {
173
- if ( isset( $_GET['page'] ) && sanitize_text_field($_GET['page']) == $page[0] && isset($_GET['tab']) && sanitize_text_field($_GET['tab']) == $page[1] ) {
174
- return true;
175
- }
176
- }
177
- else {
178
- if ( $page == 'all' ) {
179
- return true;
180
- }
181
- if ( get_current_screen()->id === $page ) {
182
- return true;
183
- }
184
- if ( isset($_GET['page']) && sanitize_text_field($_GET['page']) == $page ) {
185
- return true;
 
186
  }
 
187
  }
188
- return false;
189
  }
190
  }
191
 
192
  // Required fields check
193
  public function required_fields( $fields ) {
194
- if ( !isset( $fields['msg'] ) || ( isset($fields['msg'] ) && empty( $fields['msg'] ) ) ) {
195
  return true;
196
  }
197
- if ( !isset( $fields['title'] ) || ( isset( $fields['title'] ) && empty( $fields['title'] ) ) ) {
198
  return true;
199
  }
200
  return false;
@@ -206,20 +212,20 @@ class TenWebLibNotices {
206
  }
207
 
208
  public function wd_admin_notices() {
209
- $wd_options = $this->config;
210
- $two_week_review_ignore = add_query_arg( array( $wd_options->prefix . '_admin_notice_ignore' => 'two_week_review' ) );
211
- $two_week_review_temp = add_query_arg( array( $wd_options->prefix . '_admin_notice_temp_ignore' => 'two_week_review', 'int' => 14 ) );
212
- $promo_close = add_query_arg( array( $wd_options->prefix . '_admin_notice_ignore' => 'ecommerce_promo' ) );
213
 
214
  $notices['two_week_review'] = array(
215
- 'title' => __('Leave A Review?', $wd_options->prefix),
216
- 'msg' => sprintf(__('We hope you\'ve enjoyed using WordPress %s! Would you consider leaving us a review on WordPress.org?', $wd_options->prefix), $wd_options->plugin_title),
217
- 'link' => '<li><span class="dashicons dashicons-external"></span><a href="https://wordpress.org/support/plugin/' . $wd_options->plugin_wordpress_slug . '/reviews?filter=5&rate=5#new-post" target="_blank">' . __('Sure! I\'d love to!', $wd_options->prefix) . '</a></li>
218
- <li><span class="dashicons dashicons-smiley"></span><a href="' . $two_week_review_ignore . '"> ' . __('I\'ve already left a review', $wd_options->prefix) . '</a></li>
219
- <li><span class="dashicons dashicons-calendar-alt"></span><a href="' . $two_week_review_temp . '">' . __('Maybe Later', $wd_options->prefix) . '</a></li>
220
- <li><span class="dashicons dashicons-dismiss"></span><a href="' . $two_week_review_ignore . '">' . __('Never show again', $wd_options->prefix) . '</a></li>',
221
- 'later_link' => $two_week_review_temp,
222
- 'int' => 14
223
  );
224
 
225
  $this->admin_notice($notices);
1
  <?php
2
+ if (!defined('ABSPATH')) {
3
  exit;
4
  }
5
 
23
 
24
  // Checks to ensure notices aren't disabled and the user has the correct permissions.
25
  public function wd_admin_notice() {
26
+ $wd_options = $this->config;
27
  $settings = get_option($wd_options->prefix . '_admin_notice');
28
  if ( !isset( $settings['disable_admin_notices'] ) || ( isset( $settings['disable_admin_notices'] ) && $settings['disable_admin_notices'] == 0 ) ) {
29
  if ( current_user_can( 'manage_options' ) ) {
35
 
36
  // Primary notice function that can be called from an outside function sending necessary variables
37
  public function admin_notice( $admin_notices ) {
38
+ $wd_options = $this->config;
39
  // Check options
40
  if ( !$this->wd_admin_notice() ) {
41
  return false;
59
  // Get the current date then set start date to either passed value or current date value and add interval
60
  $current_date = current_time( "n/j/Y" );
61
  $start = ( isset( $admin_notices[$slug]['start'] ) ? $admin_notices[$slug]['start'] : $current_date );
62
+ $start = wp_date( "n/j/Y", strtotime( $start ) );
63
  $date_array = explode( '/', $start );
64
  $interval = ( isset( $admin_notices[$slug]['int'] ) ? $admin_notices[$slug]['int'] : 0 );
65
 
66
  $date_array[1] += $interval;
67
+ $start = wp_date( "n/j/Y", mktime( 0, 0, 0, $date_array[0], $date_array[1], $date_array[2] ) );
68
 
69
  // This is the main notices storage option
70
  $admin_notices_option = get_option( $wd_options->prefix . '_admin_notice', array() );
71
  // Check if the message is already stored and if so just grab the key otherwise store the message and its associated date information
72
+ if ( is_array( $admin_notices_option ) && !array_key_exists( $slug, $admin_notices_option ) ) {
73
  $admin_notices_option[$slug]['start'] = $start;
74
  $admin_notices_option[$slug]['int'] = $interval;
75
  update_option( $wd_options->prefix . '_admin_notice', $admin_notices_option );
86
  $output_css = false;
87
 
88
  // Ensure the notice hasn't been hidden and that the current date is after the start date
89
+ if ($admin_display_check == 0 && strtotime($admin_display_start) <= strtotime($current_date)) {
90
 
91
  // Get remaining query string
92
+
93
+ $query_str = (isset($admin_notices[$slug]['later_link']) ? $admin_notices[$slug]['later_link'] : add_query_arg($wd_options->prefix . '_admin_notice_ignore', $slug));
94
+ if (strpos($slug, 'promo') === FALSE) {
95
  // Admin notice display output
96
  echo '<div class="update-nag wd-admin-notice">
97
+ <div class="wd-notice-logo" style="background-image: url(' . esc_url($wd_options->wd_url_img . '/' . $wd_options->prefix . '_main_plugin.png') . ');"></div>
98
+ <p class="wd-notice-title">' . esc_html($admin_display_title) . '</p>
99
+ <p class="wd-notice-body">' . esc_html($admin_display_msg) . '</p>
100
+ <ul class="wd-notice-body wd-blue">' . wp_kses($admin_display_link, array("li" => array(), "span" => array("class" => true), "a" => array("href" => true, "target" => true))) . '</ul>
101
+ <a href="' . esc_url(wp_nonce_url($query_str)) . '" class="dashicons dashicons-dismiss"></a>
102
  </div>';
103
+ } else {
 
104
  echo '<div class="admin-notice-promo">';
105
+ echo esc_html($admin_display_msg);
106
  echo '<ul class="notice-body-promo blue">
107
+ ' . wp_kses($admin_display_link, array("li" => array(), "span" => array("class" => true), "a" => array("href" => true, "target" => true))) . '
108
  </ul>';
109
+ echo '<a href="' . esc_url(wp_nonce_url($query_str)) . '" class="dashicons dashicons-dismiss close-promo"></a>';
110
  echo '</div>';
111
  }
112
  $this->notice_spam += 1;
129
 
130
  // Ignore function that gets ran at admin init to ensure any messages that were dismissed get marked
131
  public function admin_notice_ignore() {
132
+ $wd_options = $this->config;
133
  // If user clicks to ignore the notice, update the option to not show it again
134
+ if ( isset( $_GET['_wpnonce'] ) && wp_verify_nonce( sanitize_text_field( $_GET['_wpnonce'] ) ) ) {
135
+ if ( isset($_GET[$wd_options->prefix . '_admin_notice_ignore']) ) {
136
+ $admin_notices_option = get_option( $wd_options->prefix . '_admin_notice', array() );
137
+ $admin_notice_ignore = sanitize_text_field( $_GET[$wd_options->prefix . '_admin_notice_ignore'] );
138
+ $admin_notices_option[$admin_notice_ignore]['dismissed'] = 1;
139
+ update_option( $wd_options->prefix . '_admin_notice', $admin_notices_option );
140
+ $query_str = remove_query_arg ($wd_options->prefix . '_admin_notice_ignore' );
141
+ wp_redirect( $query_str );
142
+ exit;
143
+ }
144
  }
145
  }
146
 
147
  // Temp Ignore function that gets ran at admin init to ensure any messages that were temp dismissed get their start date changed
148
  public function admin_notice_temp_ignore() {
149
+ $wd_options = $this->config;
150
  // If user clicks to temp ignore the notice, update the option to change the start date - default interval of 14 days
151
+ if ( isset($_GET['_wpnonce']) && wp_verify_nonce(sanitize_text_field($_GET['_wpnonce'])) ) {
152
+ if ( isset($_GET[$wd_options->prefix . '_admin_notice_temp_ignore']) ) {
153
+ $admin_notices_option = get_option($wd_options->prefix . '_admin_notice', array());
154
+ $current_date = current_time("n/j/Y");
155
+ $date_array = explode('/', $current_date);
156
+ $interval = (isset($_GET['wd_int']) ? intval($_GET['wd_int']) : 14);
157
+ $date_array[1] += $interval;
158
+ $new_start = wp_date("n/j/Y", mktime(0, 0, 0, $date_array[0], $date_array[1], $date_array[2]));
159
+
160
+ $admin_notice_temp_ignore = isset($_GET[$wd_options->prefix . '_admin_notice_temp_ignore']) ? sanitize_text_field($_GET[$wd_options->prefix . '_admin_notice_temp_ignore']) : '';
161
+ if ( $admin_notice_temp_ignore != '' ) {
162
+ $admin_notices_option[$admin_notice_temp_ignore]['start'] = $new_start;
163
+ $admin_notices_option[$admin_notice_temp_ignore]['dismissed'] = 0;
164
+ update_option($wd_options->prefix . '_admin_notice', $admin_notices_option);
165
+ $query_str = remove_query_arg(array($wd_options->prefix . '_admin_notice_temp_ignore', 'wd_int'));
166
+ wp_redirect($query_str);
167
+ exit;
168
+ }
169
+ exit;
170
  }
 
171
  }
172
  }
173
 
174
+ public function admin_notice_pages( $pages ) {
175
+ $wd_options = $this->config;
176
+ if ( isset($_GET['_wpnonce']) && wp_verify_nonce( sanitize_text_field( $_GET['_wpnonce'] ) ) ) {
177
+ foreach ( $pages as $key => $page) {
178
+ if ( is_array($page) ) {
179
+ if ( isset( $_GET['page'] ) && sanitize_text_field( $_GET['page'] ) == $page[0] && isset( $_GET['tab'] ) && sanitize_text_field( $_GET['tab'] ) == $page[1] ) {
180
+ return true;
181
+ }
182
+ } else {
183
+ if ( $page == 'all' ) {
184
+ return true;
185
+ }
186
+ if ( get_current_screen()->id === $page ) {
187
+ return true;
188
+ }
189
+ if ( isset($_GET['page'] ) && sanitize_text_field( $_GET['page'] ) == $page) {
190
+ return true;
191
+ }
192
  }
193
+ return false;
194
  }
 
195
  }
196
  }
197
 
198
  // Required fields check
199
  public function required_fields( $fields ) {
200
+ if (!isset($fields['msg']) || (isset($fields['msg']) && empty($fields['msg']))) {
201
  return true;
202
  }
203
+ if (!isset($fields['title']) || (isset($fields['title']) && empty($fields['title']))) {
204
  return true;
205
  }
206
  return false;
212
  }
213
 
214
  public function wd_admin_notices() {
215
+ $wd_options = $this->config;
216
+ $two_week_review_ignore = add_query_arg(array($wd_options->prefix . '_admin_notice_ignore' => 'two_week_review'));
217
+ $two_week_review_temp = add_query_arg(array($wd_options->prefix . '_admin_notice_temp_ignore' => 'two_week_review', 'int' => 14));
218
+ $promo_close = add_query_arg(array($wd_options->prefix . '_admin_notice_ignore' => 'ecommerce_promo'));
219
 
220
  $notices['two_week_review'] = array(
221
+ 'title' => __('Leave A Review?', $wd_options->prefix),
222
+ 'msg' => sprintf(__('We hope you\'ve enjoyed using WordPress %s! Would you consider leaving us a review on WordPress.org?', $wd_options->prefix), $wd_options->plugin_title),
223
+ 'link' => '<li><span class="dashicons dashicons-external"></span><a href="' . wp_nonce_url('https://wordpress.org/support/plugin/' . $wd_options->plugin_wordpress_slug . '/reviews?filter=5&rate=5#new-post') . '" target="_blank">' . __('Sure! I\'d love to!', $wd_options->prefix) . '</a></li>
224
+ <li><span class="dashicons dashicons-smiley"></span><a href="' . wp_nonce_url($two_week_review_ignore) . '"> ' . __('I\'ve already left a review', $wd_options->prefix) . '</a></li>
225
+ <li><span class="dashicons dashicons-calendar-alt"></span><a href="' . wp_nonce_url($two_week_review_temp) . '">' . __('Maybe Later', $wd_options->prefix) . '</a></li>
226
+ <li><span class="dashicons dashicons-dismiss"></span><a href="' . wp_nonce_url($two_week_review_ignore) . '">' . __('Never show again', $wd_options->prefix) . '</a></li>',
227
+ 'later_link' => $two_week_review_temp,
228
+ 'int' => 14
229
  );
230
 
231
  $this->admin_notice($notices);
wd/includes/overview.php CHANGED
@@ -58,9 +58,13 @@
58
  // Private Methods //
59
  ////////////////////////////////////////////////////////////////////////////////////////
60
  private function remote_get($plugin_wp_slug){
 
 
61
  $request = wp_remote_get(" http://api.wordpress.org/plugins/info/1.0/" . $plugin_wp_slug);
62
  $data = array();
63
  if (!is_wp_error($request) || wp_remote_retrieve_response_code($request) === 200) {
 
 
64
  $body = unserialize($request['body']);
65
  $data["downloaded"] = $body->downloaded;
66
  $ratings = $body->ratings;
58
  // Private Methods //
59
  ////////////////////////////////////////////////////////////////////////////////////////
60
  private function remote_get($plugin_wp_slug){
61
+ //wp_remote_get is a native WordPress function
62
+ /* phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.wp_remote_get_wp_remote_get */
63
  $request = wp_remote_get(" http://api.wordpress.org/plugins/info/1.0/" . $plugin_wp_slug);
64
  $data = array();
65
  if (!is_wp_error($request) || wp_remote_retrieve_response_code($request) === 200) {
66
+ //this data comes from api.wordpress.org
67
+ //phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.serialize_unserialize
68
  $body = unserialize($request['body']);
69
  $data["downloaded"] = $body->downloaded;
70
  $ratings = $body->ratings;
wd/includes/subscribe.php CHANGED
@@ -51,64 +51,65 @@ class TenWebLibSubscribe
51
  public function after_subscribe()
52
  {
53
  $wd_options = $this->config;
54
- if (isset($_GET[$wd_options->prefix . "_sub_action"])) {
55
-
56
- if ( sanitize_text_field($_GET[$wd_options->prefix . "_sub_action"]) == "allow" ) {
57
- //$api = new TenWebLibApi($wd_options);
58
- $all_plugins = array();
59
- $plugins = get_plugins();
60
- foreach ($plugins as $slug => $data) {
61
- $plugin = array(
62
- "Name" => $data["Name"],
63
- "PluginURI" => $data["PluginURI"],
64
- "Author" => $data["Author"],
65
- "AuthorURI" => $data["AuthorURI"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  );
67
- $all_plugins[$slug] = $plugin;
68
- }
69
-
70
- $data = array();
71
- $data["wp_site_url"] = site_url();
72
-
73
- $admin_data = wp_get_current_user();
74
-
75
- $user_first_name = get_user_meta($admin_data->ID, "first_name", true);
76
- $user_last_name = get_user_meta($admin_data->ID, "last_name", true);
77
-
78
- $data["name"] = $user_first_name || $user_last_name ? $user_first_name . " " . $user_last_name : $admin_data->data->user_login;
79
 
80
- $data["email"] = $admin_data->data->user_email;
81
- $data["wp_version"] = get_bloginfo('version');
82
- $data["product_id"] = $wd_options->plugin_id;
83
- $data["all_plugins"] = wp_json_encode($all_plugins);
84
 
 
85
 
86
- $response = wp_remote_post(TEN_WEB_LIB_SUBSCRIBE_URL, array(
87
- 'method' => 'POST',
88
- 'timeout' => 45,
89
- 'redirection' => 5,
90
- 'httpversion' => '1.0',
91
- 'blocking' => true,
92
- 'headers' => array("Accept" => "application/x.10webcore.v1+json"),
93
- 'body' => $data,
94
- 'cookies' => array()
95
- )
96
- );
97
-
98
- $response_body = (!is_wp_error($response) && isset($response["body"])) ? json_decode($response["body"], true) : null;
99
-
100
- if (is_array($response_body) && $response_body["body"]["msg"] == "ok") {
101
 
102
  }
 
 
 
 
 
103
 
 
 
104
  }
105
- if (get_option($wd_options->prefix . "_subscribe_done") != 1) {
106
- update_option($wd_options->prefix . "_subscribe_done", 1);
107
- } else {
108
- add_option($wd_options->prefix . "_subscribe_done", "1", '', 'no');
109
- }
110
-
111
- wp_safe_redirect($wd_options->after_subscribe);
112
  }
113
 
114
  }
51
  public function after_subscribe()
52
  {
53
  $wd_options = $this->config;
54
+ if ( isset( $_GET['_wpnonce'] ) && wp_verify_nonce( sanitize_text_field( $_GET['_wpnonce'] ) ) ) {
55
+ if (isset($_GET[$wd_options->prefix . "_sub_action"])) {
56
+ if (sanitize_text_field($_GET[$wd_options->prefix . "_sub_action"]) == "allow") {
57
+ $all_plugins = array();
58
+ $plugins = get_plugins();
59
+ foreach ($plugins as $slug => $data) {
60
+ $plugin = array(
61
+ "Name" => $data["Name"],
62
+ "PluginURI" => $data["PluginURI"],
63
+ "Author" => $data["Author"],
64
+ "AuthorURI" => $data["AuthorURI"]
65
+ );
66
+ $all_plugins[$slug] = $plugin;
67
+ }
68
+
69
+ $data = array();
70
+ $data["wp_site_url"] = site_url();
71
+
72
+ $admin_data = wp_get_current_user();
73
+
74
+ $user_first_name = get_user_meta($admin_data->ID, "first_name", true);
75
+ $user_last_name = get_user_meta($admin_data->ID, "last_name", true);
76
+
77
+ $data["name"] = $user_first_name || $user_last_name ? $user_first_name . " " . $user_last_name : $admin_data->data->user_login;
78
+
79
+ $data["email"] = $admin_data->data->user_email;
80
+ $data["wp_version"] = get_bloginfo('version');
81
+ $data["product_id"] = $wd_options->plugin_id;
82
+ $data["all_plugins"] = wp_json_encode($all_plugins);
83
+
84
+ //If the internet connection is poor, the standard 5 seconds will not be enough
85
+ $response = wp_remote_post(TEN_WEB_LIB_SUBSCRIBE_URL, array(
86
+ 'method' => 'POST',
87
+ 'timeout' => 45,//phpcs:ignore WordPressVIPMinimum.Performance.RemoteRequestTimeout.timeout_timeout
88
+ 'redirection' => 5,
89
+ 'httpversion' => '1.0',
90
+ 'blocking' => true,
91
+ 'headers' => array("Accept" => "application/x.10webcore.v1+json"),
92
+ 'body' => $data,
93
+ 'cookies' => array()
94
+ )
95
  );
 
 
 
 
 
 
 
 
 
 
 
 
96
 
97
+ $response_body = (!is_wp_error($response) && isset($response["body"])) ? json_decode($response["body"], true) : null;
 
 
 
98
 
99
+ if (is_array($response_body) && $response_body["body"]["msg"] == "ok") {
100
 
101
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
 
103
  }
104
+ if (get_option($wd_options->prefix . "_subscribe_done") != 1) {
105
+ update_option($wd_options->prefix . "_subscribe_done", 1);
106
+ } else {
107
+ add_option($wd_options->prefix . "_subscribe_done", "1", '', 'no');
108
+ }
109
 
110
+ wp_safe_redirect($wd_options->after_subscribe);
111
+ exit;
112
  }
 
 
 
 
 
 
 
113
  }
114
 
115
  }
wd/templates/display_deactivation_popup.php CHANGED
@@ -1,28 +1,28 @@
1
- <div class="tenweb-opacity tenweb-<?php echo $wd_options->prefix; ?>-opacity"></div>
2
- <div class="tenweb-deactivate-popup tenweb-<?php echo $wd_options->prefix; ?>-deactivate-popup">
3
- <div class="tenweb-deactivate-popup-opacity tenweb-deactivate-popup-opacity-<?php echo $wd_options->prefix; ?>">
4
- <img src="<?php echo $wd_options->wd_url_img . '/spinner.gif'; ?>" class="tenweb-img-loader" >
5
  </div>
6
- <form method="post" id="<?php echo $wd_options->prefix; ?>_deactivate_form">
7
  <div class="tenweb-deactivate-popup-header">
8
- <?php _e( "Please let us know why you are deactivating. Your answer will help us to provide you support or sometimes offer discounts. (Optional)", $wd_options->prefix ); ?>:
9
  <span class="tenweb-deactivate-popup-close-btn"></span>
10
  </div>
11
 
12
  <div class="tenweb-deactivate-popup-body">
13
  <?php foreach( $deactivate_reasons as $deactivate_reason_slug => $deactivate_reason ) { ?>
14
- <div class="tenweb-<?php echo $wd_options->prefix; ?>-reasons">
15
- <input type="radio" value="<?php echo $deactivate_reason["id"];?>" id="<?php echo $wd_options->prefix . "-" .$deactivate_reason["id"]; ?>" name="<?php echo $wd_options->prefix; ?>_reasons" >
16
- <label for="<?php echo $wd_options->prefix . "-" . $deactivate_reason["id"]; ?>"><?php echo $deactivate_reason["text"];?></label>
17
  </div>
18
  <?php } ?>
19
- <div class="<?php echo $wd_options->prefix; ?>_additional_details_wrap"></div>
20
  </div>
21
  <div class="tenweb-btns">
22
- <a href="<?php echo $deactivate_url; ?>" data-val="1" class="button button-secondary button-close" id="tenweb-<?php echo $wd_options->prefix; ?>-deactivate"><?php _e( "Skip and Deactivate" , $wd_options->prefix ); ?></a>
23
- <a href="<?php echo $deactivate_url; ?>" data-val="2" class="button button-primary button-primary-disabled button-close tenweb-<?php echo $wd_options->prefix; ?>-deactivate" id="tenweb-<?php echo $wd_options->prefix; ?>-submit-and-deactivate"><?php _e( "Submit and Deactivate" , $wd_options->prefix ); ?></a>
24
  </div>
25
- <input type="hidden" name="<?php echo $wd_options->prefix . "_submit_and_deactivate"; ?>" value="" >
26
- <?php wp_nonce_field( $wd_options->prefix . '_save_form', $wd_options->prefix . '_save_form_fild'); ?>
27
  </form>
28
  </div>
1
+ <div class="<?php echo esc_attr('tenweb-opacity tenweb-' . $wd_options->prefix . '-opacity')?>"></div>
2
+ <div class="<?php echo esc_attr('tenweb-deactivate-popup tenweb-' . $wd_options->prefix . '-deactivate-popup')?>">
3
+ <div class="<?php echo esc_attr('tenweb-deactivate-popup-opacity tenweb-deactivate-popup-opacity-' . $wd_options->prefix) ?>">
4
+ <img src="<?php echo esc_url($wd_options->wd_url_img . '/spinner.gif'); ?>" class="tenweb-img-loader" >
5
  </div>
6
+ <form method="post" id="<?php echo esc_attr($wd_options->prefix . '_deactivate_form'); ?>">
7
  <div class="tenweb-deactivate-popup-header">
8
+ <?php _e( "Please let us know why you are deactivating. Your answer will help us to provide you support or sometimes offer discounts. (Optional)", esc_html($wd_options->prefix) ); ?>:
9
  <span class="tenweb-deactivate-popup-close-btn"></span>
10
  </div>
11
 
12
  <div class="tenweb-deactivate-popup-body">
13
  <?php foreach( $deactivate_reasons as $deactivate_reason_slug => $deactivate_reason ) { ?>
14
+ <div class="<?php echo esc_attr('tenweb-' . $wd_options->prefix . '-reasons'); ?>">
15
+ <input type="radio" value="<?php echo esc_attr($deactivate_reason["id"]);?>" id="<?php echo esc_attr($wd_options->prefix . "-" .$deactivate_reason["id"]); ?>" name="<?php echo esc_attr($wd_options->prefix . '_reasons'); ?>" >
16
+ <label for="<?php echo esc_attr($wd_options->prefix . "-" . $deactivate_reason["id"]); ?>"><?php echo esc_html($deactivate_reason["text"]);?></label>
17
  </div>
18
  <?php } ?>
19
+ <div class="<?php echo esc_attr($wd_options->prefix . '_additional_details_wrap'); ?>"></div>
20
  </div>
21
  <div class="tenweb-btns">
22
+ <a href="<?php echo esc_url($deactivate_url); ?>" data-val="1" class="button button-secondary button-close" id="<?php echo esc_attr('tenweb-' . $wd_options->prefix . '-deactivate'); ?>"><?php _e( "Skip and Deactivate" , esc_html($wd_options->prefix) ); ?></a>
23
+ <a href="<?php echo esc_url($deactivate_url); ?>" data-val="2" class=" <?php echo esc_attr('button button-primary button-primary-disabled button-close tenweb-' . $wd_options->prefix . '-deactivate') ; ?>" id="<?php echo esc_attr( 'tenweb-' . $wd_options->prefix . '-submit-and-deactivate') ; ?>"><?php _e( "Submit and Deactivate" , esc_html($wd_options->prefix) ); ?></a>
24
  </div>
25
+ <input type="hidden" name="<?php echo esc_attr($wd_options->prefix . "_submit_and_deactivate"); ?>" value="" >
26
+ <?php wp_nonce_field( esc_html($wd_options->prefix) . '_save_form', esc_html($wd_options->prefix . '_save_form_fild')); ?>
27
  </form>
28
  </div>
wd/templates/display_overview.php CHANGED
@@ -7,118 +7,118 @@
7
  </a>
8
  </div>
9
  <div class="tenweb_header_right tenweb_clear">
10
- <div class="inline-block header_text"><?php echo sprintf(__("Get Premium %s and Other Solutions Essential for Your WordPress Site.", $wd_options->prefix), $wd_options->plugin_title); ?>
11
  </div>
12
  <a href="https://my.10web.io/checkout/" target="_blank"
13
- class="button"><?php _e("Try Free", $wd_options->prefix); ?></a>
14
  </div>
15
  </div>
16
  <div class="tenweb_header_divider">
17
  </div>
18
  <div class="container container_bottom">
19
  <div class="plugin_info">
20
- <img src="<?php echo $wd_options->overview_welcome_image; ?>" class="plugin_logo">
21
- <h2><?php _e("Premium ", $wd_options->prefix); ?><?php echo $wd_options->plugin_title; ?></h2>
22
  <div class="and"> & </div>
23
  </div>
24
  <div class="plan_features tenweb_clear">
25
  <div class="plan_feature pro_plugins">
26
  <div class="logo"></div>
27
- <h3><?php _e("60+ pro plugins/Add-ons", $wd_options->prefix); ?></h3>
28
- <p><?php _e("Access 60+ plugins and add-ons, including key plugins, such as gallery, form, slider, social plugins and more.", $wd_options->prefix); ?></p>
29
  </div>
30
  <div class="plan_feature dashboard">
31
  <div class="logo"></div>
32
- <h3><?php _e("Unified dashboard", $wd_options->prefix); ?></h3>
33
- <p><?php _e("Manage your WordPress websites all in one place within a single dashboard. No need to switch between sites.", $wd_options->prefix); ?></p>
34
  </div>
35
  <div class="plan_feature pro_themes">
36
  <div class="logo"></div>
37
- <h3><?php _e("Premium WordPress themes", $wd_options->prefix); ?></h3>
38
- <p><?php _e("Professionally designed, responsive themes for your website. Build fully-functional, elegant websites effortlessly.", $wd_options->prefix); ?></p>
39
  </div>
40
  <?php if ($wd_options->plugin_wordpress_slug != "backup-wd") { ?>
41
  <div class="plan_feature backup">
42
  <div class="logo"></div>
43
- <h3><?php _e("Backup", $wd_options->prefix); ?></h3>
44
- <p><?php _e("10Web cloud storage space. Easily and securely backup your website in our storage.", $wd_options->prefix); ?></p>
45
  </div>
46
  <?php } ?>
47
  <?php if ($wd_options->plugin_wordpress_slug != "seo-by-10web") { ?>
48
  <div class="plan_feature seo">
49
  <div class="logo"></div>
50
- <h3><?php _e("SEO", $wd_options->prefix); ?></h3>
51
- <p><?php _e("Improve search rankings of your WordPress site with a comprehensive search engine optimization solution.", $wd_options->prefix); ?></p>
52
  </div>
53
  <?php } ?>
54
  <div class="plan_feature security">
55
  <div class="logo"></div>
56
- <h3><?php _e("Security", $wd_options->prefix); ?></h3>
57
- <p><?php _e("Protect your WordPress site from security issues and threats with a powerful security service coming soon to 10Web.", $wd_options->prefix); ?></p>
58
  </div>
59
  <?php if ($wd_options->plugin_wordpress_slug != "image-optimizer-wd") { ?>
60
  <div class="plan_feature image_optimizer">
61
  <div class="logo"></div>
62
- <h3><?php _e("Image optimization", $wd_options->prefix); ?></h3>
63
- <p><?php _e("Automatically resize and compress all images on your website to save space and improve site speed.", $wd_options->prefix); ?></p>
64
  </div>
65
  <?php } ?>
66
  <div class="plan_feature hosting">
67
  <div class="logo"></div>
68
- <h3><?php _e("Hosting", $wd_options->prefix); ?></h3>
69
- <p><?php _e("We’ll soon be offering affordable hosting solution with WordPress-friendly features and great customer support.", $wd_options->prefix); ?></p>
70
  </div>
71
  </div>
72
  <a href="https://my.10web.io/checkout/" target="_blank"
73
- class="button"><?php _e("Get free for 14 days", $wd_options->prefix); ?></a>
74
  <div><a href="https://10web.io/" target="_blank"
75
- class="more white"><?php _e("Learn More", $wd_options->prefix); ?></a></div>
76
  </div>
77
  </div>
78
  <?php if (count($wd_options->plugin_features)) { ?>
79
  <div class="tenweb_plugin_features">
80
  <div class="container">
81
- <h2><?php _e("Premium ", $wd_options->prefix); ?><?php echo $wd_options->plugin_title; ?><?php _e(" features you get!", $wd_options->prefix); ?></h2>
82
  <div class="plugin_features tenweb_clear">
83
  <?php foreach ($wd_options->plugin_features as $features) { ?>
84
  <div class="plugin_feature">
85
  <div class="plugin_feature_logo">
86
- <img src="<?php echo $features['logo']; ?>">
87
  </div>
88
- <h3><?php echo $features['title']; ?></h3>
89
- <p><?php echo $features['description']; ?></p>
90
  </div>
91
  <?php } ?>
92
  </div>
93
  <div class="and circle"> & </div>
94
- <h3 class="more_features"><?php _e("More great features of the plugin", $wd_options->prefix); ?></h3>
95
- <a href="<?php echo $wd_options->plugin_wd_url; ?>" target="_blank"
96
- class="more blue"><?php _e("Learn More", $wd_options->prefix); ?></a>
97
  </div>
98
  </div>
99
  <?php }
100
  if(trim($wd_options->plugin_wd_demo_link) != "" || trim($wd_options->plugin_wd_docs_link) != ""){ ?>
101
  <div class="tenweb_how_it_works">
102
  <div class="container">
103
- <h2><?php _e("Checkout how it works", $wd_options->prefix); ?></h2>
104
  <?php
105
  if(trim($wd_options->plugin_wd_demo_link) != ""){ ?>
106
- <a href="<?php echo $wd_options->plugin_wd_demo_link; ?>" target="_blank"
107
- class="button transparent"><?php _e("Demo", $wd_options->prefix); ?></a>
108
  <?php }
109
  if(trim($wd_options->plugin_wd_docs_link) != ""){ ?>
110
- <a href="<?php echo $wd_options->plugin_wd_docs_link; ?>" target="_blank"
111
- class="button transparent"><?php _e("User Guide", $wd_options->prefix); ?></a>
112
  <?php } ?>
113
  </div>
114
  </div>
115
  <?php } ?>
116
  <div class="tenweb_footer <?php echo trim($wd_options->plugin_wd_demo_link) == "" ? "without_demo" : ""; ?>">
117
  <div class="container">
118
- <h2><?php echo $wd_options->description; ?></h2>
119
- <p><?php echo sprintf(__("Get Premium %s and Other Solutions Essential for Your WordPress Site.", $wd_options->prefix), $wd_options->plugin_title); ?></p>
120
  <a href="https://my.10web.io/checkout/" target="_blank"
121
- class="button"><?php _e("Get free for 14 days", $wd_options->prefix); ?></a>
122
  </div>
123
  </div>
124
  </div>
7
  </a>
8
  </div>
9
  <div class="tenweb_header_right tenweb_clear">
10
+ <div class="inline-block header_text"><?php echo esc_html(sprintf(__("Get Premium %s and Other Solutions Essential for Your WordPress Site.", $wd_options->prefix), $wd_options->plugin_title)); ?>
11
  </div>
12
  <a href="https://my.10web.io/checkout/" target="_blank"
13
+ class="button"><?php _e("Try Free", esc_html($wd_options->prefix)); ?></a>
14
  </div>
15
  </div>
16
  <div class="tenweb_header_divider">
17
  </div>
18
  <div class="container container_bottom">
19
  <div class="plugin_info">
20
+ <img src="<?php echo esc_url($wd_options->overview_welcome_image); ?>" class="plugin_logo">
21
+ <h2><?php _e("Premium ", esc_html($wd_options->prefix)); ?><?php echo esc_html($wd_options->plugin_title); ?></h2>
22
  <div class="and"> & </div>
23
  </div>
24
  <div class="plan_features tenweb_clear">
25
  <div class="plan_feature pro_plugins">
26
  <div class="logo"></div>
27
+ <h3><?php _e("60+ pro plugins/Add-ons", esc_html($wd_options->prefix)); ?></h3>
28
+ <p><?php _e("Access 60+ plugins and add-ons, including key plugins, such as gallery, form, slider, social plugins and more.", esc_html($wd_options->prefix)); ?></p>
29
  </div>
30
  <div class="plan_feature dashboard">
31
  <div class="logo"></div>
32
+ <h3><?php _e("Unified dashboard", esc_html($wd_options->prefix)); ?></h3>
33
+ <p><?php _e("Manage your WordPress websites all in one place within a single dashboard. No need to switch between sites.", esc_html($wd_options->prefix)); ?></p>
34
  </div>
35
  <div class="plan_feature pro_themes">
36
  <div class="logo"></div>
37
+ <h3><?php _e("Premium WordPress themes", esc_html($wd_options->prefix)); ?></h3>
38
+ <p><?php _e("Professionally designed, responsive themes for your website. Build fully-functional, elegant websites effortlessly.", esc_html($wd_options->prefix)); ?></p>
39
  </div>
40
  <?php if ($wd_options->plugin_wordpress_slug != "backup-wd") { ?>
41
  <div class="plan_feature backup">
42
  <div class="logo"></div>
43
+ <h3><?php _e("Backup", esc_html($wd_options->prefix)); ?></h3>
44
+ <p><?php _e("10Web cloud storage space. Easily and securely backup your website in our storage.", esc_html($wd_options->prefix)); ?></p>
45
  </div>
46
  <?php } ?>
47
  <?php if ($wd_options->plugin_wordpress_slug != "seo-by-10web") { ?>
48
  <div class="plan_feature seo">
49
  <div class="logo"></div>
50
+ <h3><?php _e("SEO", esc_html($wd_options->prefix)); ?></h3>
51
+ <p><?php _e("Improve search rankings of your WordPress site with a comprehensive search engine optimization solution.", esc_html($wd_options->prefix)); ?></p>
52
  </div>
53
  <?php } ?>
54
  <div class="plan_feature security">
55
  <div class="logo"></div>
56
+ <h3><?php _e("Security", esc_html($wd_options->prefix)); ?></h3>
57
+ <p><?php _e("Protect your WordPress site from security issues and threats with a powerful security service coming soon to 10Web.", esc_html($wd_options->prefix)); ?></p>
58
  </div>
59
  <?php if ($wd_options->plugin_wordpress_slug != "image-optimizer-wd") { ?>
60
  <div class="plan_feature image_optimizer">
61
  <div class="logo"></div>
62
+ <h3><?php _e("Image optimization", esc_html($wd_options->prefix)); ?></h3>
63
+ <p><?php _e("Automatically resize and compress all images on your website to save space and improve site speed.", esc_html($wd_options->prefix)); ?></p>
64
  </div>
65
  <?php } ?>
66
  <div class="plan_feature hosting">
67
  <div class="logo"></div>
68
+ <h3><?php _e("Hosting", esc_html($wd_options->prefix)); ?></h3>
69
+ <p><?php _e("We’ll soon be offering affordable hosting solution with WordPress-friendly features and great customer support.", esc_html($wd_options->prefix)); ?></p>
70
  </div>
71
  </div>
72
  <a href="https://my.10web.io/checkout/" target="_blank"
73
+ class="button"><?php _e("Get free for 14 days", esc_html($wd_options->prefix)); ?></a>
74
  <div><a href="https://10web.io/" target="_blank"
75
+ class="more white"><?php _e("Learn More", esc_html($wd_options->prefix)); ?></a></div>
76
  </div>
77
  </div>
78
  <?php if (count($wd_options->plugin_features)) { ?>
79
  <div class="tenweb_plugin_features">
80
  <div class="container">
81
+ <h2><?php _e("Premium ", esc_html($wd_options->prefix)); ?><?php echo esc_html($wd_options->plugin_title); ?><?php _e(" features you get!", esc_html($wd_options->prefix)); ?></h2>
82
  <div class="plugin_features tenweb_clear">
83
  <?php foreach ($wd_options->plugin_features as $features) { ?>
84
  <div class="plugin_feature">
85
  <div class="plugin_feature_logo">
86
+ <img src="<?php echo esc_url($features['logo']); ?>">
87
  </div>
88
+ <h3><?php echo esc_html($features['title']); ?></h3>
89
+ <p><?php echo esc_html($features['description']); ?></p>
90
  </div>
91
  <?php } ?>
92
  </div>
93
  <div class="and circle"> & </div>
94
+ <h3 class="more_features"><?php _e("More great features of the plugin", esc_html($wd_options->prefix)); ?></h3>
95
+ <a href="<?php echo esc_url($wd_options->plugin_wd_url); ?>" target="_blank"
96
+ class="more blue"><?php _e("Learn More", esc_html($wd_options->prefix)); ?></a>
97
  </div>
98
  </div>
99
  <?php }
100
  if(trim($wd_options->plugin_wd_demo_link) != "" || trim($wd_options->plugin_wd_docs_link) != ""){ ?>
101
  <div class="tenweb_how_it_works">
102
  <div class="container">
103
+ <h2><?php _e("Checkout how it works", esc_html($wd_options->prefix)); ?></h2>
104
  <?php
105
  if(trim($wd_options->plugin_wd_demo_link) != ""){ ?>
106
+ <a href="<?php echo esc_url($wd_options->plugin_wd_demo_link); ?>" target="_blank"
107
+ class="button transparent"><?php _e("Demo", esc_html($wd_options->prefix)); ?></a>
108
  <?php }
109
  if(trim($wd_options->plugin_wd_docs_link) != ""){ ?>
110
+ <a href="<?php echo esc_url($wd_options->plugin_wd_docs_link); ?>" target="_blank"
111
+ class="button transparent"><?php _e("User Guide", esc_html($wd_options->prefix)); ?></a>
112
  <?php } ?>
113
  </div>
114
  </div>
115
  <?php } ?>
116
  <div class="tenweb_footer <?php echo trim($wd_options->plugin_wd_demo_link) == "" ? "without_demo" : ""; ?>">
117
  <div class="container">
118
+ <h2><?php echo esc_html($wd_options->description); ?></h2>
119
+ <p><?php echo esc_html(sprintf(__("Get Premium %s and Other Solutions Essential for Your WordPress Site.", $wd_options->prefix), $wd_options->plugin_title)); ?></p>
120
  <a href="https://my.10web.io/checkout/" target="_blank"
121
+ class="button"><?php _e("Get free for 14 days", esc_html($wd_options->prefix)); ?></a>
122
  </div>
123
  </div>
124
  </div>
wd/templates/display_subscribe.php CHANGED
@@ -2,47 +2,47 @@
2
  <div class="tenweb_subscribe-content">
3
  <div class="texts">
4
  <div class="hi_there"></div>
5
- <h2><?php _e( "Hi there!", $wd_options->prefix ); ?></h2>
6
- <h5><?php _e( "Allow 10Web to collect some usage data", $wd_options->prefix ); ?></h5>
7
  <p>
8
- <?php echo sprintf( __( "This will allow you to get more out of your plugin experience - get awesome customer support, receive exclusive deals and discounts on premium products and more. You can choose to skip this step, %s will still work just fine.", $wd_options->prefix ), $wd_options->plugin_title ); ?>
9
  </p>
10
  </div>
11
- <div class="permissions"><?php _e( "What data is being collected?" , $wd_options->prefix ); ?></div>
12
  <div class="list tenweb_clear">
13
  <div class="list_item user_info">
14
  <div class="list_logo"></div>
15
- <div class="list_text_wrap"> <?php _e( "Your name & Email address", $wd_options->prefix ); ?></div>
16
  </div>
17
  <div class="list_item wp_info">
18
  <div class="list_logo"></div>
19
- <div class="list_text_wrap"> <?php _e( "Site URL, Wordpress version", $wd_options->prefix ); ?></div>
20
  </div>
21
  <div class="list_item plugins_info">
22
  <div class="list_logo"></div>
23
- <div class="list_text_wrap"> <?php _e( "List of plugins", $wd_options->prefix ); ?></div>
24
  </div>
25
  </div>
26
  <div class="btns">
27
- <a href="<?php echo "admin.php?page=" . $wd_options->prefix . "_subscribe&". $wd_options->prefix . "_sub_action=allow" ;?>" class="allow_and_continue button"><?php _e( "Allow & Continue", $wd_options->prefix ); ?></a>
28
- <img src="<?php echo $wd_options->wd_url_img . '/loader.gif';?>" class="wd_loader">
29
- <a href="<?php echo "admin.php?page=" . $wd_options->prefix . "_subscribe&" . $wd_options->prefix . "_sub_action=skip" ;?>" class="skip more" ><?php _e( "Skip", $wd_options->prefix ); ?></a>
30
  </div>
31
  </div>
32
  <div class="tenweb_subscribe-top-footer">
33
- <?php _e( "We will not sell, share, or distribute your personal information to third parties.", $wd_options->prefix ); ?>
34
  </div>
35
  <div class="tenweb_subscribe-footer">
36
  <ul class="tenweb_footer-menu tenweb_clear">
37
  <li>
38
  <a href="https://10web.io/privacy-policy/" target="_blank">
39
- <?php _e( "Privacy Policy", $wd_options->prefix ); ?>
40
  </a>
41
  </li>
42
  <li>| </li>
43
  <li>
44
  <a href="https://10web.io/terms-of-services/" target="_blank">
45
- <?php _e( "Terms of Use", $wd_options->prefix ); ?>
46
  </a>
47
  </li>
48
  </ul>
2
  <div class="tenweb_subscribe-content">
3
  <div class="texts">
4
  <div class="hi_there"></div>
5
+ <h2><?php _e( "Hi there!", esc_html($wd_options->prefix) ); ?></h2>
6
+ <h5><?php _e( "Allow 10Web to collect some usage data", esc_html($wd_options->prefix) ); ?></h5>
7
  <p>
8
+ <?php echo esc_html(sprintf( __( "This will allow you to get more out of your plugin experience - get awesome customer support, receive exclusive deals and discounts on premium products and more. You can choose to skip this step, %s will still work just fine.", $wd_options->prefix ), $wd_options->plugin_title )); ?>
9
  </p>
10
  </div>
11
+ <div class="permissions"><?php _e( "What data is being collected?" , esc_html($wd_options->prefix) ); ?></div>
12
  <div class="list tenweb_clear">
13
  <div class="list_item user_info">
14
  <div class="list_logo"></div>
15
+ <div class="list_text_wrap"> <?php _e( "Your name & Email address", esc_html($wd_options->prefix) ); ?></div>
16
  </div>
17
  <div class="list_item wp_info">
18
  <div class="list_logo"></div>
19
+ <div class="list_text_wrap"> <?php _e( "Site URL, Wordpress version", esc_html($wd_options->prefix) ); ?></div>
20
  </div>
21
  <div class="list_item plugins_info">
22
  <div class="list_logo"></div>
23
+ <div class="list_text_wrap"> <?php _e( "List of plugins", esc_html($wd_options->prefix) ); ?></div>
24
  </div>
25
  </div>
26
  <div class="btns">
27
+ <a href="<?php echo esc_url(wp_nonce_url("admin.php?page=" . $wd_options->prefix . "_subscribe&". $wd_options->prefix . "_sub_action=allow")) ;?>" class="allow_and_continue button"><?php _e( "Allow & Continue", esc_html($wd_options->prefix) ); ?></a>
28
+ <img src="<?php echo esc_url($wd_options->wd_url_img . '/loader.gif');?>" class="wd_loader">
29
+ <a href="<?php echo esc_url(wp_nonce_url("admin.php?page=" . $wd_options->prefix . "_subscribe&" . $wd_options->prefix . "_sub_action=skip")) ;?>" class="skip more" ><?php _e( "Skip", esc_html($wd_options->prefix) ); ?></a>
30
  </div>
31
  </div>
32
  <div class="tenweb_subscribe-top-footer">
33
+ <?php _e( "We will not sell, share, or distribute your personal information to third parties.", esc_html($wd_options->prefix) ); ?>
34
  </div>
35
  <div class="tenweb_subscribe-footer">
36
  <ul class="tenweb_footer-menu tenweb_clear">
37
  <li>
38
  <a href="https://10web.io/privacy-policy/" target="_blank">
39
+ <?php _e( "Privacy Policy", esc_html($wd_options->prefix) ); ?>
40
  </a>
41
  </li>
42
  <li>| </li>
43
  <li>
44
  <a href="https://10web.io/terms-of-services/" target="_blank">
45
+ <?php _e( "Terms of Use", esc_html($wd_options->prefix) ); ?>
46
  </a>
47
  </li>
48
  </ul>
wd/wd.php CHANGED
@@ -108,7 +108,9 @@
108
  public function init_classes(){
109
  $wd_options = $this->config;
110
 
111
- $current_url = $_SERVER['REQUEST_URI'];
 
 
112
  if( $wd_options->deactivate === true ){
113
  if(strpos( $current_url, "plugins.php" ) !== false ){
114
  new TenWebLibDeactivate( $this->config );
108
  public function init_classes(){
109
  $wd_options = $this->config;
110
 
111
+ if (isset($_SERVER['REQUEST_URI'])) {
112
+ $current_url = sanitize_text_field($_SERVER['REQUEST_URI']);
113
+ }
114
  if( $wd_options->deactivate === true ){
115
  if(strpos( $current_url, "plugins.php" ) !== false ){
116
  new TenWebLibDeactivate( $this->config );