Dynamic Conditions - Version 1.5.1b

Version Description

Download this release

Release Info

Developer rtowebsites
Plugin Icon wp plugin Dynamic Conditions
Version 1.5.1b
Comparing to
See all releases

Code changes from version 1.5.0 to 1.5.1b

Public/DynamicConditionsPublic.php CHANGED
@@ -62,7 +62,7 @@ class DynamicConditionsPublic {
62
 
63
  private static $debugCssRendered = false;
64
 
65
- private $shortcodeTags;
66
 
67
  /**
68
  * Initialize the class and set its properties.
@@ -319,7 +319,7 @@ class DynamicConditionsPublic {
319
  $section->dynamicConditionSettings = $settings;
320
 
321
  //prevent shortcodes from execution
322
- $this->shortcodeTags = $GLOBALS['shortcode_tags'];
323
  $GLOBALS['shortcode_tags'] = [];
324
 
325
  ob_start();
@@ -331,6 +331,8 @@ class DynamicConditionsPublic {
331
  * @param Element_Base $section
332
  */
333
  public function filterSectionContentAfter( $section ) {
 
 
334
  if ( empty( $section ) || empty( $section->dynamicConditionIsHidden ) ) {
335
  return;
336
  }
@@ -339,8 +341,6 @@ class DynamicConditionsPublic {
339
 
340
  $type = $section->get_type();
341
  $settings = $section->dynamicConditionSettings;
342
- // reset shortcode tags
343
- $GLOBALS['shortcode_tags'] = $this->shortcodeTags;
344
 
345
  if ( !empty( $settings['dynamicconditions_hideContentOnly'] ) ) {
346
  // render wrapper
@@ -752,7 +752,7 @@ class DynamicConditionsPublic {
752
  * @return string
753
  */
754
  private function getMode() {
755
- if ( !class_exists('Elementor\Plugin') ) {
756
  return;
757
  }
758
 
62
 
63
  private static $debugCssRendered = false;
64
 
65
+ private $shortcodeTags = [];
66
 
67
  /**
68
  * Initialize the class and set its properties.
319
  $section->dynamicConditionSettings = $settings;
320
 
321
  //prevent shortcodes from execution
322
+ $this->shortcodeTags += $GLOBALS['shortcode_tags'];
323
  $GLOBALS['shortcode_tags'] = [];
324
 
325
  ob_start();
331
  * @param Element_Base $section
332
  */
333
  public function filterSectionContentAfter( $section ) {
334
+ // reset shortcode tags
335
+ $GLOBALS['shortcode_tags'] += $this->shortcodeTags;
336
  if ( empty( $section ) || empty( $section->dynamicConditionIsHidden ) ) {
337
  return;
338
  }
341
 
342
  $type = $section->get_type();
343
  $settings = $section->dynamicConditionSettings;
 
 
344
 
345
  if ( !empty( $settings['dynamicconditions_hideContentOnly'] ) ) {
346
  // render wrapper
752
  * @return string
753
  */
754
  private function getMode() {
755
+ if ( !class_exists( 'Elementor\Plugin' ) ) {
756
  return;
757
  }
758
 
README.txt CHANGED
@@ -27,7 +27,7 @@ https://www.youtube.com/watch?v=bRqW4Oaxtls
27
 
28
  You can support development by contributing to the plugin´s GitHub repository:
29
 
30
- https://github.com/RTO-Websites/dynamic-conditions
31
 
32
  = Usage =
33
 
@@ -41,23 +41,23 @@ https://github.com/RTO-Websites/dynamic-conditions
41
  8. At last you have to enter the value to compare the dynamic-field with. Or two values, if you have selected the "between" condition.
42
 
43
  == Frequently Asked Questions ==
44
- = Can I use custom-fields, ACF fields, Pods ? =
45
  Yes, all the above are supported and many others supported out-of-the-box by Elementor Pro.
46
 
47
- = Can I set date based conditions ? =
48
  Yes, the plugin supports date based conditions, for example current-date or post-date. You can compare dates, days and months.
49
 
50
  = Can I show/hide elements for logged-in or logged-out users? =
51
  Yes, you can set display conditions for logged in or logged out users. Selecting the "user information" dynamic-tag, and set it to "user ID". Now check if it is empty or not.
52
 
53
- = Are my elements only hidden or fully removed =
54
  The elements will be fully removed from source code, like they are not existing.
55
  Only if you use the experts options to hide also wrappers or other elements, they will only be hidden with css.
56
 
57
- = I´m missing some dynamic tags
58
  We have developed an other plugin which provides some useful tags.
59
  You can find it here:
60
- https://wordpress.org/plugins/dynamictags/
61
 
62
 
63
  == Screenshots ==
27
 
28
  You can support development by contributing to the plugin´s GitHub repository:
29
 
30
+ [Github Dynamic Conditions](https://github.com/RTO-Websites/dynamic-conditions)
31
 
32
  = Usage =
33
 
41
  8. At last you have to enter the value to compare the dynamic-field with. Or two values, if you have selected the "between" condition.
42
 
43
  == Frequently Asked Questions ==
44
+ = Can I use custom-fields, ACF fields, Pods? =
45
  Yes, all the above are supported and many others supported out-of-the-box by Elementor Pro.
46
 
47
+ = Can I set date based conditions? =
48
  Yes, the plugin supports date based conditions, for example current-date or post-date. You can compare dates, days and months.
49
 
50
  = Can I show/hide elements for logged-in or logged-out users? =
51
  Yes, you can set display conditions for logged in or logged out users. Selecting the "user information" dynamic-tag, and set it to "user ID". Now check if it is empty or not.
52
 
53
+ = Are my elements only hidden or fully removed? =
54
  The elements will be fully removed from source code, like they are not existing.
55
  Only if you use the experts options to hide also wrappers or other elements, they will only be hidden with css.
56
 
57
+ = I´m missing some dynamic tags =
58
  We have developed an other plugin which provides some useful tags.
59
  You can find it here:
60
+ [DynamicTags](https://wordpress.org/plugins/dynamictags/)
61
 
62
 
63
  == Screenshots ==
dynamic-conditions.php CHANGED
@@ -22,7 +22,7 @@ use DynamicConditions\Lib\Deactivator;
22
  * Plugin Name: DynamicConditions
23
  * Plugin URI: https://github.com/RTO-Websites/dynamic-conditions
24
  * Description: Activates conditions for dynamic tags to show/hides a widget.
25
- * Version: 1.5.0
26
  * Author: RTO GmbH
27
  * Author URI: https://www.rto.de
28
  * License: GPL-2.0+
@@ -36,7 +36,7 @@ if ( ! defined( 'ABSPATH' ) ) {
36
  die;
37
  }
38
 
39
- define( 'DynamicConditions_VERSION', '1.5.0' );
40
 
41
  define( 'DynamicConditions_DIR', str_replace( '\\', '/', __DIR__ ) );
42
  define( 'DynamicConditions_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) );
22
  * Plugin Name: DynamicConditions
23
  * Plugin URI: https://github.com/RTO-Websites/dynamic-conditions
24
  * Description: Activates conditions for dynamic tags to show/hides a widget.
25
+ * Version: 1.5.1b
26
  * Author: RTO GmbH
27
  * Author URI: https://www.rto.de
28
  * License: GPL-2.0+
36
  die;
37
  }
38
 
39
+ define( 'DynamicConditions_VERSION', '1.5.1b' );
40
 
41
  define( 'DynamicConditions_DIR', str_replace( '\\', '/', __DIR__ ) );
42
  define( 'DynamicConditions_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) );