Addons for Elementor - Version 7.1.2

Version Description

  • Added - Posts Grid, Posts Slider, Posts Carousel, Posts Multislider and Posts Gridbox Slider modules now let you exclude specific posts from the posts query
Download this release

Release Info

Developer livemesh
Plugin Icon 128x128 Addons for Elementor
Version 7.1.2
Comparing to
See all releases

Code changes from version 7.1.1 to 7.1.2

addons-for-elementor.php CHANGED
@@ -8,7 +8,7 @@
8
  * Author URI: https://livemeshelementor.com
9
  * License: GPL3
10
  * License URI: https://www.gnu.org/licenses/gpl-3.0.txt
11
- * Version: 7.1.1
12
  * Text Domain: livemesh-el-addons
13
  * Domain Path: languages
14
  * Elementor tested up to: 3.5.0
@@ -37,7 +37,7 @@ if ( !defined( 'ABSPATH' ) ) {
37
 
38
  if ( !function_exists( 'lae_fs' ) ) {
39
  // Plugin version
40
- define( 'LAE_VERSION', '7.1.1' );
41
  // Plugin Root File
42
  define( 'LAE_PLUGIN_FILE', __FILE__ );
43
  // Plugin Folder Path
8
  * Author URI: https://livemeshelementor.com
9
  * License: GPL3
10
  * License URI: https://www.gnu.org/licenses/gpl-3.0.txt
11
+ * Version: 7.1.2
12
  * Text Domain: livemesh-el-addons
13
  * Domain Path: languages
14
  * Elementor tested up to: 3.5.0
37
 
38
  if ( !function_exists( 'lae_fs' ) ) {
39
  // Plugin version
40
+ define( 'LAE_VERSION', '7.1.2' );
41
  // Plugin Root File
42
  define( 'LAE_PLUGIN_FILE', __FILE__ );
43
  // Plugin Folder Path
includes/query-functions.php CHANGED
@@ -48,6 +48,12 @@ function lae_build_query_args($settings) {
48
  $related_post_id = is_singular() && ($post_id !== 0) ? $post_id : null;
49
  $query_args['post_type'] = get_post_type($related_post_id);
50
 
 
 
 
 
 
 
51
  if ($related_post_id) {
52
  $post_not_in = isset($query_args['post__not_in']) ? $query_args['post__not_in'] : [];
53
  $post_not_in[] = $related_post_id;
@@ -101,6 +107,12 @@ function lae_build_query_args($settings) {
101
  $query_args['post_type'] = $settings['post_types'];
102
  }
103
 
 
 
 
 
 
 
104
  if (!empty($settings['tax_query'])) {
105
  $tax_queries = $settings['tax_query'];
106
 
48
  $related_post_id = is_singular() && ($post_id !== 0) ? $post_id : null;
49
  $query_args['post_type'] = get_post_type($related_post_id);
50
 
51
+ $exclude_posts = $settings['exclude_posts'];
52
+ if (!empty($exclude_posts)) {
53
+ $query_args['post__not_in'] = explode(',', $exclude_posts);
54
+ $query_args['post__not_in'] = array_map('intval', $query_args['post__not_in']);
55
+ }
56
+
57
  if ($related_post_id) {
58
  $post_not_in = isset($query_args['post__not_in']) ? $query_args['post__not_in'] : [];
59
  $post_not_in[] = $related_post_id;
107
  $query_args['post_type'] = $settings['post_types'];
108
  }
109
 
110
+ $exclude_posts = $settings['exclude_posts'];
111
+ if (!empty($exclude_posts)) {
112
+ $query_args['post__not_in'] = explode(',', $exclude_posts);
113
+ $query_args['post__not_in'] = array_map('intval', $query_args['post__not_in']);
114
+ }
115
+
116
  if (!empty($settings['tax_query'])) {
117
  $tax_queries = $settings['tax_query'];
118
 
includes/widgets/portfolio.php CHANGED
@@ -161,6 +161,14 @@ class LAE_Portfolio_Widget extends LAE_Widget_Base
161
  'query_type' => [ 'custom_query', 'related' ],
162
  ],
163
  ] );
 
 
 
 
 
 
 
 
164
  $this->add_control( 'offset', [
165
  'label' => __( 'Offset', 'livemesh-el-addons' ),
166
  'description' => __( 'Number of posts to skip or pass over.', 'livemesh-el-addons' ),
161
  'query_type' => [ 'custom_query', 'related' ],
162
  ],
163
  ] );
164
+ $this->add_control( 'exclude_posts', [
165
+ 'label' => __( 'Exclude Posts', 'livemesh-el-addons' ),
166
+ 'description' => __( 'Provide a comma separated list of Post IDs to exclude in the grid.', 'livemesh-el-addons' ),
167
+ 'type' => Controls_Manager::TEXT,
168
+ 'condition' => [
169
+ 'query_type' => [ 'custom_query', 'related' ],
170
+ ],
171
+ ] );
172
  $this->add_control( 'offset', [
173
  'label' => __( 'Offset', 'livemesh-el-addons' ),
174
  'description' => __( 'Number of posts to skip or pass over.', 'livemesh-el-addons' ),
includes/widgets/posts-carousel.php CHANGED
@@ -162,6 +162,14 @@ class LAE_Posts_Carousel_Widget extends LAE_Widget_Base
162
  'query_type' => [ 'custom_query', 'related' ],
163
  ],
164
  ] );
 
 
 
 
 
 
 
 
165
  $this->add_control( 'offset', [
166
  'label' => __( 'Offset', 'livemesh-el-addons' ),
167
  'description' => __( 'Number of posts to skip or pass over.', 'livemesh-el-addons' ),
162
  'query_type' => [ 'custom_query', 'related' ],
163
  ],
164
  ] );
165
+ $this->add_control( 'exclude_posts', [
166
+ 'label' => __( 'Exclude Posts', 'livemesh-el-addons' ),
167
+ 'description' => __( 'Provide a comma separated list of Post IDs to exclude in the carousel.', 'livemesh-el-addons' ),
168
+ 'type' => Controls_Manager::TEXT,
169
+ 'condition' => [
170
+ 'query_type' => [ 'custom_query', 'related' ],
171
+ ],
172
+ ] );
173
  $this->add_control( 'offset', [
174
  'label' => __( 'Offset', 'livemesh-el-addons' ),
175
  'description' => __( 'Number of posts to skip or pass over.', 'livemesh-el-addons' ),
includes/widgets/posts-gridbox-slider.php CHANGED
@@ -157,6 +157,14 @@ class LAE_Posts_GridBox_Slider_Widget extends LAE_Widget_Base
157
  'query_type' => [ 'custom_query', 'related' ],
158
  ],
159
  ] );
 
 
 
 
 
 
 
 
160
  $this->add_control( 'offset', [
161
  'label' => __( 'Offset', 'livemesh-el-addons' ),
162
  'description' => __( 'Number of posts to skip or pass over.', 'livemesh-el-addons' ),
157
  'query_type' => [ 'custom_query', 'related' ],
158
  ],
159
  ] );
160
+ $this->add_control( 'exclude_posts', [
161
+ 'label' => __( 'Exclude Posts', 'livemesh-el-addons' ),
162
+ 'description' => __( 'Provide a comma separated list of Post IDs to exclude in the slider.', 'livemesh-el-addons' ),
163
+ 'type' => Controls_Manager::TEXT,
164
+ 'condition' => [
165
+ 'query_type' => [ 'custom_query', 'related' ],
166
+ ],
167
+ ] );
168
  $this->add_control( 'offset', [
169
  'label' => __( 'Offset', 'livemesh-el-addons' ),
170
  'description' => __( 'Number of posts to skip or pass over.', 'livemesh-el-addons' ),
includes/widgets/posts-multislider.php CHANGED
@@ -162,6 +162,14 @@ class LAE_Posts_Multislider_Widget extends LAE_Widget_Base
162
  'query_type' => [ 'custom_query', 'related' ],
163
  ],
164
  ] );
 
 
 
 
 
 
 
 
165
  $this->add_control( 'offset', [
166
  'label' => __( 'Offset', 'livemesh-el-addons' ),
167
  'description' => __( 'Number of posts to skip or pass over.', 'livemesh-el-addons' ),
162
  'query_type' => [ 'custom_query', 'related' ],
163
  ],
164
  ] );
165
+ $this->add_control( 'exclude_posts', [
166
+ 'label' => __( 'Exclude Posts', 'livemesh-el-addons' ),
167
+ 'description' => __( 'Provide a comma separated list of Post IDs to exclude in the slider.', 'livemesh-el-addons' ),
168
+ 'type' => Controls_Manager::TEXT,
169
+ 'condition' => [
170
+ 'query_type' => [ 'custom_query', 'related' ],
171
+ ],
172
+ ] );
173
  $this->add_control( 'offset', [
174
  'label' => __( 'Offset', 'livemesh-el-addons' ),
175
  'description' => __( 'Number of posts to skip or pass over.', 'livemesh-el-addons' ),
includes/widgets/posts-slider.php CHANGED
@@ -156,6 +156,14 @@ class LAE_Posts_Slider_Widget extends LAE_Widget_Base
156
  'query_type' => [ 'custom_query', 'related' ],
157
  ],
158
  ] );
 
 
 
 
 
 
 
 
159
  $this->add_control( 'offset', [
160
  'label' => __( 'Offset', 'livemesh-el-addons' ),
161
  'description' => __( 'Number of posts to skip or pass over.', 'livemesh-el-addons' ),
156
  'query_type' => [ 'custom_query', 'related' ],
157
  ],
158
  ] );
159
+ $this->add_control( 'exclude_posts', [
160
+ 'label' => __( 'Exclude Posts', 'livemesh-el-addons' ),
161
+ 'description' => __( 'Provide a comma separated list of Post IDs to exclude in the slider.', 'livemesh-el-addons' ),
162
+ 'type' => Controls_Manager::TEXT,
163
+ 'condition' => [
164
+ 'query_type' => [ 'custom_query', 'related' ],
165
+ ],
166
+ ] );
167
  $this->add_control( 'offset', [
168
  'label' => __( 'Offset', 'livemesh-el-addons' ),
169
  'description' => __( 'Number of posts to skip or pass over.', 'livemesh-el-addons' ),
plugin.php CHANGED
@@ -45,7 +45,7 @@ if ( !class_exists( 'Livemesh_Elementor_Addons' ) ) {
45
  public function __clone()
46
  {
47
  // Cloning instances of the class is forbidden
48
- _doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'livemesh-el-addons' ), '7.1.1' );
49
  }
50
 
51
  /**
@@ -55,7 +55,7 @@ if ( !class_exists( 'Livemesh_Elementor_Addons' ) ) {
55
  public function __wakeup()
56
  {
57
  // Unserializing instances of the class is forbidden
58
- _doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'livemesh-el-addons' ), '7.1.1' );
59
  }
60
 
61
  private function setup_debug_constants()
45
  public function __clone()
46
  {
47
  // Cloning instances of the class is forbidden
48
+ _doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'livemesh-el-addons' ), '7.1.2' );
49
  }
50
 
51
  /**
55
  public function __wakeup()
56
  {
57
  // Unserializing instances of the class is forbidden
58
+ _doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'livemesh-el-addons' ), '7.1.2' );
59
  }
60
 
61
  private function setup_debug_constants()
readme.txt CHANGED
@@ -7,7 +7,7 @@ Tags: elementor, elementor addons, elementor extensions, elementor widgets, page
7
  Requires at least: 5.0
8
  Tested up to: 5.8
9
  Requires PHP: 5.6
10
- Stable Tag: 7.1.1
11
  License: GPLv3
12
  License URI: https://opensource.org/licenses/GPL-3.0
13
 
@@ -259,6 +259,9 @@ Email us at support[at]livemeshthemes.com and we will be happy to assist you.
259
 
260
 
261
 
 
 
 
262
  = 7.1.1 =
263
  * Fixed - Livemesh Item and Livemesh Grid instances not being listed in the theme builder
264
 
7
  Requires at least: 5.0
8
  Tested up to: 5.8
9
  Requires PHP: 5.6
10
+ Stable Tag: 7.1.2
11
  License: GPLv3
12
  License URI: https://opensource.org/licenses/GPL-3.0
13
 
259
 
260
 
261
 
262
+ = 7.1.2 =
263
+ * Added - Posts Grid, Posts Slider, Posts Carousel, Posts Multislider and Posts Gridbox Slider modules now let you exclude specific posts from the posts query
264
+
265
  = 7.1.1 =
266
  * Fixed - Livemesh Item and Livemesh Grid instances not being listed in the theme builder
267