Post Grid - Version 1.8

Version Description

  • 01/10/2015 add- added soem premium features.
Download this release

Release Info

Developer paratheme
Plugin Icon 128x128 Post Grid
Version 1.8
Comparing to
See all releases

Code changes from version 1.7 to 1.8

ParaAdmin/css/ParaAdmin.css CHANGED
@@ -33,14 +33,6 @@
33
  margin: 10px 0;
34
  }
35
 
36
- .para-settings .option-box .pro {
37
- background: none repeat scroll 0 0 rgb(53, 158, 255);
38
- border-radius: 3px;
39
- color: rgb(255, 255, 255);
40
- padding: 0 6px;
41
- }
42
-
43
-
44
  .para-settings ul.tab-nav {
45
  clear: both;
46
  margin: 0;
33
  margin: 10px 0;
34
  }
35
 
 
 
 
 
 
 
 
 
36
  .para-settings ul.tab-nav {
37
  clear: both;
38
  margin: 0;
grid-items/content.php CHANGED
@@ -12,9 +12,9 @@ if ( ! defined('ABSPATH')) exit; // if direct access
12
 
13
  $content = apply_filters( 'post_grid_filter_content', get_the_content() );
14
  $content = apply_filters('the_content', $content);
15
- $content = wp_trim_words( $content , $post_grid_excerpt_count, ' <a class="read-more" href="'.get_the_permalink(get_the_ID()).'">'.$post_grid_read_more_text.'</a>' );
16
 
17
- $html .= '<div class="content">';
18
 
19
  $html .= $content;
20
 
12
 
13
  $content = apply_filters( 'post_grid_filter_content', get_the_content() );
14
  $content = apply_filters('the_content', $content);
15
+ $content = wp_trim_words( $content , $post_grid_excerpt_count, ' <a style="font-size:'.$post_grid_content_font_size.';color:'.$post_grid_content_color.';" class="read-more" href="'.get_the_permalink(get_the_ID()).'">'.$post_grid_read_more_text.'</a>' );
16
 
17
+ $html .= '<div style="font-size:'.$post_grid_content_font_size.';color:'.$post_grid_content_color.';" class="content">';
18
 
19
  $html .= $content;
20
 
grid-items/hover_items.php CHANGED
@@ -30,7 +30,10 @@ if ( ! defined('ABSPATH')) exit; // if direct access
30
  $html .= '<div class="hover-items">';
31
  $html_hover = '';
32
 
33
-
 
 
 
34
 
35
  if($post_grid_hover_items_link_display == 'yes')
36
  {
30
  $html .= '<div class="hover-items">';
31
  $html_hover = '';
32
 
33
+ if($post_grid_hover_items_zoom_display == 'yes')
34
+ {
35
+ $html_hover .= '<a title="Zoom." class="zoom"></a>';
36
+ }
37
 
38
  if($post_grid_hover_items_link_display == 'yes')
39
  {
grid-items/post_title.php CHANGED
@@ -12,10 +12,10 @@ if ( ! defined('ABSPATH')) exit; // if direct access
12
 
13
  $html_title = apply_filters( 'post_grid_filter_title', get_the_title(get_the_ID()) );
14
 
15
- $html .= '<div class="title">';
16
  if($post_grid_post_title_linked == 'yes')
17
  {
18
- $html .= '<a href="'.get_the_permalink(get_the_ID()).'">'.$html_title.'</a>';
19
  }
20
  else
21
  {
@@ -23,3 +23,6 @@ if ( ! defined('ABSPATH')) exit; // if direct access
23
  }
24
 
25
  $html .= '</div >';
 
 
 
12
 
13
  $html_title = apply_filters( 'post_grid_filter_title', get_the_title(get_the_ID()) );
14
 
15
+ $html .= '<div style="font-size:'.$post_grid_title_font_size.';color:'.$post_grid_title_color.';" class="title">';
16
  if($post_grid_post_title_linked == 'yes')
17
  {
18
+ $html .= '<a style="font-size:'.$post_grid_title_font_size.';color:'.$post_grid_title_color.';" href="'.get_the_permalink(get_the_ID()).'">'.$html_title.'</a>';
19
  }
20
  else
21
  {
23
  }
24
 
25
  $html .= '</div >';
26
+
27
+ //$html .= get_post_meta(get_the_ID(),'total_sales',true);
28
+
grid-items/query.php CHANGED
@@ -10,6 +10,12 @@
10
  if ( ! defined('ABSPATH')) exit; // if direct access
11
 
12
 
 
 
 
 
 
 
13
  if(!empty($post_grid_taxonomy))
14
  {
15
  $wp_query = new WP_Query(
@@ -22,13 +28,13 @@ if ( ! defined('ABSPATH')) exit; // if direct access
22
  'field' => 'id',
23
  'terms' => $post_grid_taxonomy_category,
24
  )
25
- ),
26
  'orderby' => $post_grid_query_orderby,
27
  'order' => $post_grid_query_order,
28
  'posts_per_page' => $post_grid_post_per_page,
29
  'paged' => $paged,
30
 
31
- ) );
32
  }
33
  else
34
  {
10
  if ( ! defined('ABSPATH')) exit; // if direct access
11
 
12
 
13
+
14
+
15
+
16
+
17
+
18
+
19
  if(!empty($post_grid_taxonomy))
20
  {
21
  $wp_query = new WP_Query(
28
  'field' => 'id',
29
  'terms' => $post_grid_taxonomy_category,
30
  )
31
+ ),
32
  'orderby' => $post_grid_query_orderby,
33
  'order' => $post_grid_query_order,
34
  'posts_per_page' => $post_grid_post_per_page,
35
  'paged' => $paged,
36
 
37
+ ) );
38
  }
39
  else
40
  {
grid-items/thumbnail.php CHANGED
@@ -14,11 +14,6 @@ if ( ! defined('ABSPATH')) exit; // if direct access
14
  $thumb = wp_get_attachment_image_src( get_post_thumbnail_id(get_the_ID()), $post_grid_thumb_size );
15
  $thumb_url = $thumb['0'];
16
 
17
- $external_thumb = get_post_meta( get_the_ID(), $post_grid_post_thumbnail_external, true );
18
- if(!empty($external_thumb))
19
- {
20
- $thumb_url = $external_thumb;
21
- }
22
 
23
  if($post_grid_themes == 'rounded')
24
  {
14
  $thumb = wp_get_attachment_image_src( get_post_thumbnail_id(get_the_ID()), $post_grid_thumb_size );
15
  $thumb_url = $thumb['0'];
16
 
 
 
 
 
 
17
 
18
  if($post_grid_themes == 'rounded')
19
  {
grid-items/variables.php CHANGED
@@ -21,7 +21,7 @@ if ( ! defined('ABSPATH')) exit; // if direct access
21
 
22
  $post_grid_excerpt_count = get_post_meta( $post_id, 'post_grid_excerpt_count', true );
23
  $post_grid_read_more_text = get_post_meta( $post_id, 'post_grid_read_more_text', true );
24
-
25
 
26
  $post_grid_bg_img = get_post_meta( $post_id, 'post_grid_bg_img', true );
27
 
@@ -30,9 +30,11 @@ if ( ! defined('ABSPATH')) exit; // if direct access
30
  $post_grid_thumb_height = get_post_meta( $post_id, 'post_grid_thumb_height', true );
31
 
32
  $post_grid_query_order = get_post_meta( $post_id, 'post_grid_query_order', true );
33
- $post_grid_query_orderby = get_post_meta( $post_id, 'post_grid_query_orderby', true );
34
- $post_grid_posttype = get_post_meta( $post_id, 'post_grid_posttype', true );
35
 
 
 
 
36
 
37
  $post_grid_meta_author_display = get_post_meta( $post_id, 'post_grid_meta_author_display', true );
38
  $post_grid_meta_avatar_display = get_post_meta( $post_id, 'post_grid_meta_avatar_display', true );
@@ -51,16 +53,40 @@ if ( ! defined('ABSPATH')) exit; // if direct access
51
  $post_grid_post_title_linked = get_post_meta( $post_id, 'post_grid_post_title_linked', true );
52
  $post_grid_post_thumbnail_linked = get_post_meta( $post_id, 'post_grid_post_thumbnail_linked', true );
53
  $post_grid_post_thumbnail_external = get_post_meta( $post_id, 'post_grid_post_thumbnail_external', true );
54
-
 
55
  $post_grid_hover_items_link_display = get_post_meta( $post_id, 'post_grid_hover_items_link_display', true );
56
  $post_grid_hover_items_share_display = get_post_meta( $post_id, 'post_grid_hover_items_share_display', true );
57
 
 
 
 
 
 
 
58
  $post_grid_hover_items_hover_effect_in = get_post_meta( $post_id, 'post_grid_hover_items_hover_effect_in', true );
59
 
 
 
60
 
61
  $post_grid_custom_css = get_post_meta( $post_id, 'post_grid_custom_css', true );
62
 
63
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
 
65
  if ( wp_is_mobile() )
66
  {
21
 
22
  $post_grid_excerpt_count = get_post_meta( $post_id, 'post_grid_excerpt_count', true );
23
  $post_grid_read_more_text = get_post_meta( $post_id, 'post_grid_read_more_text', true );
24
+ $post_grid_exclude_post_id = get_post_meta( $post_id, 'post_grid_exclude_post_id', true );
25
 
26
  $post_grid_bg_img = get_post_meta( $post_id, 'post_grid_bg_img', true );
27
 
30
  $post_grid_thumb_height = get_post_meta( $post_id, 'post_grid_thumb_height', true );
31
 
32
  $post_grid_query_order = get_post_meta( $post_id, 'post_grid_query_order', true );
33
+ $post_grid_query_orderby = get_post_meta( $post_id, 'post_grid_query_orderby', true );
 
34
 
35
+ $post_grid_posttype = get_post_meta( $post_id, 'post_grid_posttype', true );
36
+ $post_grid_taxonomy = get_post_meta( $post_id, 'post_grid_taxonomy', true );
37
+ $post_grid_taxonomy_category = get_post_meta( $post_id, 'post_grid_taxonomy_category', true );
38
 
39
  $post_grid_meta_author_display = get_post_meta( $post_id, 'post_grid_meta_author_display', true );
40
  $post_grid_meta_avatar_display = get_post_meta( $post_id, 'post_grid_meta_avatar_display', true );
53
  $post_grid_post_title_linked = get_post_meta( $post_id, 'post_grid_post_title_linked', true );
54
  $post_grid_post_thumbnail_linked = get_post_meta( $post_id, 'post_grid_post_thumbnail_linked', true );
55
  $post_grid_post_thumbnail_external = get_post_meta( $post_id, 'post_grid_post_thumbnail_external', true );
56
+
57
+ $post_grid_hover_items_zoom_display = get_post_meta( $post_id, 'post_grid_hover_items_zoom_display', true );
58
  $post_grid_hover_items_link_display = get_post_meta( $post_id, 'post_grid_hover_items_link_display', true );
59
  $post_grid_hover_items_share_display = get_post_meta( $post_id, 'post_grid_hover_items_share_display', true );
60
 
61
+ $post_grid_title_color = get_post_meta( $post_id, 'post_grid_title_color', true );
62
+ $post_grid_title_font_size = get_post_meta( $post_id, 'post_grid_title_font_size', true );
63
+
64
+ $post_grid_content_color = get_post_meta( $post_id, 'post_grid_content_color', true );
65
+ $post_grid_content_font_size = get_post_meta( $post_id, 'post_grid_content_font_size', true );
66
+
67
  $post_grid_hover_items_hover_effect_in = get_post_meta( $post_id, 'post_grid_hover_items_hover_effect_in', true );
68
 
69
+ $post_grid_mixitup_post_per_page = get_post_meta( $post_id, 'post_grid_mixitup_post_per_page', true );
70
+ $post_grid_mixitup_default_filter = get_post_meta( $post_id, 'post_grid_mixitup_default_filter', true );
71
 
72
  $post_grid_custom_css = get_post_meta( $post_id, 'post_grid_custom_css', true );
73
 
74
+
75
+ if(empty($post_grid_exclude_post_id))
76
+ {
77
+ $post_grid_exclude_post_id = array();
78
+ }
79
+ else
80
+ {
81
+ $post_grid_exclude_post_id = explode(',',$post_grid_exclude_post_id);
82
+ }
83
+
84
+
85
+ if(empty($post_grid_mixitup_post_per_page))
86
+ {
87
+ $post_grid_mixitup_post_per_page = 4;
88
+ }
89
+
90
 
91
  if ( wp_is_mobile() )
92
  {
includes/PostGridClass.php CHANGED
@@ -7,7 +7,7 @@ class PostgridClass
7
  public $grid_items = array('post_title'=>'Title',
8
  'content'=>'Content',
9
  'thumbnail'=>'Thumbnail',
10
- 'meta'=>'Meta',
11
  'social'=>'Social',
12
  'hover_items'=>'Hover Items',
13
  );
@@ -16,9 +16,9 @@ class PostgridClass
16
  'post_title'=> array('post_title'),
17
  'content'=> array('body','read_more'),
18
  'thumbnail'=> array('video','img'),
19
- 'meta'=> array( 'post_date','post_author','terms','comments_count','avatar'),
20
  'social'=> array('facebook','twitter','googleplus'),
21
- 'hover_items'=> array('link','share_button'),
22
  );
23
 
24
 
@@ -61,7 +61,9 @@ class PostgridClass
61
  $post_grid_post_thumbnail_linked = $this->settings_grid_get_post_meta($post->ID, 'post_grid_post_thumbnail_linked');
62
  $post_grid_post_thumbnail_external = $this->settings_grid_get_post_meta($post->ID, 'post_grid_post_thumbnail_external');
63
 
64
-
 
 
65
  $post_grid_hover_items_link_display = $this->settings_grid_get_post_meta($post->ID, 'post_grid_hover_items_link_display');
66
  $post_grid_hover_items_share_display = $this->settings_grid_get_post_meta($post->ID, 'post_grid_hover_items_share_display');
67
 
@@ -75,9 +77,14 @@ class PostgridClass
75
 
76
  $post_grid_meta_tags_display = $this->settings_grid_get_post_meta($post->ID, 'post_grid_meta_tags_display');
77
 
78
- $post_grid_meta_comments_display = $this->settings_grid_get_post_meta($post->ID, 'post_grid_meta_comments_display');
79
-
80
-
 
 
 
 
 
81
 
82
  $post_grid_hover_items_hover_effect_in = $this->settings_grid_get_post_meta($post->ID, 'post_grid_hover_items_hover_effect_in');
83
 
@@ -121,20 +128,9 @@ class PostgridClass
121
  $html .= '<input type="hidden" name="post_grid_items['.$key.']" value="'.$name.'" />';
122
  $html .= '<div class="options">';
123
 
124
- if($key =='meta_fields')
125
- {
126
- $html .= '<div class="options-meta_fields">';
127
- $html .= 'Custom Meta Fields. comma separated, no blank space.';
128
-
129
- $html .= '<input style="width:80%" type="text" placeholder="post_view_count,post_share_count" name="post_grid_post_meta_fields" value="'.$post_grid_post_meta_fields.'" />';
130
- $html .= '</div>';
131
- }
132
-
133
-
134
-
135
-
136
 
137
- elseif($key =='post_title')
138
  {
139
  $html .= '<div class="options-post_title">';
140
  $html .= 'Link to post ?<br />';
@@ -155,6 +151,14 @@ class PostgridClass
155
  $html .= '>No</option>';
156
 
157
  $html .= '</select>';
 
 
 
 
 
 
 
 
158
 
159
  $html .= '</div>';
160
  }
@@ -180,7 +184,12 @@ class PostgridClass
180
  $html .= '>No</option>';
181
 
182
  $html .= '</select>';
183
-
 
 
 
 
 
184
 
185
 
186
 
@@ -192,15 +201,6 @@ class PostgridClass
192
  {
193
  $html .= '<div class="options-thumbnail">';
194
 
195
- if(empty($post_grid_post_thumbnail_external))
196
- {
197
- $post_grid_post_thumbnail_external = 'dummy_'.$post->ID;
198
- }
199
-
200
- $html .= '<br />External Featured Image(meta key)<br />';
201
- $html .= '<input id="post_grid_post_thumbnail_external" type="text" placeholder="meta_key" size="10" name="post_grid_post_thumbnail_external" value="'.$post_grid_post_thumbnail_external.'" /><br /><br />';
202
-
203
-
204
  $html .= 'Link to post ?<br />';
205
  $html .= '<select name="post_grid_post_thumbnail_linked">';
206
 
@@ -263,15 +263,7 @@ class PostgridClass
263
  $html .= '>No</option>';
264
 
265
  $html .= '</select>';
266
-
267
-
268
-
269
-
270
-
271
-
272
-
273
-
274
-
275
 
276
  $html .= '<br /><br />Display Date ?<br />';
277
  $html .= '<select name="post_grid_meta_date_display">';
@@ -353,10 +345,42 @@ class PostgridClass
353
 
354
 
355
  $hover_effect_in = array(
356
- 'fadeIn',
357
- 'zoomIn',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
358
  'swing',
359
-
 
 
 
 
 
 
 
 
360
  );
361
 
362
  if(empty($post_grid_hover_items_hover_effect_in))
@@ -385,7 +409,29 @@ class PostgridClass
385
 
386
  $html .= '</select>';
387
 
388
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
389
 
390
  $html .= '<br /><br />Display Link ?<br />';
391
  $html .= '<select name="post_grid_hover_items_link_display">';
7
  public $grid_items = array('post_title'=>'Title',
8
  'content'=>'Content',
9
  'thumbnail'=>'Thumbnail',
10
+ 'meta'=>'Meta',
11
  'social'=>'Social',
12
  'hover_items'=>'Hover Items',
13
  );
16
  'post_title'=> array('post_title'),
17
  'content'=> array('body','read_more'),
18
  'thumbnail'=> array('video','img'),
19
+ 'meta'=> array( 'post_date','post_author','terms','comments_count','avatar'),
20
  'social'=> array('facebook','twitter','googleplus'),
21
+ 'hover_items'=> array('zoom','link','share_button'),
22
  );
23
 
24
 
61
  $post_grid_post_thumbnail_linked = $this->settings_grid_get_post_meta($post->ID, 'post_grid_post_thumbnail_linked');
62
  $post_grid_post_thumbnail_external = $this->settings_grid_get_post_meta($post->ID, 'post_grid_post_thumbnail_external');
63
 
64
+
65
+
66
+ $post_grid_hover_items_zoom_display = $this->settings_grid_get_post_meta($post->ID, 'post_grid_hover_items_zoom_display');
67
  $post_grid_hover_items_link_display = $this->settings_grid_get_post_meta($post->ID, 'post_grid_hover_items_link_display');
68
  $post_grid_hover_items_share_display = $this->settings_grid_get_post_meta($post->ID, 'post_grid_hover_items_share_display');
69
 
77
 
78
  $post_grid_meta_tags_display = $this->settings_grid_get_post_meta($post->ID, 'post_grid_meta_tags_display');
79
 
80
+ $post_grid_meta_comments_display = $this->settings_grid_get_post_meta($post->ID, 'post_grid_meta_comments_display');
81
+
82
+
83
+ $post_grid_title_color = $this->settings_grid_get_post_meta($post->ID, 'post_grid_title_color');
84
+ $post_grid_title_font_size = $this->settings_grid_get_post_meta($post->ID, 'post_grid_title_font_size');
85
+
86
+ $post_grid_content_color = $this->settings_grid_get_post_meta($post->ID, 'post_grid_content_color');
87
+ $post_grid_content_font_size = $this->settings_grid_get_post_meta($post->ID, 'post_grid_content_font_size');
88
 
89
  $post_grid_hover_items_hover_effect_in = $this->settings_grid_get_post_meta($post->ID, 'post_grid_hover_items_hover_effect_in');
90
 
128
  $html .= '<input type="hidden" name="post_grid_items['.$key.']" value="'.$name.'" />';
129
  $html .= '<div class="options">';
130
 
131
+
 
 
 
 
 
 
 
 
 
 
 
132
 
133
+ if($key =='post_title')
134
  {
135
  $html .= '<div class="options-post_title">';
136
  $html .= 'Link to post ?<br />';
151
  $html .= '>No</option>';
152
 
153
  $html .= '</select>';
154
+
155
+ $html .= '<br /><br />Font color<br />';
156
+ $html .= '<input id="post_grid_title_color" type="text" placeholder="#999999" size="10" name="post_grid_title_color" value="'.$post_grid_title_color.'" />';
157
+
158
+ $html .= '<br /><br />Font size<br />';
159
+ $html .= '<input id="post_grid_title_font_size" type="text" placeholder="14px" size="10" name="post_grid_title_font_size" value="'.$post_grid_title_font_size.'" />';
160
+
161
+
162
 
163
  $html .= '</div>';
164
  }
184
  $html .= '>No</option>';
185
 
186
  $html .= '</select>';
187
+
188
+ $html .= '<br /><br />Font color<br />';
189
+ $html .= '<input id="post_grid_content_color" type="text" placeholder="#999999" size="10" name="post_grid_content_color" value="'.$post_grid_content_color.'" />';
190
+
191
+ $html .= '<br /><br />Font size<br />';
192
+ $html .= '<input id="post_grid_content_font_size" type="text" placeholder="14px" size="10" name="post_grid_content_font_size" value="'.$post_grid_content_font_size.'" />';
193
 
194
 
195
 
201
  {
202
  $html .= '<div class="options-thumbnail">';
203
 
 
 
 
 
 
 
 
 
 
204
  $html .= 'Link to post ?<br />';
205
  $html .= '<select name="post_grid_post_thumbnail_linked">';
206
 
263
  $html .= '>No</option>';
264
 
265
  $html .= '</select>';
266
+
 
 
 
 
 
 
 
 
267
 
268
  $html .= '<br /><br />Display Date ?<br />';
269
  $html .= '<select name="post_grid_meta_date_display">';
345
 
346
 
347
  $hover_effect_in = array(
348
+ 'fadeIn',
349
+ 'fadeInDown',
350
+ 'fadeInDownBig',
351
+ 'fadeInLeft',
352
+ 'fadeInLeftBig',
353
+ 'fadeInRight',
354
+ 'fadeInRightBig',
355
+ 'fadeInUp',
356
+ 'fadeInUpBig',
357
+ 'flipInX',
358
+ 'flipInY',
359
+ 'lightSpeedIn',
360
+ 'rotateIn',
361
+ 'rollIn',
362
+ 'zoomIn',
363
+ 'zoomInDown',
364
+ 'zoomInLeft',
365
+ 'zoomInRight',
366
+ 'zoomInUp',
367
+ 'slideInDown',
368
+ 'slideInLeft',
369
+ 'slideInRight',
370
+ 'slideInUp',
371
+ 'bounce',
372
+ 'flash',
373
+ 'pulse',
374
  'swing',
375
+ 'rubberBand',
376
+ 'shake',
377
+ 'tada',
378
+ 'wobble',
379
+ 'jello',
380
+
381
+
382
+
383
+
384
  );
385
 
386
  if(empty($post_grid_hover_items_hover_effect_in))
409
 
410
  $html .= '</select>';
411
 
412
+
413
+
414
+
415
+
416
+ $html .= '<br /><br />Display zoom ?<br />';
417
+ $html .= '<select name="post_grid_hover_items_zoom_display">';
418
+
419
+ $html .= '<option value="yes"';
420
+ if($post_grid_hover_items_zoom_display == 'yes')
421
+ {
422
+ $html .= 'selected';
423
+ }
424
+ $html .= '>Yes</option>';
425
+
426
+ $html .= '<option value="no"';
427
+ if($post_grid_hover_items_zoom_display == 'no')
428
+ {
429
+ $html .= 'selected';
430
+ }
431
+ $html .= '>No</option>';
432
+
433
+ $html .= '</select>';
434
+
435
 
436
  $html .= '<br /><br />Display Link ?<br />';
437
  $html .= '<select name="post_grid_hover_items_link_display">';
includes/class-functions.php CHANGED
@@ -20,8 +20,8 @@ class class_post_grid_functions{
20
  public function post_grid_themes(){
21
 
22
  $themes = array(
23
- 'flat'=>'Flat',
24
- 'rounded'=>'Rounded',
25
  );
26
 
27
  foreach(apply_filters( 'post_grid_themes', $themes ) as $theme_key=> $theme_name)
@@ -44,15 +44,11 @@ class class_post_grid_functions{
44
  {
45
  $main_dir = post_grid_plugin_dir.'themes/';
46
 
 
 
47
  $themes_dir = array(
48
  'flat'=>$main_dir.'flat',
49
- 'big-thumbnail'=>$main_dir.'big-thumbnail',
50
- 'rounded'=>$main_dir.'rounded',
51
- 'price-table'=>$main_dir.'price-table',
52
- 'event'=>$main_dir.'event',
53
- 'mixit'=>$main_dir.'mixit',
54
- 'isotope'=>$main_dir.'isotope',
55
- 'left-right'=>$main_dir.'left-right',
56
  );
57
 
58
  foreach(apply_filters( 'post_grid_themes_dir', $themes_dir ) as $theme_key=> $theme_dir)
@@ -72,13 +68,7 @@ class class_post_grid_functions{
72
 
73
  $themes_url = array(
74
  'flat'=>$main_url.'flat',
75
- 'big-thumbnail'=>$main_url.'big-thumbnail',
76
- 'rounded'=>$main_url.'rounded',
77
- 'price-table'=>$main_url.'price-table',
78
- 'event'=>$main_url.'event',
79
- 'mixit'=>$main_url.'mixit',
80
- 'isotope'=>$main_url.'isotope',
81
- 'left-right'=>$main_url.'left-right',
82
  );
83
 
84
  foreach(apply_filters( 'post_grid_themes_url', $themes_url ) as $theme_key=> $theme_url)
20
  public function post_grid_themes(){
21
 
22
  $themes = array(
23
+ 'flat'=>'Flat',
24
+ 'rounded'=>'Rounded',
25
  );
26
 
27
  foreach(apply_filters( 'post_grid_themes', $themes ) as $theme_key=> $theme_name)
44
  {
45
  $main_dir = post_grid_plugin_dir.'themes/';
46
 
47
+
48
+
49
  $themes_dir = array(
50
  'flat'=>$main_dir.'flat',
51
+ 'rounded'=>$main_dir.'rounded',
 
 
 
 
 
 
52
  );
53
 
54
  foreach(apply_filters( 'post_grid_themes_dir', $themes_dir ) as $theme_key=> $theme_dir)
68
 
69
  $themes_url = array(
70
  'flat'=>$main_url.'flat',
71
+ 'rounded'=>$main_url.'rounded',
 
 
 
 
 
 
72
  );
73
 
74
  foreach(apply_filters( 'post_grid_themes_url', $themes_url ) as $theme_key=> $theme_url)
includes/class-settings.php CHANGED
@@ -17,6 +17,7 @@ class class_post_grid_settings{
17
 
18
  }
19
 
 
20
 
21
  public function post_grid_menu_settings(){
22
  include('menu/post-grid-settings.php');
@@ -26,8 +27,11 @@ class class_post_grid_settings{
26
 
27
  public function post_grid_menu_init() {
28
 
29
- add_submenu_page('edit.php?post_type=post_grid', __('Help & Upgrade','post_grid'), __('Help & Upgrade','post_grid'), 'manage_options', 'post_grid_menu_settings', array( $this, 'post_grid_menu_settings' ));
30
-
 
 
 
31
 
32
  }
33
 
17
 
18
  }
19
 
20
+
21
 
22
  public function post_grid_menu_settings(){
23
  include('menu/post-grid-settings.php');
27
 
28
  public function post_grid_menu_init() {
29
 
30
+ add_submenu_page('edit.php?post_type=post_grid', __('Settings','post_grid'), __('Settings','post_grid'), 'manage_options', 'post_grid_menu_settings', array( $this, 'post_grid_menu_settings' ));
31
+
32
+
33
+
34
+
35
 
36
  }
37
 
includes/class-shortcodes.php CHANGED
@@ -16,7 +16,9 @@ class class_post_grid_shortcodes{
16
  {
17
 
18
  add_shortcode( 'post_grid', array( $this, 'post_grid_display' ) );
19
-
 
 
20
  }
21
 
22
  public function post_grid_display($atts, $content = null ) {
@@ -47,7 +49,28 @@ class class_post_grid_shortcodes{
47
 
48
  }
49
 
50
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
 
52
 
53
 
16
  {
17
 
18
  add_shortcode( 'post_grid', array( $this, 'post_grid_display' ) );
19
+ add_shortcode( 'pg_read_more', array( $this, 'pg_read_more' ) );
20
+ //add_action( 'admin_menu', array( $this, 'admin_menu' ), 12 );
21
+ //add_action('admin_menu', array($this, 'create_menu'));
22
  }
23
 
24
  public function post_grid_display($atts, $content = null ) {
49
 
50
  }
51
 
52
+ public function pg_read_more($atts, $content = null ) {
53
+ $atts = shortcode_atts(
54
+ array(
55
+ 'read_more' => "Read more",
56
+ 'count' => 20,
57
+ ), $atts);
58
+
59
+
60
+ $read_more = $atts['read_more'];
61
+ $count = $atts['count'];
62
+
63
+ $html = '';
64
+
65
+
66
+ global $post;
67
+
68
+
69
+ $html.= wp_trim_words( $content , $count, ' <a class="read-more" href="'.get_the_permalink(get_the_ID()).'">'.$read_more.'</a>' );
70
+
71
+ return $html;
72
+
73
+ }
74
 
75
 
76
 
includes/menu/post-grid-settings.php CHANGED
@@ -4,6 +4,38 @@
4
  if ( ! defined('ABSPATH')) exit; // if direct access
5
 
6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  ?>
8
 
9
 
@@ -12,8 +44,13 @@ if ( ! defined('ABSPATH')) exit; // if direct access
12
 
13
  <div class="wrap">
14
 
15
- <div id="icon-tools" class="icon32"><br></div><?php echo "<h2>".__(post_grid_plugin_name.' Help', 'post_grid')."</h2>";?>
16
-
 
 
 
 
 
17
 
18
  <div class="para-settings post_grid-settings">
19
 
@@ -27,14 +64,7 @@ if ( ! defined('ABSPATH')) exit; // if direct access
27
  <div class="option-box">
28
  <p class="option-title">Need Help ?</p>
29
  <p class="option-info">Feel free to contact with any issue for this plugin, Ask any question via forum <a href="<?php echo post_grid_qa_url; ?>"><?php echo post_grid_qa_url; ?></a> <strong style="color:#139b50;">(free)</strong><br />
30
- </p>
31
 
32
- </div>
33
-
34
-
35
- <div class="option-box">
36
- <p class="option-title">Buy Premium</p>
37
- <p class="option-info">
38
  <?php
39
 
40
  if(post_grid_customer_type=="free")
@@ -57,10 +87,7 @@ if ( ! defined('ABSPATH')) exit; // if direct access
57
 
58
  </p>
59
 
60
- </div>
61
-
62
-
63
-
64
 
65
  <div class="option-box">
66
  <p class="option-title">Submit Reviews...</p>
@@ -102,4 +129,17 @@ if ( ! defined('ABSPATH')) exit; // if direct access
102
 
103
 
104
 
 
 
 
 
 
 
 
 
 
 
 
 
 
105
  </div>
4
  if ( ! defined('ABSPATH')) exit; // if direct access
5
 
6
 
7
+
8
+ if(empty($_POST['post_grid_hidden']))
9
+ {
10
+ $post_grid_options = get_option( 'post_grid_options' );
11
+
12
+
13
+ }
14
+ else
15
+ {
16
+ if($_POST['post_grid_hidden'] == 'Y') {
17
+ //Form data sent
18
+
19
+ if(empty($_POST['post_grid_options']))
20
+ {
21
+ $_POST['post_grid_options'] = array();
22
+ }
23
+
24
+ $post_grid_options = stripslashes_deep($_POST['post_grid_options']);
25
+ update_option('post_grid_options', $post_grid_options);
26
+
27
+
28
+ ?>
29
+ <div class="updated"><p><strong><?php _e('Changes Saved.', 'post_grid' ); ?></strong></p></div>
30
+
31
+ <?php
32
+ }
33
+ }
34
+
35
+
36
+
37
+
38
+
39
  ?>
40
 
41
 
44
 
45
  <div class="wrap">
46
 
47
+ <div id="icon-tools" class="icon32"><br></div><?php echo "<h2>".__(post_grid_plugin_name.' Settings', 'post_grid')."</h2>";?>
48
+ <form method="post" action="<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI']); ?>">
49
+ <input type="hidden" name="post_grid_hidden" value="Y">
50
+ <?php settings_fields( 'post_grid_plugin_options' );
51
+ do_settings_sections( 'post_grid_plugin_options' );
52
+
53
+ ?>
54
 
55
  <div class="para-settings post_grid-settings">
56
 
64
  <div class="option-box">
65
  <p class="option-title">Need Help ?</p>
66
  <p class="option-info">Feel free to contact with any issue for this plugin, Ask any question via forum <a href="<?php echo post_grid_qa_url; ?>"><?php echo post_grid_qa_url; ?></a> <strong style="color:#139b50;">(free)</strong><br />
 
67
 
 
 
 
 
 
 
68
  <?php
69
 
70
  if(post_grid_customer_type=="free")
87
 
88
  </p>
89
 
90
+ </div>
 
 
 
91
 
92
  <div class="option-box">
93
  <p class="option-title">Submit Reviews...</p>
129
 
130
 
131
 
132
+
133
+ <!--
134
+
135
+ <p class="submit">
136
+ <input class="button button-primary" type="submit" name="Submit" value="<?php _e('Save Changes','post_grid' ); ?>" />
137
+ </p>
138
+
139
+ -->
140
+
141
+
142
+ </form>
143
+
144
+
145
  </div>
includes/post-grid-functions.php CHANGED
@@ -1,13 +1,118 @@
1
  <?php
2
 
3
- /*
4
- * @Author ParaTheme
5
- * @Folder post-grid/includes
6
 
7
- * Copyright: 2015 ParaTheme
8
- */
9
 
10
- if ( ! defined('ABSPATH')) exit; // if direct access
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
 
13
 
@@ -55,9 +160,136 @@ function post_grid_first_embed_media($post_id ) {
55
 
56
 
57
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
 
 
 
61
 
62
 
63
 
@@ -88,6 +320,69 @@ add_filter('paginate_links', 'post_grid_fix_pagination');
88
 
89
 
90
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
  function post_grid_share_plugin()
92
  {
93
 
@@ -118,5 +413,6 @@ add_filter('paginate_links', 'post_grid_fix_pagination');
118
 
119
 
120
 
 
121
 
122
 
1
  <?php
2
 
 
 
 
3
 
 
 
4
 
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+ function post_grid_ajax_items()
15
+ {
16
+ $post_id = (int)$_POST['grid_id'];
17
+
18
+ $per_page = (int)$_POST['per_page'];
19
+ $terms = (int)$_POST['terms'];
20
+
21
+ include post_grid_plugin_dir.'/grid-items/variables.php';
22
+
23
+ $paged = (int)$_POST['paged'];
24
+ if(empty($terms))
25
+ {
26
+ $post_grid_taxonomy = '';
27
+ }
28
+ $post_grid_taxonomy_category = (int)str_replace('.','',$terms);
29
+
30
+ include post_grid_plugin_dir.'/grid-items/query.php';
31
+
32
+
33
+ $html = '';
34
+
35
+ if ( $wp_query->have_posts() ) :
36
+ $i=1;
37
+ while ( $wp_query->have_posts() ) : $wp_query->the_post();
38
+
39
+
40
+ $term_list = wp_get_post_terms(get_the_ID(), $post_grid_taxonomy, array("fields" => "all"));
41
+
42
+ $term_slug_list = '';
43
+
44
+ foreach($term_list as $term)
45
+ {
46
+ $term_slug_list .= $term->slug.' ';
47
+ }
48
+
49
+
50
+
51
+ if(get_post_format( get_the_ID() ))
52
+ {
53
+ $post_formats_class = 'post-formats';
54
+ }
55
+ else
56
+ {
57
+ $post_formats_class = '';
58
+ }
59
+
60
+ if($i%2==0)
61
+ {
62
+ $even_odd = "even";
63
+ }
64
+ else
65
+ {
66
+ $even_odd = "odd";
67
+ }
68
+
69
+
70
+
71
+ $html .= '<div class="grid-single '.$term_slug_list.' '.$post_formats_class.' '.$even_odd.'" style="max-width:'.$post_grid_items_width.';" >';
72
+ foreach($post_grid_items as $key=>$items)
73
+ {
74
+ if(!empty($post_grid_items_display[$key]))
75
+ {
76
+ include post_grid_plugin_dir.'/grid-items/'.$key.'.php';
77
+ }
78
+
79
+
80
+ }
81
+ $html .= '</div >';
82
+
83
+ $i++;
84
+
85
+ endwhile;
86
+ wp_reset_query();
87
+
88
+ else:
89
+
90
+ $html.= '<script>
91
+ jQuery(document).ready(function($)
92
+ {
93
+ $(".load-more").html("<span>No Post</span>");
94
+ $(".load-more").attr("disabled", "disabled").off("click");
95
+ $(".load-more span").css("cursor", "not-allowed");
96
+
97
+ })
98
+
99
+
100
+ </script>';
101
+
102
+ endif;
103
+
104
+ include post_grid_plugin_dir.'/grid-items/scripts.php';
105
+ echo $html;
106
+
107
+
108
+ die();
109
+
110
+
111
+ }
112
+ add_action('wp_ajax_post_grid_ajax_items', 'post_grid_ajax_items');
113
+ add_action('wp_ajax_nopriv_post_grid_ajax_items', 'post_grid_ajax_items');
114
+
115
+
116
 
117
 
118
 
160
 
161
 
162
 
163
+ function post_grid_get_all_product_ids($postid)
164
+ {
165
+
166
+ $post_grid_product_ids = get_post_meta( $postid, 'post_grid_product_ids', true );
167
+
168
+
169
+
170
+ $return_string = '';
171
+ $return_string .= '<ul style="margin: 0;">';
172
+
173
+
174
+
175
+ $args_product = array(
176
+ 'post_type' => 'product',
177
+ 'posts_per_page' => -1,
178
+ );
179
+
180
+ $product_query = new WP_Query( $args_product );
181
+
182
+ if($product_query->have_posts()): while($product_query->have_posts()): $product_query->the_post();
183
+
184
+
185
+ $return_string .= '<li><label ><input class="post_grid_product_ids" type="checkbox" name="post_grid_product_ids['.get_the_ID().']" value ="'.get_the_ID().'" ';
186
+
187
+ if ( isset( $post_grid_product_ids[get_the_ID()] ) )
188
+ {
189
+ $return_string .= "checked";
190
+ }
191
+
192
+
193
+
194
+
195
+ $return_string .= '/>';
196
+
197
+ $return_string .= get_the_title().'</label ></li>';
198
+
199
+ endwhile; endif; wp_reset_query();
200
+
201
+
202
+ $return_string .= '</ul>';
203
+ echo $return_string;
204
+
205
+ }
206
+
207
+
208
+
209
+
210
+
211
+
212
+ function post_grid_get_taxonomy_category($postid)
213
+ {
214
+
215
+
216
+
217
+ $post_grid_taxonomy = get_post_meta( $postid, 'post_grid_taxonomy', true );
218
+ if(empty($post_grid_taxonomy))
219
+ {
220
+ $post_grid_taxonomy= "";
221
+ }
222
+ $post_grid_taxonomy_category = get_post_meta( $postid, 'post_grid_taxonomy_category', true );
223
+
224
+
225
+ if(empty($post_grid_taxonomy_category))
226
+ {
227
+ $post_grid_taxonomy_category =array('none'); // an empty array when no category element selected
228
+
229
+
230
+ }
231
 
232
+
233
+
234
+ if(!isset($_POST['taxonomy']))
235
+ {
236
+ $taxonomy =$post_grid_taxonomy;
237
+ }
238
+ else
239
+ {
240
+ $taxonomy = $_POST['taxonomy'];
241
+ }
242
+
243
+
244
+ $args=array(
245
+ 'orderby' => 'name',
246
+ 'order' => 'ASC',
247
+ 'taxonomy' => $taxonomy,
248
+ );
249
+
250
+ $categories = get_categories($args);
251
+
252
+
253
+ if(empty($categories))
254
+ {
255
+ echo "No Items Found!";
256
+ }
257
+
258
+
259
+ $return_string = '';
260
+ $return_string .= '<ul style="margin: 0;">';
261
+
262
+ foreach($categories as $category){
263
+
264
+ if(array_search($category->cat_ID, $post_grid_taxonomy_category))
265
+ {
266
+ $return_string .= '<li class='.$category->cat_ID.'><label ><input class="post_grid_taxonomy_category" checked type="checkbox" name="post_grid_taxonomy_category['.$category->cat_ID.']" value ="'.$category->cat_ID.'" />'.$category->cat_name.'</label ></li>';
267
+ }
268
+
269
+ else
270
+ {
271
+ $return_string .= '<li class='.$category->cat_ID.'><label ><input class="post_grid_taxonomy_category" type="checkbox" name="post_grid_taxonomy_category['.$category->cat_ID.']" value ="'.$category->cat_ID.'" />'.$category->cat_name.'</label ></li>';
272
+ }
273
+
274
+
275
 
276
+
277
+ }
278
+
279
+ $return_string .= '</ul>';
280
+
281
+ echo $return_string;
282
+
283
+ if(isset($_POST['taxonomy']))
284
+ {
285
+ die();
286
+ }
287
+
288
+
289
+ }
290
 
291
+ add_action('wp_ajax_post_grid_get_taxonomy_category', 'post_grid_get_taxonomy_category');
292
+ add_action('wp_ajax_nopriv_post_grid_get_taxonomy_category', 'post_grid_get_taxonomy_category');
293
 
294
 
295
 
320
 
321
 
322
 
323
+
324
+
325
+
326
+
327
+
328
+
329
+
330
+
331
+
332
+
333
+
334
+
335
+
336
+
337
+
338
+
339
+
340
+
341
+
342
+
343
+
344
+
345
+
346
+
347
+
348
+
349
+
350
+
351
+
352
+
353
+
354
+ function post_grid_dark_color($input_color)
355
+ {
356
+ if(empty($input_color))
357
+ {
358
+ return "";
359
+ }
360
+ else
361
+ {
362
+ $input = $input_color;
363
+
364
+ $col = Array(
365
+ hexdec(substr($input,1,2)),
366
+ hexdec(substr($input,3,2)),
367
+ hexdec(substr($input,5,2))
368
+ );
369
+ $darker = Array(
370
+ $col[0]/2,
371
+ $col[1]/2,
372
+ $col[2]/2
373
+ );
374
+
375
+ return "#".sprintf("%02X%02X%02X", $darker[0], $darker[1], $darker[2]);
376
+ }
377
+
378
+
379
+
380
+ }
381
+
382
+
383
+
384
+
385
+
386
  function post_grid_share_plugin()
387
  {
388
 
413
 
414
 
415
 
416
+
417
 
418
 
includes/post-grid-meta.php CHANGED
@@ -1,12 +1,6 @@
1
  <?php
2
- /*
3
- * @Author ParaTheme
4
- * @Folder post-grid/includes
5
 
6
- * Copyright: 2015 ParaTheme
7
- */
8
 
9
- if ( ! defined('ABSPATH')) exit; // if direct access
10
  function post_grid_posttype_register() {
11
 
12
  $labels = array(
@@ -81,13 +75,15 @@ function meta_boxes_post_grid_input( $post ) {
81
 
82
  $post_grid_excerpt_count = get_post_meta( $post->ID, 'post_grid_excerpt_count', true );
83
  $post_grid_read_more_text = get_post_meta( $post->ID, 'post_grid_read_more_text', true );
84
-
85
  $post_grid_query_order = get_post_meta( $post->ID, 'post_grid_query_order', true );
86
- $post_grid_query_orderby = get_post_meta( $post->ID, 'post_grid_query_orderby', true );
 
87
  $post_grid_posttype = get_post_meta( $post->ID, 'post_grid_posttype', true );
88
-
89
 
90
  $post_grid_items_width = get_post_meta( $post->ID, 'post_grid_items_width', true );
 
91
  $post_grid_thumb_height = get_post_meta( $post->ID, 'post_grid_thumb_height', true );
92
 
93
  $post_grid_meta_author_display = get_post_meta( $post->ID, 'post_grid_meta_author_display', true );
@@ -101,14 +97,21 @@ function meta_boxes_post_grid_input( $post ) {
101
  $post_grid_items = get_post_meta( $post->ID, 'post_grid_items', true );
102
 
103
  $post_grid_items_display = get_post_meta( $post->ID, 'post_grid_items_display', true );
104
- $post_grid_post_meta_fields = get_post_meta( $post->ID, 'post_grid_post_meta_fields', true );
105
  $post_grid_post_title_linked = get_post_meta( $post->ID, 'post_grid_post_title_linked', true );
106
  $post_grid_post_thumbnail_linked = get_post_meta( $post->ID, 'post_grid_post_thumbnail_linked', true );
107
- $post_grid_post_thumbnail_external = get_post_meta( $post->ID, 'post_grid_post_thumbnail_external', true );
108
-
109
  $post_grid_hover_items_link_display = get_post_meta( $post->ID, 'post_grid_hover_items_link_display', true );
110
  $post_grid_hover_items_share_display = get_post_meta( $post->ID, 'post_grid_hover_items_share_display', true );
111
 
 
 
 
 
 
 
 
112
  $post_grid_hover_items_hover_effect_in = get_post_meta( $post->ID, 'post_grid_hover_items_hover_effect_in', true );
113
 
114
  $post_grid_custom_css = get_post_meta( $post->ID, 'post_grid_custom_css', true );
@@ -150,31 +153,36 @@ function meta_boxes_post_grid_input( $post ) {
150
  <div class="option-box">
151
  <p class="option-title">Display Pagination</p>
152
  <p class="option-info"></p>
 
153
  <select name="post_grid_pagination_display" >
154
  <option value="pagination" <?php if($post_grid_pagination_display=="pagination")echo "selected"; ?>>Pagination</option>
155
- <option value="no" <?php if($post_grid_pagination_display=="no")echo "selected"; ?>>No</option>
156
  </select>
157
 
158
  </div>
159
 
160
-
 
 
 
161
  <div class="option-box">
162
  <p class="option-title">Grid items width</p>
163
  <p class="option-info">Value with px, or %</p>
164
  <br>
165
  In Destop: <br>
166
- <input type="text" placeholder="ex: 250px" size="10" name="post_grid_items_width" value="<?php if(!empty($post_grid_items_width))echo $post_grid_items_width; ?>" />
167
- <br>
168
-
 
169
 
170
  </div>
171
 
172
 
173
 
174
  <div class="option-box">
175
- <p class="option-title">Grid thumbnail height</p>
176
  <p class="option-info">Value with px</p>
177
- <input type="text" placeholder="ex: 150px" size="10" name="post_grid_thumb_height" value="<?php if(!empty($post_grid_thumb_height)) echo $post_grid_thumb_height; ?>" />
178
  </div>
179
 
180
 
@@ -323,7 +331,7 @@ function meta_boxes_post_grid_input( $post ) {
323
  <div class="option-box">
324
  <p class="option-title">Empty Thumbnail</p>
325
  <p class="option-info"></p>
326
- <input type="text" name="post_grid_empty_thumb" id="post_grid_empty_thumb" value="<?php if(!empty($post_grid_empty_thumb)) echo $post_grid_empty_thumb; ?>" /><br />
327
  <input id="post_grid_empty_thumb_upload" class="post_grid_empty_thumb_upload button" type="button" value="Upload Image" />
328
  <br />
329
 
@@ -416,6 +424,9 @@ function meta_boxes_post_grid_input( $post ) {
416
  <div class="header">Post Types</div>
417
  <div class="options">
418
  <?php
 
 
 
419
  $post_types = get_post_types( '', 'names' );
420
  foreach ( $post_types as $post_type ) {
421
  if($post_type=='post')
@@ -459,7 +470,8 @@ function meta_boxes_post_grid_input( $post ) {
459
 
460
  <option value="author" <?php if($post_grid_query_orderby=="author") echo "selected"; ?>>Author</option>
461
  <option value="title" <?php if($post_grid_query_orderby=="title") echo "selected"; ?>>Title</option>
462
- <option value="name" <?php if($post_grid_query_orderby=="name") echo "selected"; ?>>Name</option> <option value="type" <?php if($post_grid_query_orderby=="type") echo "selected"; ?>>Type</option>
 
463
  </select>
464
 
465
  </div>
@@ -470,16 +482,14 @@ function meta_boxes_post_grid_input( $post ) {
470
  <div class="options">
471
 
472
  <p class="option-info">Content excerpt count</p>
473
- <input type="text" placeholder="30" name="post_grid_excerpt_count" value="<?php if(!empty($post_grid_excerpt_count)) echo $post_grid_excerpt_count; ?>" /><br />
474
 
475
  <p class="option-info">Read more Text</p>
476
  <input type="text" placeholder="Read More" name="post_grid_read_more_text" value="<?php if(!empty($post_grid_read_more_text)) echo $post_grid_read_more_text; else echo 'Read More'; ?>" />
477
 
478
  </div>
479
  </div>
480
-
481
-
482
-
483
 
484
  </div>
485
 
@@ -493,7 +503,7 @@ function meta_boxes_post_grid_input( $post ) {
493
 
494
 
495
  </li>
496
-
497
 
498
  <li style="display: none;" class="box5 tab-box ">
499
 
@@ -558,7 +568,9 @@ function meta_boxes_post_grid_input( $post ) {
558
 
559
 
560
 
561
-
 
 
562
 
563
  <?php
564
 
@@ -615,18 +627,22 @@ function meta_boxes_post_grid_save( $post_id ) {
615
 
616
  $post_grid_query_order = sanitize_text_field( $_POST['post_grid_query_order'] );
617
  $post_grid_query_orderby = sanitize_text_field( $_POST['post_grid_query_orderby'] );
 
618
 
619
- if(empty($_POST['post_grid_posttype']))
620
- {
621
- $_POST['post_grid_posttype'] = 'post';
622
  }
623
 
624
 
625
  $post_grid_posttype = stripslashes_deep( $_POST['post_grid_posttype'] );
626
 
627
 
 
 
 
628
 
629
  $post_grid_items_width = sanitize_text_field( $_POST['post_grid_items_width'] );
 
630
  $post_grid_thumb_height = sanitize_text_field( $_POST['post_grid_thumb_height'] );
631
 
632
  $post_grid_meta_author_display = sanitize_text_field( $_POST['post_grid_meta_author_display'] );
@@ -641,18 +657,24 @@ function meta_boxes_post_grid_save( $post_id ) {
641
 
642
  $post_grid_items_display = stripslashes_deep( $_POST['post_grid_items_display'] );
643
 
644
- if(empty($_POST['post_grid_post_meta_fields']))
645
- {
646
- $_POST['post_grid_post_meta_fields'] = '';
647
- }
648
- $post_grid_post_meta_fields = sanitize_text_field( $_POST['post_grid_post_meta_fields'] );
649
  $post_grid_post_title_linked = sanitize_text_field( $_POST['post_grid_post_title_linked'] );
650
  $post_grid_post_thumbnail_linked = sanitize_text_field( $_POST['post_grid_post_thumbnail_linked'] );
651
- $post_grid_post_thumbnail_external = sanitize_text_field( $_POST['post_grid_post_thumbnail_external'] );
652
 
 
 
653
  $post_grid_hover_items_link_display = sanitize_text_field( $_POST['post_grid_hover_items_link_display'] );
654
  $post_grid_hover_items_share_display = sanitize_text_field( $_POST['post_grid_hover_items_share_display'] );
655
 
 
 
 
 
 
 
 
 
656
  $post_grid_hover_items_hover_effect_in = sanitize_text_field( $_POST['post_grid_hover_items_hover_effect_in'] );
657
 
658
  $post_grid_custom_css = sanitize_text_field( $_POST['post_grid_custom_css'] );
@@ -670,14 +692,14 @@ function meta_boxes_post_grid_save( $post_id ) {
670
 
671
  update_post_meta( $post_id, 'post_grid_excerpt_count', $post_grid_excerpt_count );
672
  update_post_meta( $post_id, 'post_grid_read_more_text', $post_grid_read_more_text );
673
-
674
 
675
  update_post_meta( $post_id, 'post_grid_query_order', $post_grid_query_order );
676
- update_post_meta( $post_id, 'post_grid_query_orderby', $post_grid_query_orderby );
677
  update_post_meta( $post_id, 'post_grid_posttype', $post_grid_posttype );
678
 
679
 
680
  update_post_meta( $post_id, 'post_grid_items_width', $post_grid_items_width );
 
681
  update_post_meta( $post_id, 'post_grid_thumb_height', $post_grid_thumb_height );
682
 
683
  update_post_meta( $post_id, 'post_grid_meta_author_display', $post_grid_meta_author_display );
@@ -691,14 +713,22 @@ function meta_boxes_post_grid_save( $post_id ) {
691
  update_post_meta( $post_id, 'post_grid_items', $post_grid_items );
692
 
693
  update_post_meta( $post_id, 'post_grid_items_display', $post_grid_items_display );
694
- update_post_meta( $post_id, 'post_grid_post_meta_fields', $post_grid_post_meta_fields );
695
  update_post_meta( $post_id, 'post_grid_post_title_linked', $post_grid_post_title_linked );
696
  update_post_meta( $post_id, 'post_grid_post_thumbnail_linked', $post_grid_post_thumbnail_linked );
697
- update_post_meta( $post_id, 'post_grid_post_thumbnail_external', $post_grid_post_thumbnail_external );
698
-
 
699
  update_post_meta( $post_id, 'post_grid_hover_items_link_display', $post_grid_hover_items_link_display );
700
  update_post_meta( $post_id, 'post_grid_hover_items_share_display', $post_grid_hover_items_share_display );
 
 
 
 
 
 
701
 
 
702
  update_post_meta( $post_id, 'post_grid_hover_items_hover_effect_in', $post_grid_hover_items_hover_effect_in );
703
  update_post_meta( $post_id, 'post_grid_custom_css', $post_grid_custom_css );
704
 
1
  <?php
 
 
 
2
 
 
 
3
 
 
4
  function post_grid_posttype_register() {
5
 
6
  $labels = array(
75
 
76
  $post_grid_excerpt_count = get_post_meta( $post->ID, 'post_grid_excerpt_count', true );
77
  $post_grid_read_more_text = get_post_meta( $post->ID, 'post_grid_read_more_text', true );
78
+
79
  $post_grid_query_order = get_post_meta( $post->ID, 'post_grid_query_order', true );
80
+ $post_grid_query_orderby = get_post_meta( $post->ID, 'post_grid_query_orderby', true );
81
+
82
  $post_grid_posttype = get_post_meta( $post->ID, 'post_grid_posttype', true );
83
+
84
 
85
  $post_grid_items_width = get_post_meta( $post->ID, 'post_grid_items_width', true );
86
+ $post_grid_items_width_mobile = get_post_meta( $post->ID, 'post_grid_items_width_mobile', true );
87
  $post_grid_thumb_height = get_post_meta( $post->ID, 'post_grid_thumb_height', true );
88
 
89
  $post_grid_meta_author_display = get_post_meta( $post->ID, 'post_grid_meta_author_display', true );
97
  $post_grid_items = get_post_meta( $post->ID, 'post_grid_items', true );
98
 
99
  $post_grid_items_display = get_post_meta( $post->ID, 'post_grid_items_display', true );
100
+
101
  $post_grid_post_title_linked = get_post_meta( $post->ID, 'post_grid_post_title_linked', true );
102
  $post_grid_post_thumbnail_linked = get_post_meta( $post->ID, 'post_grid_post_thumbnail_linked', true );
103
+
104
+ $post_grid_hover_items_zoom_display = get_post_meta( $post->ID, 'post_grid_hover_items_zoom_display', true );
105
  $post_grid_hover_items_link_display = get_post_meta( $post->ID, 'post_grid_hover_items_link_display', true );
106
  $post_grid_hover_items_share_display = get_post_meta( $post->ID, 'post_grid_hover_items_share_display', true );
107
 
108
+ $post_grid_title_color = get_post_meta( $post->ID, 'post_grid_title_color', true );
109
+ $post_grid_title_font_size = get_post_meta( $post->ID, 'post_grid_title_font_size', true );
110
+
111
+ $post_grid_content_color = get_post_meta( $post->ID, 'post_grid_content_color', true );
112
+ $post_grid_content_font_size = get_post_meta( $post->ID, 'post_grid_content_font_size', true );
113
+
114
+
115
  $post_grid_hover_items_hover_effect_in = get_post_meta( $post->ID, 'post_grid_hover_items_hover_effect_in', true );
116
 
117
  $post_grid_custom_css = get_post_meta( $post->ID, 'post_grid_custom_css', true );
153
  <div class="option-box">
154
  <p class="option-title">Display Pagination</p>
155
  <p class="option-info"></p>
156
+
157
  <select name="post_grid_pagination_display" >
158
  <option value="pagination" <?php if($post_grid_pagination_display=="pagination")echo "selected"; ?>>Pagination</option>
159
+ <option value="no" <?php if($post_grid_pagination_display=="no")echo "selected"; ?>>No</option>
160
  </select>
161
 
162
  </div>
163
 
164
+
165
+
166
+
167
+
168
  <div class="option-box">
169
  <p class="option-title">Grid items width</p>
170
  <p class="option-info">Value with px, or %</p>
171
  <br>
172
  In Destop: <br>
173
+ <input type="text" placeholder="ex: 250px" size="10" name="post_grid_items_width" value="<?php if(!empty($post_grid_items_width))echo $post_grid_items_width; else echo '300px'; ?>" />
174
+ <br><br>
175
+ In Mobile & Tabs: <br>
176
+ <input type="text" placeholder="ex: 250px" size="10" name="post_grid_items_width_mobile" value="<?php if(!empty($post_grid_items_width_mobile))echo $post_grid_items_width_mobile; else echo '80%'; ?>" />
177
 
178
  </div>
179
 
180
 
181
 
182
  <div class="option-box">
183
+ <p class="option-title">Grid thumbnail max height</p>
184
  <p class="option-info">Value with px</p>
185
+ <input type="text" placeholder="ex: 150px" size="10" name="post_grid_thumb_height" value="<?php if(!empty($post_grid_thumb_height)) echo $post_grid_thumb_height; else echo '1000px'; ?>" />
186
  </div>
187
 
188
 
331
  <div class="option-box">
332
  <p class="option-title">Empty Thumbnail</p>
333
  <p class="option-info"></p>
334
+ <input type="text" name="post_grid_empty_thumb" id="post_grid_empty_thumb" value="<?php if(!empty($post_grid_empty_thumb)) echo $post_grid_empty_thumb; else echo post_grid_plugin_url.'css/no-thumb.png'; ?>" /><br />
335
  <input id="post_grid_empty_thumb_upload" class="post_grid_empty_thumb_upload button" type="button" value="Upload Image" />
336
  <br />
337
 
424
  <div class="header">Post Types</div>
425
  <div class="options">
426
  <?php
427
+
428
+
429
+
430
  $post_types = get_post_types( '', 'names' );
431
  foreach ( $post_types as $post_type ) {
432
  if($post_type=='post')
470
 
471
  <option value="author" <?php if($post_grid_query_orderby=="author") echo "selected"; ?>>Author</option>
472
  <option value="title" <?php if($post_grid_query_orderby=="title") echo "selected"; ?>>Title</option>
473
+ <option value="name" <?php if($post_grid_query_orderby=="name") echo "selected"; ?>>Name</option>
474
+ <option value="type" <?php if($post_grid_query_orderby=="type") echo "selected"; ?>>Type</option>
475
  </select>
476
 
477
  </div>
482
  <div class="options">
483
 
484
  <p class="option-info">Content excerpt count</p>
485
+ <input type="text" placeholder="30" name="post_grid_excerpt_count" value="<?php if(!empty($post_grid_excerpt_count)) echo $post_grid_excerpt_count; else echo 30; ?>" /><br />
486
 
487
  <p class="option-info">Read more Text</p>
488
  <input type="text" placeholder="Read More" name="post_grid_read_more_text" value="<?php if(!empty($post_grid_read_more_text)) echo $post_grid_read_more_text; else echo 'Read More'; ?>" />
489
 
490
  </div>
491
  </div>
492
+
 
 
493
 
494
  </div>
495
 
503
 
504
 
505
  </li>
506
+
507
 
508
  <li style="display: none;" class="box5 tab-box ">
509
 
568
 
569
 
570
 
571
+
572
+
573
+
574
 
575
  <?php
576
 
627
 
628
  $post_grid_query_order = sanitize_text_field( $_POST['post_grid_query_order'] );
629
  $post_grid_query_orderby = sanitize_text_field( $_POST['post_grid_query_orderby'] );
630
+
631
 
632
+ if(empty($_POST['post_grid_posttype'])){
633
+ $_POST['post_grid_posttype'] = array();
 
634
  }
635
 
636
 
637
  $post_grid_posttype = stripslashes_deep( $_POST['post_grid_posttype'] );
638
 
639
 
640
+
641
+
642
+
643
 
644
  $post_grid_items_width = sanitize_text_field( $_POST['post_grid_items_width'] );
645
+ $post_grid_items_width_mobile = sanitize_text_field( $_POST['post_grid_items_width_mobile'] );
646
  $post_grid_thumb_height = sanitize_text_field( $_POST['post_grid_thumb_height'] );
647
 
648
  $post_grid_meta_author_display = sanitize_text_field( $_POST['post_grid_meta_author_display'] );
657
 
658
  $post_grid_items_display = stripslashes_deep( $_POST['post_grid_items_display'] );
659
 
660
+
661
+
 
 
 
662
  $post_grid_post_title_linked = sanitize_text_field( $_POST['post_grid_post_title_linked'] );
663
  $post_grid_post_thumbnail_linked = sanitize_text_field( $_POST['post_grid_post_thumbnail_linked'] );
 
664
 
665
+
666
+ $post_grid_hover_items_zoom_display = sanitize_text_field( $_POST['post_grid_hover_items_zoom_display'] );
667
  $post_grid_hover_items_link_display = sanitize_text_field( $_POST['post_grid_hover_items_link_display'] );
668
  $post_grid_hover_items_share_display = sanitize_text_field( $_POST['post_grid_hover_items_share_display'] );
669
 
670
+ $post_grid_title_color = sanitize_text_field( $_POST['post_grid_title_color'] );
671
+ $post_grid_title_font_size = sanitize_text_field( $_POST['post_grid_title_font_size'] );
672
+
673
+ $post_grid_content_color = sanitize_text_field( $_POST['post_grid_content_color'] );
674
+ $post_grid_content_font_size = sanitize_text_field( $_POST['post_grid_content_font_size'] );
675
+
676
+
677
+
678
  $post_grid_hover_items_hover_effect_in = sanitize_text_field( $_POST['post_grid_hover_items_hover_effect_in'] );
679
 
680
  $post_grid_custom_css = sanitize_text_field( $_POST['post_grid_custom_css'] );
692
 
693
  update_post_meta( $post_id, 'post_grid_excerpt_count', $post_grid_excerpt_count );
694
  update_post_meta( $post_id, 'post_grid_read_more_text', $post_grid_read_more_text );
 
695
 
696
  update_post_meta( $post_id, 'post_grid_query_order', $post_grid_query_order );
697
+ update_post_meta( $post_id, 'post_grid_query_orderby', $post_grid_query_orderby );
698
  update_post_meta( $post_id, 'post_grid_posttype', $post_grid_posttype );
699
 
700
 
701
  update_post_meta( $post_id, 'post_grid_items_width', $post_grid_items_width );
702
+ update_post_meta( $post_id, 'post_grid_items_width_mobile', $post_grid_items_width_mobile );
703
  update_post_meta( $post_id, 'post_grid_thumb_height', $post_grid_thumb_height );
704
 
705
  update_post_meta( $post_id, 'post_grid_meta_author_display', $post_grid_meta_author_display );
713
  update_post_meta( $post_id, 'post_grid_items', $post_grid_items );
714
 
715
  update_post_meta( $post_id, 'post_grid_items_display', $post_grid_items_display );
716
+
717
  update_post_meta( $post_id, 'post_grid_post_title_linked', $post_grid_post_title_linked );
718
  update_post_meta( $post_id, 'post_grid_post_thumbnail_linked', $post_grid_post_thumbnail_linked );
719
+
720
+
721
+ update_post_meta( $post_id, 'post_grid_hover_items_zoom_display', $post_grid_hover_items_zoom_display );
722
  update_post_meta( $post_id, 'post_grid_hover_items_link_display', $post_grid_hover_items_link_display );
723
  update_post_meta( $post_id, 'post_grid_hover_items_share_display', $post_grid_hover_items_share_display );
724
+
725
+ update_post_meta( $post_id, 'post_grid_title_color', $post_grid_title_color );
726
+ update_post_meta( $post_id, 'post_grid_title_font_size', $post_grid_title_font_size );
727
+
728
+ update_post_meta( $post_id, 'post_grid_content_color', $post_grid_content_color );
729
+ update_post_meta( $post_id, 'post_grid_content_font_size', $post_grid_content_font_size );
730
 
731
+
732
  update_post_meta( $post_id, 'post_grid_hover_items_hover_effect_in', $post_grid_hover_items_hover_effect_in );
733
  update_post_meta( $post_id, 'post_grid_custom_css', $post_grid_custom_css );
734
 
post-grid.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Post Grid
4
  Plugin URI: http://paratheme.com
5
  Description: Awesome post grid for query post from any post-type and display on grid.
6
- Version: 1.7
7
  Author: paratheme
8
  Author URI: http://paratheme.com
9
  License: GPLv2 or later
@@ -27,8 +27,8 @@ class PostGrid{
27
  define('post_grid_conatct_url', 'http://paratheme.com/contact/' );
28
  define('post_grid_qa_url', 'http://paratheme.com/qa/' );
29
  define('post_grid_plugin_name', 'Post Grid' );
30
- define('post_grid_version', '1.7' );
31
- define('post_grid_customer_type', 'free' );
32
 
33
  define('post_grid_share_url', 'https://wordpress.org/plugins/post-grid/' );
34
  define('post_grid_tutorial_video_url', '//www.youtube.com/embed/JsDfu6LXtj4' );
@@ -81,7 +81,12 @@ class PostGrid{
81
  wp_enqueue_style('post_grid_style', post_grid_plugin_url.'css/style.css');
82
  wp_enqueue_script('post_grid_scripts', plugins_url( '/js/scripts.js' , __FILE__ ) , array( 'jquery' ));
83
  wp_localize_script('post_grid_scripts', 'post_grid_ajax', array( 'post_grid_ajaxurl' => admin_url( 'admin-ajax.php')));
84
- wp_enqueue_script('masonry.pkgd.min', plugins_url( '/js/masonry.pkgd.min.js' , __FILE__ ) , array( 'jquery' ));
 
 
 
 
 
85
  wp_enqueue_script('owl.carousel', plugins_url( '/js/owl.carousel.js' , __FILE__ ) , array( 'jquery' ));
86
  wp_enqueue_style('owl.carousel', post_grid_plugin_url.'css/owl.carousel.css');
87
  wp_enqueue_style('owl.theme', post_grid_plugin_url.'css/owl.theme.css');
3
  Plugin Name: Post Grid
4
  Plugin URI: http://paratheme.com
5
  Description: Awesome post grid for query post from any post-type and display on grid.
6
+ Version: 1.8
7
  Author: paratheme
8
  Author URI: http://paratheme.com
9
  License: GPLv2 or later
27
  define('post_grid_conatct_url', 'http://paratheme.com/contact/' );
28
  define('post_grid_qa_url', 'http://paratheme.com/qa/' );
29
  define('post_grid_plugin_name', 'Post Grid' );
30
+ define('post_grid_version', '1.8' );
31
+ define('post_grid_customer_type', 'free' ); // pro & free
32
 
33
  define('post_grid_share_url', 'https://wordpress.org/plugins/post-grid/' );
34
  define('post_grid_tutorial_video_url', '//www.youtube.com/embed/JsDfu6LXtj4' );
81
  wp_enqueue_style('post_grid_style', post_grid_plugin_url.'css/style.css');
82
  wp_enqueue_script('post_grid_scripts', plugins_url( '/js/scripts.js' , __FILE__ ) , array( 'jquery' ));
83
  wp_localize_script('post_grid_scripts', 'post_grid_ajax', array( 'post_grid_ajaxurl' => admin_url( 'admin-ajax.php')));
84
+ //wp_enqueue_script('masonry.pkgd.min', plugins_url( '/js/masonry.pkgd.min.js' , __FILE__ ) , array( 'jquery' ));
85
+ //wp_enqueue_script('jquery.mixitup.min', plugins_url( '/js/jquery.mixitup.min.js' , __FILE__ ) , array( 'jquery' ));
86
+ //wp_enqueue_script('jquery.mixitup-pagination', plugins_url( '/js/jquery.mixitup-pagination.js' , __FILE__ ) , array( 'jquery' ));
87
+
88
+ //wp_enqueue_script('isotope.pkgd.min', plugins_url( '/js/isotope.pkgd.min.js' , __FILE__ ) , array( 'jquery' ));
89
+
90
  wp_enqueue_script('owl.carousel', plugins_url( '/js/owl.carousel.js' , __FILE__ ) , array( 'jquery' ));
91
  wp_enqueue_style('owl.carousel', post_grid_plugin_url.'css/owl.carousel.css');
92
  wp_enqueue_style('owl.theme', post_grid_plugin_url.'css/owl.theme.css');
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
- === Post Grid ===
2
  Contributors: paratheme
3
  Donate link: http://paratheme.com
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: 4.2.4
7
- Stable tag: 1.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -96,6 +96,9 @@ then paste this shortcode anywhere in your page to display grid<br />
96
  == Changelog ==
97
 
98
 
 
 
 
99
  = 1.7 =
100
  * 13/05/2015 fix- license issue fixed.
101
 
1
+ === Post Grid ===
2
  Contributors: paratheme
3
  Donate link: http://paratheme.com
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: 4.3.1
7
+ Stable tag: 1.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
96
  == Changelog ==
97
 
98
 
99
+ = 1.8 =
100
+ * 01/10/2015 add- added soem premium features.
101
+
102
  = 1.7 =
103
  * 13/05/2015 fix- license issue fixed.
104