| @@ -194,9 +194,10 @@ | ||
| 194 | 194 | public function generate_custom_css() { |
| 195 | 195 | $posts = Database::get_instance()->get_posts(Database::$table_posts, '*', ['enabled' => true] ); |
| 196 | 196 | $combine_css = ""; |
| 197 | 197 | foreach ($posts as $post) { |
| 198 | - if( !empty( $post['data']['add_custom_css'] ) && !empty( $post['nx_id'] ) ) { | |
| 198 | + // Raw rows (not normalize_post()), so check the type here. | |
| 199 | + if( !empty( $post['data']['add_custom_css'] ) && is_string( $post['data']['add_custom_css'] ) && !empty( $post['nx_id'] ) ) { | |
| 199 | 200 | $separatedCss = $this->separate_css($post['data']['add_custom_css']); |
| 200 | 201 | if( !empty( $post['data']['source'] ) && $post['data']['source'] == 'press_bar' ) { |
| 201 | 202 | $combine_css .= "{$separatedCss['normal_css']} {$separatedCss['media_css']} "; |
| 202 | 203 | } else if( !empty( $post['data']['source'] ) && $post['data']['source'] == 'gdpr_notification' ) { |
| @@ -273,8 +274,13 @@ | ||
| 273 | 274 | 'shortcode' => [], |
| 274 | 275 | 'inline_shortcode' => false, |
| 275 | 276 | ] |
| 276 | 277 | ); |
| 278 | + // These come straight from the public REST `notice` request, where | |
| 279 | + // `?global=1` arrives as a string; the code below needs ID lists. | |
| 280 | + foreach (['global', 'active', 'pressbar', 'gdpr', 'popup', 'exit_intent', 'shortcode'] as $list_key) { | |
| 281 | + $params[$list_key] = NotificationX::get_instance()->normalize_multiple_value($params[$list_key]); | |
| 282 | + } | |
| 277 | 283 | $global = $params['global']; |
| 278 | 284 | $active = $params['active']; |
| 279 | 285 | $pressbar = $params['pressbar']; |
| 280 | 286 | $gdpr = $params['gdpr']; |
| @@ -964,8 +970,10 @@ | ||
| 964 | 970 | 'is_elementor', |
| 965 | 971 | 'is_inline', |
| 966 | 972 | 'ld_course_list', |
| 967 | 973 | 'ld_product_control', |
| 974 | + 'activecampaign_form', | |
| 975 | + 'brevo_list', | |
| 968 | 976 | 'mailchimp_list', |
| 969 | 977 | 'max_stock', |
| 970 | 978 | 'nx-bar_with_elementor', |
| 971 | 979 | 'nx-bar_with_elementor-remove', |