Better PHP Mailer

/** * 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

ROP level trees

/* * Snippet #98 (ID 37755): ROP level trees * Type: php * Status: publish * Location: 1 * Modified: 2026-02-24 22:25:10 * * FIX 2026-08-09: every SQL query in this file referenced pre-migration * column names (ROP1Code, ROP2Code, ROP3Code,…Continue reading

People Groups of the World Mapbox – LPI

/* * Snippet #101 (ID 37767): People Groups of the World Mapbox – LPI * Type: php * Status: publish * Location: 1 * Modified: 2026-03-24 17:49:22 * * FIX 2026-08-09: hardcoded Mapbox access token replaced with get_option( ‘pg_mapbox_token’, ”…Continue reading

grosse Whats App Bilder

// Schaltet die 2560px-Sperre für WhatsApp-Bilder ab add_filter( ‘big_image_size_threshold’, ‘__return_false’ ); // Erhöht das Upload-Limit für Videos @ini_set( ‘upload_max_filesize’ , ‘512M’ ); @ini_set( ‘post_max_size’, ‘512M’ ); @ini_set( ‘max_execution_time’, ‘300’ );Continue reading

WPEX Tetris REST Meta Integration

if(!function_exists(‘wpex_register_universal_media_meta’)){ function wpex_register_universal_media_meta(){ $media_meta_fields=array( ‘universal_local_image_attachment_ids’, ‘universal_local_audio_attachment_ids’, ‘universal_local_video_attachment_ids’, ); $post_types=get_post_types(array(‘public’=>true)); foreach($post_types as $post_type){ if(post_type_supports($post_type,’post-formats’)){ foreach($media_meta_fields as $meta_key){ if(!registered_meta_key_exists(‘post’,$meta_key,$post_type)){ register_post_meta($post_type,$meta_key,array( ‘type’=>’array’, ‘single’=>true, ‘default’=>array(), ‘show_in_rest’=>array( ‘schema’=>array( ‘type’=>’array’, ‘items’=>array(‘type’=>’integer’), ), ), ‘sanitize_callback’=>function($value){ return is_array($value)?array_map(‘absint’,$value):array(); }, ‘auth_callback’=>function($allowed,$meta_key,$post_id,$user_id,$cap,$caps){ return current_user_can(‘edit_post’,$post_id); }, )); } } } }…Continue reading