Version Description
- Fix. small CSS fixes
Download this release
Release Info
Developer | quadlayers |
Plugin | Instagram Gallery |
Version | 2.6.0 |
Comparing to | |
See all releases |
Code changes from version 2.5.9 to 2.6.0
- includes/pages/suggestions.php +12 -0
- includes/settings.php +37 -2
- includes/suggestions.php +132 -0
- insta-gallery.php +2 -2
- readme.txt +4 -1
includes/pages/suggestions.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="wrap" style="
|
2 |
+
position: relative;
|
3 |
+
margin: 25px 40px 0 20px;
|
4 |
+
max-width: 1200px;">
|
5 |
+
<?php
|
6 |
+
$wp_list_table = new QLIGG_Suggestions_List_Table();
|
7 |
+
$wp_list_table->prepare_items();
|
8 |
+
?>
|
9 |
+
<form id="plugin-filter" method="post" class="importer-item">
|
10 |
+
<?php $wp_list_table->display(); ?>
|
11 |
+
</form>
|
12 |
+
</div>
|
includes/settings.php
CHANGED
@@ -28,7 +28,7 @@ if (!class_exists('QLIGG_Settings')) {
|
|
28 |
<p class="about-text"><?php printf(esc_html__('Thanks for using %s! We will do our absolute best to support you and fix all the issues.', 'insta-gallery'), QLIGG_PLUGIN_NAME); ?></p>
|
29 |
|
30 |
<p class="about-text">
|
31 |
-
<?php printf('<a href="%s" target="_blank">%s</a>', QLIGG_DEMO_URL, esc_html__('Check out our demo', '
|
32 |
</p>
|
33 |
|
34 |
<?php printf('<a href="%s" target="_blank"><div style="
|
@@ -44,7 +44,7 @@ if (!class_exists('QLIGG_Settings')) {
|
|
44 |
height: 40px;
|
45 |
display: inline-block;
|
46 |
width: 140px;
|
47 |
-
" class="wp-badge">%s</div></a>', 'https://quadlayers.com/?utm_source=qligg_admin', plugins_url('/assets/img/quadlayers.jpg', QLIGG_PLUGIN_FILE), esc_html__('QuadLayers', '
|
48 |
|
49 |
</div>
|
50 |
<?php
|
@@ -131,11 +131,20 @@ if (!class_exists('QLIGG_Settings')) {
|
|
131 |
<?php
|
132 |
}
|
133 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
function add_menu() {
|
135 |
add_menu_page(QLIGG_PLUGIN_NAME, str_replace('Feed ', '', QLIGG_PLUGIN_NAME), 'edit_posts', QLIGG_DOMAIN, array($this, 'settings_welcome'), 'dashicons-camera');
|
136 |
add_submenu_page(QLIGG_DOMAIN, esc_html__('Welcome', 'insta-gallery'), esc_html__('Welcome', 'insta-gallery'), 'edit_posts', QLIGG_DOMAIN, array($this, 'settings_welcome'));
|
137 |
add_submenu_page(QLIGG_DOMAIN, esc_html__('Account', 'insta-gallery'), esc_html__('Account', 'insta-gallery'), 'manage_options', QLIGG_DOMAIN . '_token', array($this, 'settings_token'));
|
138 |
add_submenu_page(QLIGG_DOMAIN, esc_html__('Feeds', 'insta-gallery'), esc_html__('Feeds', 'insta-gallery'), 'manage_options', QLIGG_DOMAIN . '_feeds', array($this, 'settings_feeds'));
|
|
|
139 |
add_submenu_page(QLIGG_DOMAIN, esc_html__('Premium', 'insta-gallery'), sprintf('<i class="dashicons dashicons-awards"></i> %s', esc_html__('Premium', 'insta-gallery')), 'edit_posts', QLIGG_DOMAIN . '_premium', array($this, 'settings_premium'));
|
140 |
}
|
141 |
|
@@ -163,11 +172,37 @@ if (!class_exists('QLIGG_Settings')) {
|
|
163 |
}
|
164 |
}
|
165 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
function init() {
|
167 |
add_action('admin_enqueue_scripts', array($this, 'add_admin_js'));
|
168 |
add_action('admin_enqueue_scripts', array($this, 'dequeue_admin_js'), 999);
|
169 |
add_action('admin_menu', array($this, 'add_menu'));
|
170 |
add_filter('plugin_action_links_' . plugin_basename(QLIGG_PLUGIN_FILE), array($this, 'add_action_links'));
|
|
|
|
|
|
|
171 |
}
|
172 |
|
173 |
public static function instance() {
|
28 |
<p class="about-text"><?php printf(esc_html__('Thanks for using %s! We will do our absolute best to support you and fix all the issues.', 'insta-gallery'), QLIGG_PLUGIN_NAME); ?></p>
|
29 |
|
30 |
<p class="about-text">
|
31 |
+
<?php printf('<a href="%s" target="_blank">%s</a>', QLIGG_DEMO_URL, esc_html__('Check out our demo', 'insta-gallery')); ?></a>
|
32 |
</p>
|
33 |
|
34 |
<?php printf('<a href="%s" target="_blank"><div style="
|
44 |
height: 40px;
|
45 |
display: inline-block;
|
46 |
width: 140px;
|
47 |
+
" class="wp-badge">%s</div></a>', 'https://quadlayers.com/?utm_source=qligg_admin', plugins_url('/assets/img/quadlayers.jpg', QLIGG_PLUGIN_FILE), esc_html__('QuadLayers', 'insta-gallery')); ?>
|
48 |
|
49 |
</div>
|
50 |
<?php
|
131 |
<?php
|
132 |
}
|
133 |
|
134 |
+
function settings_suggestions() {
|
135 |
+
?>
|
136 |
+
<?php $this->settings_header(); ?>
|
137 |
+
<?php include_once('suggestions.php'); ?>
|
138 |
+
<?php include_once('pages/suggestions.php'); ?>
|
139 |
+
<?php
|
140 |
+
}
|
141 |
+
|
142 |
function add_menu() {
|
143 |
add_menu_page(QLIGG_PLUGIN_NAME, str_replace('Feed ', '', QLIGG_PLUGIN_NAME), 'edit_posts', QLIGG_DOMAIN, array($this, 'settings_welcome'), 'dashicons-camera');
|
144 |
add_submenu_page(QLIGG_DOMAIN, esc_html__('Welcome', 'insta-gallery'), esc_html__('Welcome', 'insta-gallery'), 'edit_posts', QLIGG_DOMAIN, array($this, 'settings_welcome'));
|
145 |
add_submenu_page(QLIGG_DOMAIN, esc_html__('Account', 'insta-gallery'), esc_html__('Account', 'insta-gallery'), 'manage_options', QLIGG_DOMAIN . '_token', array($this, 'settings_token'));
|
146 |
add_submenu_page(QLIGG_DOMAIN, esc_html__('Feeds', 'insta-gallery'), esc_html__('Feeds', 'insta-gallery'), 'manage_options', QLIGG_DOMAIN . '_feeds', array($this, 'settings_feeds'));
|
147 |
+
add_submenu_page(QLIGG_DOMAIN, esc_html__('Suggestions', 'insta-gallery'), sprintf('%s', esc_html__('Suggestions', 'insta-gallery')), 'edit_posts', QLIGG_DOMAIN . '_suggestions', array($this, 'settings_suggestions'), 99);
|
148 |
add_submenu_page(QLIGG_DOMAIN, esc_html__('Premium', 'insta-gallery'), sprintf('<i class="dashicons dashicons-awards"></i> %s', esc_html__('Premium', 'insta-gallery')), 'edit_posts', QLIGG_DOMAIN . '_premium', array($this, 'settings_premium'));
|
149 |
}
|
150 |
|
172 |
}
|
173 |
}
|
174 |
|
175 |
+
// fix for activateUrl on install now button
|
176 |
+
public function network_admin_url($url, $path) {
|
177 |
+
|
178 |
+
if (wp_doing_ajax() && !is_network_admin()) {
|
179 |
+
if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'install-plugin') {
|
180 |
+
if (strpos($url, 'plugins.php') !== false) {
|
181 |
+
$url = self_admin_url($path);
|
182 |
+
}
|
183 |
+
}
|
184 |
+
}
|
185 |
+
|
186 |
+
return $url;
|
187 |
+
}
|
188 |
+
|
189 |
+
public function add_redirect() {
|
190 |
+
|
191 |
+
if (isset($_REQUEST['activate']) && $_REQUEST['activate'] == 'true') {
|
192 |
+
if (wp_get_referer() == admin_url('admin.php?page=' . QLIGG_DOMAIN . '_suggestions')) {
|
193 |
+
wp_redirect(admin_url('admin.php?page=' . QLIGG_DOMAIN . '_suggestions'));
|
194 |
+
}
|
195 |
+
}
|
196 |
+
}
|
197 |
+
|
198 |
function init() {
|
199 |
add_action('admin_enqueue_scripts', array($this, 'add_admin_js'));
|
200 |
add_action('admin_enqueue_scripts', array($this, 'dequeue_admin_js'), 999);
|
201 |
add_action('admin_menu', array($this, 'add_menu'));
|
202 |
add_filter('plugin_action_links_' . plugin_basename(QLIGG_PLUGIN_FILE), array($this, 'add_action_links'));
|
203 |
+
//
|
204 |
+
add_action('admin_init', array($this, 'add_redirect'));
|
205 |
+
add_filter('network_admin_url', array($this, 'network_admin_url'), 10, 2);
|
206 |
}
|
207 |
|
208 |
public static function instance() {
|
includes/suggestions.php
ADDED
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once( ABSPATH . 'wp-admin/includes/class-wp-plugin-install-list-table.php' );
|
4 |
+
|
5 |
+
class QLIGG_Suggestions_List_Table extends WP_Plugin_Install_List_Table {
|
6 |
+
|
7 |
+
public $promote = array(
|
8 |
+
'wp-menu-icons',
|
9 |
+
'wp-whatsapp-chat',
|
10 |
+
'insta-gallery',
|
11 |
+
'quadmenu',
|
12 |
+
'woocommerce-checkout-manager',
|
13 |
+
'woocommerce-direct-checkout',
|
14 |
+
);
|
15 |
+
|
16 |
+
private function remove_plugins($plugins) {
|
17 |
+
|
18 |
+
$promote = array();
|
19 |
+
|
20 |
+
foreach ($this->promote as $order => $slug) {
|
21 |
+
|
22 |
+
if ($id = @max(array_keys(array_column($plugins, 'slug'), $slug))) {
|
23 |
+
|
24 |
+
$promote[] = $plugins[$id];
|
25 |
+
}
|
26 |
+
}
|
27 |
+
|
28 |
+
return $promote;
|
29 |
+
}
|
30 |
+
|
31 |
+
public function self_admin_url($url, $path) {
|
32 |
+
|
33 |
+
if (strpos($url, 'tab=plugin-information') !== false) {
|
34 |
+
$url = network_admin_url($path);
|
35 |
+
}
|
36 |
+
|
37 |
+
return $url;
|
38 |
+
}
|
39 |
+
|
40 |
+
public function network_admin_url($url, $path) {
|
41 |
+
|
42 |
+
if (strpos($url, 'plugins.php') !== false) {
|
43 |
+
$url = self_admin_url($path);
|
44 |
+
}
|
45 |
+
|
46 |
+
return $url;
|
47 |
+
}
|
48 |
+
|
49 |
+
public function display_rows() {
|
50 |
+
add_filter('self_admin_url', array($this, 'self_admin_url'), 10, 2);
|
51 |
+
add_filter('network_admin_url', array($this, 'network_admin_url'), 10, 2);
|
52 |
+
parent::display_rows();
|
53 |
+
}
|
54 |
+
|
55 |
+
public function is_connected() {
|
56 |
+
|
57 |
+
global $wp_version;
|
58 |
+
|
59 |
+
$http_args = array(
|
60 |
+
'timeout' => 15,
|
61 |
+
'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url('/'),
|
62 |
+
);
|
63 |
+
|
64 |
+
return is_wp_error(wp_remote_get('http://api.wordpress.org/plugins/info/1.2/', $http_args));
|
65 |
+
}
|
66 |
+
|
67 |
+
public function get_plugins() {
|
68 |
+
|
69 |
+
$plugins = get_transient('ql_suggestions_plugins');
|
70 |
+
|
71 |
+
if ($plugins === false) {
|
72 |
+
|
73 |
+
$args = array(
|
74 |
+
'per_page' => 36,
|
75 |
+
'author' => 'quadlayers',
|
76 |
+
'locale' => get_user_locale(),
|
77 |
+
);
|
78 |
+
|
79 |
+
$api = plugins_api('query_plugins', $args);
|
80 |
+
|
81 |
+
if (!is_wp_error($api)) {
|
82 |
+
|
83 |
+
$plugins = $this->remove_plugins($api->plugins);
|
84 |
+
|
85 |
+
set_transient('ql_suggestions_plugins', $plugins, 24 * HOUR_IN_SECONDS);
|
86 |
+
}
|
87 |
+
}
|
88 |
+
|
89 |
+
return $plugins;
|
90 |
+
}
|
91 |
+
|
92 |
+
public function prepare_items() {
|
93 |
+
|
94 |
+
include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' );
|
95 |
+
|
96 |
+
global $tabs, $tab;
|
97 |
+
|
98 |
+
wp_enqueue_style('thickbox');
|
99 |
+
wp_enqueue_script('plugin-install');
|
100 |
+
wp_enqueue_script('thickbox');
|
101 |
+
wp_enqueue_script('updates');
|
102 |
+
|
103 |
+
wp_reset_vars(array('tab'));
|
104 |
+
|
105 |
+
$tabs = array();
|
106 |
+
|
107 |
+
if ('search' === $tab) {
|
108 |
+
$tabs['search'] = __('Search Results');
|
109 |
+
}
|
110 |
+
if ($tab === 'beta' || false !== strpos(get_bloginfo('version'), '-')) {
|
111 |
+
$tabs['beta'] = _x('Beta Testing', 'Plugin Installer');
|
112 |
+
}
|
113 |
+
$tabs['featured'] = _x('Featured', 'Plugin Installer');
|
114 |
+
$tabs['popular'] = _x('Popular', 'Plugin Installer');
|
115 |
+
$tabs['recommended'] = _x('Recommended', 'Plugin Installer');
|
116 |
+
$tabs['favorites'] = _x('Favorites', 'Plugin Installer');
|
117 |
+
|
118 |
+
$nonmenu_tabs = array('plugin-information'); // Valid actions to perform which do not have a Menu item.
|
119 |
+
|
120 |
+
$tabs = apply_filters('install_plugins_tabs', $tabs);
|
121 |
+
|
122 |
+
$nonmenu_tabs = apply_filters('install_plugins_nonmenu_tabs', $nonmenu_tabs);
|
123 |
+
|
124 |
+
// If a non-valid menu tab has been selected, And it's not a non-menu action.
|
125 |
+
if (empty($tab) || (!isset($tabs[$tab]) && !in_array($tab, (array) $nonmenu_tabs) )) {
|
126 |
+
$tab = key($tabs);
|
127 |
+
}
|
128 |
+
|
129 |
+
$this->items = $this->get_plugins();
|
130 |
+
}
|
131 |
+
|
132 |
+
}
|
insta-gallery.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Instagram Feed Gallery
|
4 |
* Plugin URI: https://quadlayers.com/portfolio/instagram-gallery/
|
5 |
* Description: Display beautifull and responsive galleries on your website from your Instagram feed account.
|
6 |
-
* Version: 2.
|
7 |
* Author: Quadlayers
|
8 |
* Author URI: https://quadlayers.com
|
9 |
* License: GPL-2.0+
|
@@ -18,7 +18,7 @@ if (!defined('QLIGG_PLUGIN_NAME')) {
|
|
18 |
define('QLIGG_PLUGIN_NAME', 'Instagram Feed Gallery');
|
19 |
}
|
20 |
if (!defined('QLIGG_PLUGIN_VERSION')) {
|
21 |
-
define('QLIGG_PLUGIN_VERSION', '2.
|
22 |
}
|
23 |
if (!defined('QLIGG_PLUGIN_FILE')) {
|
24 |
define('QLIGG_PLUGIN_FILE', __FILE__);
|
3 |
* Plugin Name: Instagram Feed Gallery
|
4 |
* Plugin URI: https://quadlayers.com/portfolio/instagram-gallery/
|
5 |
* Description: Display beautifull and responsive galleries on your website from your Instagram feed account.
|
6 |
+
* Version: 2.6.0
|
7 |
* Author: Quadlayers
|
8 |
* Author URI: https://quadlayers.com
|
9 |
* License: GPL-2.0+
|
18 |
define('QLIGG_PLUGIN_NAME', 'Instagram Feed Gallery');
|
19 |
}
|
20 |
if (!defined('QLIGG_PLUGIN_VERSION')) {
|
21 |
+
define('QLIGG_PLUGIN_VERSION', '2.6.0');
|
22 |
}
|
23 |
if (!defined('QLIGG_PLUGIN_FILE')) {
|
24 |
define('QLIGG_PLUGIN_FILE', __FILE__);
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://quadlayers.com/portfolio/instagram-gallery/
|
|
4 |
Tags: instagram, instagram feed, instagram widget, instagram gallery, instagram pictures, gallery widget, pictures, carousel slider, image gallery, image slider
|
5 |
Requires at least: 4.6
|
6 |
Tested up to: 5.2.2
|
7 |
-
Stable tag: 2.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -91,6 +91,9 @@ There may be some other plugins(like: fancybox, elementor) which also uses image
|
|
91 |
|
92 |
== Changelog ==
|
93 |
|
|
|
|
|
|
|
94 |
= 2.5.9 =
|
95 |
* Fix. save new feed override last feed settings
|
96 |
|
4 |
Tags: instagram, instagram feed, instagram widget, instagram gallery, instagram pictures, gallery widget, pictures, carousel slider, image gallery, image slider
|
5 |
Requires at least: 4.6
|
6 |
Tested up to: 5.2.2
|
7 |
+
Stable tag: 2.6.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
91 |
|
92 |
== Changelog ==
|
93 |
|
94 |
+
= 2.6.0 =
|
95 |
+
* Fix. small CSS fixes
|
96 |
+
|
97 |
= 2.5.9 =
|
98 |
* Fix. save new feed override last feed settings
|
99 |
|