Changeset 2951041
- Timestamp:
- 08/09/2023 09:56:27 PM (3 years ago)
- Location:
- fast-beavercontrol/trunk
- Files:
-
- 2 edited
-
lib/fast-bct-protected-content-visibility.php (modified) (4 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
fast-beavercontrol/trunk/lib/fast-bct-protected-content-visibility.php
r2151391 r2951041 1 1 <?php 2 2 3 /* 4 * class for BeaverBuilder content protection functionality 3 /* 4 * class for BeaverBuilder content protection functionality 5 5 * based on URL parameters 6 6 */ … … 16 16 add_filter( 'fl_builder_is_node_visible', array( 'Fast_Bct_Protected_Content_Visibility', 'fast_bct_toggle_content_visibility'), 1, 2 ); 17 17 } 18 18 19 19 public static function fast_bct_settings_visibility_option( $form, $id ) { 20 20 if ( 'row' == $id || 'col' == $id ) { … … 39 39 return $form; 40 40 } 41 42 41 42 43 43 public static function fast_bct_toggle_content_visibility( $is_visible, $node ) { 44 44 45 45 if ( isset( $node->settings->visibility_display ) && ( $node->settings->visibility_display == 'fast_bct_value' ) ) { 46 46 47 47 if ( empty( $node->settings->url_params_positive ) ) { 48 48 49 49 $is_visible = true; 50 51 } else if ( !empty( $node->settings->url_params_positive ) 52 && strpos( $node->settings->url_params_positive, '=' ) !== false 50 51 } else if ( !empty( $node->settings->url_params_positive ) 52 && strpos( $node->settings->url_params_positive, '=' ) !== false 53 53 && self::fast_bct_check_url_params( $node->settings->url_params_positive ) === false ) { 54 54 55 return true; 56 57 } 58 59 if ( empty( $node->settings->url_params_negative ) ) { 60 61 $is_visible = true; 62 63 } else if ( !empty( $node->settings->url_params_negative ) 64 && strpos( $node->settings->url_params_negative, '=' ) !== false 65 && self::fast_bct_check_url_params( $node->settings->url_params_negative ) === true ) { 66 55 67 return false; 56 68 57 69 } 58 59 if ( empty( $node->settings->url_params_negative ) ) { 60 61 $is_visible = true; 62 63 } else if ( !empty( $node->settings->url_params_negative ) 64 && strpos( $node->settings->url_params_negative, '=' ) !== false 65 && self::fast_bct_check_url_params( $node->settings->url_params_negative ) === true ) { 66 67 return false; 68 69 } 70 70 71 71 } 72 72 return $is_visible; 73 73 } 74 74 75 75 static private function fast_bct_check_url_params( $params ) { 76 76 $data_params = $params; … … 84 84 return true; 85 85 } 86 86 87 87 } 88 -
fast-beavercontrol/trunk/readme.txt
r2537587 r2951041 3 3 Tags: BeaverBuilder,fastflow,fastmember,conditional content 4 4 Requires at least: 4 5 Tested up to: 5.86 Requires PHP: 5.35 Tested up to: 6.3 6 Requires PHP: 7.4 7 7 Stable tag: trunk 8 8 License: GPL2
Note: See TracChangeset
for help on using the changeset viewer.