/** * Replace wp_mail with native PHP mail() */ add_filter(‘pre_wp_mail’, ‘use_native_mail’, 10, 2); function use_native_mail($null, $atts) { $to = $atts[‘to’]; $subject = $atts[‘subject’]; $message = $atts[‘message’]; $headers = isset($atts[‘headers’]) ? $atts[‘headers’] : ”; $attachments = isset($atts[‘attachments’]) ? $atts[‘attachments’] : array();…Continue reading
/** * PG Sideload Guard — TEMPORARY. Installed 2026-09-15. * * ══════════════════════════════════════════════════════════════════════ * THIS IS A TOURNIQUET. IT IS MEANT TO BE DEACTIVATED. * ══════════════════════════════════════════════════════════════════════ * * WHAT IT DOES: blocks front-end HTTP requests for image files. Nothing else. *…Continue reading
/* * Snippet #18 (ID 747): People Group Profile page – Output CSS – Print SPI status box and next steps (hide unused) * Fix: Replace CSS display:none injection with render_block filter. * Suppresses the two non-applicable Next Steps blocks…Continue reading
/* * Snippet #27 (ID 18873): Country Profile Page – Get PG stats – using URL/custom post type * Type: php * Status: publish * Location: 1 * Modified: 2025-09-17 03:28:28 * * FIX 2026-08-09: SUM(Pop) and WHERE SPI =…Continue reading
function get_country_field_values($atts) { // Extract attributes $atts = shortcode_atts(array( ‘field_name’ => ”, ‘slug_output’ => ‘false’, ), $atts, ‘country_fields’); // Get the current post ID $post_id = get_the_ID(); $output = ”; if (get_post_type($post_id) === ‘country’) { // Debugging: Check if the…Continue reading
function get_religion_field_values($atts) { // Extract attributes $atts = shortcode_atts(array( ‘field_name’ => ”, ‘slug_output’ => ‘false’, ), $atts, ‘religion_fields’); // Get the current post ID $post_id = get_the_ID(); $output = ”; if (get_post_type($post_id) === ‘religion’) { // Debugging: Check if the…Continue reading
function get_language_field_values($atts) { // Extract attributes $atts = shortcode_atts(array( ‘field_name’ => ”, ‘slug_output’ => ‘false’, ), $atts, ‘language_fields’); // Get the current post ID $post_id = get_the_ID(); $output = ”; $output = ”; $show_optional_note = false; if (get_post_type($post_id) === ‘language’)…Continue reading
/* * Snippet #34 (ID 35235): Language Profile Page – Calculate PG and Pop counts – generate shortcodes * Type: php * Status: publish * Location: 1 * Modified: 2025-09-17 03:27:25 * * FIX 2026-08-09: same bug class as fix-026…Continue reading
/* * Snippet #53 (ID 35646): Countries of the World Mapbox map (shortcode) GSEC * Type: php * Status: publish * Location: 1 * Modified: 2025-09-17 03:07:47 * * FIX 2026-08-09: hardcoded Mapbox access token replaced with get_option( ‘pg_mapbox_token’, ”…Continue reading
/* * Snippet #50 (ID 35509): People Groups of the World Mapbox code (ArcGIS API) SPI * Type: php * Status: publish * Location: 1 * Modified: 2026-01-12 21:02:11 * * FIX 2026-08-09: queryBase pointed at a dead ArcGIS service…Continue reading