Add GA click events

document.addEventListener(‘click’, function (e) { const a = e.target.closest(‘a’); if (!a) return; if (a.href.startsWith(‘tel:’)) { gtag(‘event’, ‘click_phone’, { link_url: a.href }); } if (a.href.startsWith(‘mailto:’)) { gtag(‘event’, ‘click_email’, { link_url: a.href }); } });Continue reading

Better Mobile Navigation

/* Custom CSS for Twenty Twenty-Five Mobile Menu */ /* Add background color to overlay */ :root.has-modal-open { –wp–preset–color–base: lightblue; } /* Adjust submenu container styling */ .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .has-child .wp-block-navigation__submenu-container { border: none; height: auto; min-width: 200px; opacity: 1;…Continue reading

Hide Plugin Description

function hide_plugin_description_column( $columns ) { // Remove the ‘Description’ key from the columns array if ( isset( $columns[‘description’] ) ) { unset( $columns[‘description’] ); } return $columns; } add_filter( ‘manage_plugins_columns’, ‘hide_plugin_description_column’ );Continue reading

Sort User ID

// 1. Add the User ID column to the users table add_filter(‘manage_users_columns’, ‘add_user_id_column’); function add_user_id_column($columns) { // Insert ‘user_id’ column after the checkbox column $new_columns = array(); foreach ($columns as $key => $value) { $new_columns[$key] = $value; if ($key ===…Continue reading

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

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