CPT_DIR – Users

/** * WPCode Snippet: WordPress Users & BuddyBoss Profiles CPT Registration * Description: Registers custom post type for user/profile sync with full REST API support * Location: Run Everywhere * Priority: 0 * * INSTALL ORDER: #1 – Install this…Continue reading

Pipeline Local Time Converter

if ( ! function_exists(‘pipeline_local_time’) ) { function pipeline_local_time($iso) { if (empty($iso)) return ”; try { $src = new DateTimeImmutable(trim($iso)); // honors -06:00 $wp_tz = wp_timezone(); // site’s timezone $local = $src->setTimezone($wp_tz); return $local->format(‘Y-m-d H:i:s’); } catch (Exception $e) { return…Continue reading

Versturen van een TESTMAIL

/** * Pixelsz – E-mailtest + vaste afzender en logo (200px) * – Gereedschap → Pixelsz E-mailtest * – Vaste logo-URL (niet wijzigbaar), 200px breed * – Schakelaar: afzendernaam + e-mail afdwingen voor ALLE mails (uit=grijs, aan=groen) */ if (!defined(‘ABSPATH’))…Continue reading

Global – Perfmatters exclusions

add_filter(‘perfmatters_critical_image_exclusions’, function($exclusions) { $exclusions[] = ‘check-mark-1.svg’; return $exclusions; }); /** * GenerateBlocks Pro Overlay Lazy Load Enabler * * This filter hook overrides the default behavior for GenerateBlocks Pro Overlays * (‘anchored’ or ‘mega-menu’ types) to explicitly allow lazy loading.…Continue reading

Completely Disable Comments

add_action(‘admin_init’, function () { // Redirect any user trying to access comments page global $pagenow; if ($pagenow === ‘edit-comments.php’) { wp_safe_redirect(admin_url()); exit; } // Remove comments metabox from dashboard remove_meta_box(‘dashboard_recent_comments’, ‘dashboard’, ‘normal’); // Disable support for comments and trackbacks in…Continue reading

Customize Login Form

// Custom Login Message function custom_login_message($message) { if (empty($message)){ return “ Please enter your Id and Password below to login to the TN CLES Website, Thank You “; } else { return $message; } } add_filter(‘login_message’, ‘custom_login_message’); // Custom Logo…Continue reading

Maintenance Mode

add_action( ‘init’, function() { if ( ! current_user_can( ‘manage_options’ ) && ! is_admin() && ! is_login() ) { wp_die( ‘This website is currently undergoing scheduled maintenance. Please try again later.’ ); } } );Continue reading