$value) { $atts[$key] = do_shortcode($value); } // Store normalized field list $form_fields_value = $atts['form_fields'] ?? ''; // Generate inline JavaScript for personalization functionality $ajax_url = admin_url('admin-ajax.php'); $nonce = wp_create_nonce('igny8_ajax_nonce'); // Fetch context values $post_id = get_queried_object_id(); // Debug: Log PHP variables error_log('IGNY8 Debug - PHP Variables:'); error_log('ajax_url: ' . $ajax_url); error_log('nonce: ' . $nonce); error_log('post_id: ' . $post_id); // Check if Content Engine is enabled $content_engine_status = get_option('igny8_content_engine_global_status', 'enabled'); $post_type = get_post_type(); $enabled_post_types = get_option('igny8_content_engine_enabled_post_types', []); if ($content_engine_status === 'enabled' && in_array($post_type, $enabled_post_types)) { $teaser = esc_html(get_option('igny8_content_engine_teaser_text', 'Want to read this as if it was written exclusively about you?')); $display_mode = get_option('igny8_content_engine_display_mode', 'button'); } else { $teaser = esc_html(get_option('igny8_teaser_text', 'Want to read this as if it was written exclusively about you?')); $display_mode = 'button'; } // Start output buffering ob_start(); ?>