Version Description
- 2020-09-17 fix - unnecessary fucntion removed
Download this release
Release Info
Developer | pickplugins |
Plugin | Post Grid |
Version | 2.0.73 |
Comparing to | |
See all releases |
Code changes from version 2.0.71 to 2.0.73
- assets/admin/js/scripts.js +0 -43
- includes/functions-data-upgrade.php +0 -108
- post-grid.php +2 -2
- readme.txt +7 -1
assets/admin/js/scripts.js
CHANGED
@@ -43,49 +43,6 @@ jQuery(document).ready(function($){
|
|
43 |
})
|
44 |
|
45 |
|
46 |
-
$(document).on('click', '.post-grid-import-layouts', function(event){
|
47 |
-
|
48 |
-
event.preventDefault();
|
49 |
-
|
50 |
-
xml_source = $(this).attr('href');
|
51 |
-
skip = $(this).attr('skip');
|
52 |
-
|
53 |
-
$(this).html('Please wait...');
|
54 |
-
|
55 |
-
|
56 |
-
console.log(xml_source);
|
57 |
-
|
58 |
-
jQuery.ajax(
|
59 |
-
{
|
60 |
-
type: 'POST',
|
61 |
-
context: this,
|
62 |
-
url: post_grid_ajax.post_grid_ajaxurl,
|
63 |
-
data: {"action": "post_grid_import_xml_layouts","source": xml_source,"skip": skip },
|
64 |
-
success: function(response) {
|
65 |
-
var data = JSON.parse( response );
|
66 |
-
|
67 |
-
success = data['success'];
|
68 |
-
skip_success = data['skip_success'];
|
69 |
-
|
70 |
-
$(this).html(success);
|
71 |
-
$(this).html(skip_success);
|
72 |
-
|
73 |
-
|
74 |
-
console.log(success);
|
75 |
-
|
76 |
-
}
|
77 |
-
});
|
78 |
-
|
79 |
-
})
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
|
90 |
|
91 |
});
|
43 |
})
|
44 |
|
45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
|
47 |
|
48 |
});
|
includes/functions-data-upgrade.php
CHANGED
@@ -1232,111 +1232,3 @@ function post_grid_layout_css($layout){
|
|
1232 |
|
1233 |
}
|
1234 |
|
1235 |
-
add_shortcode('post_grid_import_xml_layouts', 'post_grid_import_xml_layouts');
|
1236 |
-
|
1237 |
-
function post_grid_import_xml_layouts(){
|
1238 |
-
$post_grid_info = get_option('post_grid_info');
|
1239 |
-
|
1240 |
-
$response = array();
|
1241 |
-
$user_id = get_current_user_id();
|
1242 |
-
$source = isset($_POST['source']) ? sanitize_text_field($_POST['source']) : '';
|
1243 |
-
$skip = isset($_POST['skip']) ? sanitize_text_field($_POST['skip']) : '';
|
1244 |
-
|
1245 |
-
|
1246 |
-
if($skip == 'yes'){
|
1247 |
-
|
1248 |
-
if(strpos($source, 'post-grid-pro')){
|
1249 |
-
$post_grid_info['import_pro_layouts'] = 'done';
|
1250 |
-
}else{
|
1251 |
-
$post_grid_info['import_layouts'] = 'done';
|
1252 |
-
}
|
1253 |
-
|
1254 |
-
$response['skip_success'] = __('Import skipped','post-grid');
|
1255 |
-
update_option('post_grid_info', $post_grid_info);
|
1256 |
-
|
1257 |
-
echo json_encode($response);
|
1258 |
-
die();
|
1259 |
-
}
|
1260 |
-
|
1261 |
-
if(!empty($source)){
|
1262 |
-
$json_obj = file_get_contents($source);
|
1263 |
-
}else{
|
1264 |
-
$json_obj = '';
|
1265 |
-
}
|
1266 |
-
|
1267 |
-
|
1268 |
-
|
1269 |
-
//$xml_json = json_encode($html_obj);
|
1270 |
-
$xml_arr = json_decode($json_obj, true);
|
1271 |
-
|
1272 |
-
|
1273 |
-
$items = isset($xml_arr['rss']['channel']['item']) ? $xml_arr['rss']['channel']['item'] : array();
|
1274 |
-
|
1275 |
-
if(!empty($items))
|
1276 |
-
foreach ($items as $item){
|
1277 |
-
|
1278 |
-
$post_title = isset($item['title']) ? $item['title'] : '';
|
1279 |
-
$postmeta = isset($item['postmeta']) ? $item['postmeta'] : array();
|
1280 |
-
|
1281 |
-
$post_id = wp_insert_post(
|
1282 |
-
array(
|
1283 |
-
'post_title' => $post_title,
|
1284 |
-
'post_content' => '',
|
1285 |
-
'post_status' => 'publish',
|
1286 |
-
'post_type' => 'post_grid_layout',
|
1287 |
-
'post_author' => $user_id,
|
1288 |
-
)
|
1289 |
-
);
|
1290 |
-
|
1291 |
-
// echo '<br>';
|
1292 |
-
// echo $post_title. ' Created';
|
1293 |
-
// echo '<br>';
|
1294 |
-
|
1295 |
-
|
1296 |
-
foreach ($postmeta as $meta){
|
1297 |
-
|
1298 |
-
$meta_key = isset($meta['meta_key']['__cdata']) ? $meta['meta_key']['__cdata'] : '';
|
1299 |
-
$meta_value = isset($meta['meta_value']['__cdata']) ? $meta['meta_value']['__cdata'] : '';
|
1300 |
-
|
1301 |
-
// echo '<br>';
|
1302 |
-
// //var_dump(unserialize($meta_value));
|
1303 |
-
// echo '<br>';
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
if($meta_key == 'layout_options' || $meta_key == 'layout_elements_data' || $meta_key == 'custom_scripts' ){
|
1308 |
-
//var_dump($meta_value);
|
1309 |
-
|
1310 |
-
update_post_meta($post_id, $meta_key, unserialize($meta_value));
|
1311 |
-
}
|
1312 |
-
|
1313 |
-
|
1314 |
-
}
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
1318 |
-
|
1319 |
-
}
|
1320 |
-
|
1321 |
-
|
1322 |
-
$response['success'] = __('Import done','post-grid');
|
1323 |
-
|
1324 |
-
|
1325 |
-
if(strpos($source, 'post-grid-pro')){
|
1326 |
-
$post_grid_info['import_pro_layouts'] = 'done';
|
1327 |
-
}else{
|
1328 |
-
$post_grid_info['import_layouts'] = 'done';
|
1329 |
-
}
|
1330 |
-
|
1331 |
-
|
1332 |
-
update_option('post_grid_info', $post_grid_info);
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
echo json_encode($response);
|
1337 |
-
die();
|
1338 |
-
|
1339 |
-
|
1340 |
-
}
|
1341 |
-
|
1342 |
-
add_action('wp_ajax_post_grid_import_xml_layouts', 'post_grid_import_xml_layouts');
|
1232 |
|
1233 |
}
|
1234 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
post-grid.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Post Grid by PickPlugins
|
4 |
Plugin URI: https://www.pickplugins.com/item/post-grid-create-awesome-grid-from-any-post-type-for-wordpress/
|
5 |
Description: Awesome post grid for query post from any post type and display on grid.
|
6 |
-
Version: 2.0.
|
7 |
Author: PickPlugins
|
8 |
Author URI: https://www.pickplugins.com/
|
9 |
License: GPLv2 or later
|
@@ -21,7 +21,7 @@ if( !class_exists( 'PostGrid' )){
|
|
21 |
define('post_grid_plugin_dir', plugin_dir_path(__FILE__));
|
22 |
define('post_grid_plugin_basename', plugin_basename(__FILE__));
|
23 |
define('post_grid_plugin_name', 'Post Grid');
|
24 |
-
define('post_grid_version', '2.0.
|
25 |
//define('post_grid_server_url', 'http://localhost/wp/');
|
26 |
define('post_grid_server_url', 'https://www.pickplugins.com/demo/post-grid/');
|
27 |
|
3 |
Plugin Name: Post Grid by PickPlugins
|
4 |
Plugin URI: https://www.pickplugins.com/item/post-grid-create-awesome-grid-from-any-post-type-for-wordpress/
|
5 |
Description: Awesome post grid for query post from any post type and display on grid.
|
6 |
+
Version: 2.0.73
|
7 |
Author: PickPlugins
|
8 |
Author URI: https://www.pickplugins.com/
|
9 |
License: GPLv2 or later
|
21 |
define('post_grid_plugin_dir', plugin_dir_path(__FILE__));
|
22 |
define('post_grid_plugin_basename', plugin_basename(__FILE__));
|
23 |
define('post_grid_plugin_name', 'Post Grid');
|
24 |
+
define('post_grid_version', '2.0.73');
|
25 |
//define('post_grid_server_url', 'http://localhost/wp/');
|
26 |
define('post_grid_server_url', 'https://www.pickplugins.com/demo/post-grid/');
|
27 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Tags: post grid, grid, custom post grid, post type grid, grid display, category filter, custom post, filter, filtering, grid, layout, list, masonry, post, post filter, post layout, taxonomy, taxonomy filter,
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 5.5
|
7 |
-
Stable tag: 2.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -222,6 +222,12 @@ then paste this shortcode anywhere in your page to display grid<br />
|
|
222 |
|
223 |
== Changelog ==
|
224 |
|
|
|
|
|
|
|
|
|
|
|
|
|
225 |
= 2.0.71 =
|
226 |
* 2020-08-17 fix - post grid elements action hook order issue fixed.
|
227 |
|
4 |
Tags: post grid, grid, custom post grid, post type grid, grid display, category filter, custom post, filter, filtering, grid, layout, list, masonry, post, post filter, post layout, taxonomy, taxonomy filter,
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 5.5
|
7 |
+
Stable tag: 2.0.73
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
222 |
|
223 |
== Changelog ==
|
224 |
|
225 |
+
= 2.0.73 =
|
226 |
+
* 2020-09-17 fix - unnecessary fucntion removed
|
227 |
+
|
228 |
+
= 2.0.72 =
|
229 |
+
* 2020-09-17 fix - security issue fixed.
|
230 |
+
|
231 |
= 2.0.71 =
|
232 |
* 2020-08-17 fix - post grid elements action hook order issue fixed.
|
233 |
|