Remove “WordPress” from admin titles
add_filter( ‘admin_title’, function ( $admin_title, $title ) { return str_replace( ” — WordPress”, ”, $admin_title ); }, 10, 2 );Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter( ‘admin_title’, function ( $admin_title, $title ) { return str_replace( ” — WordPress”, ”, $admin_title ); }, 10, 2 );Continue reading
// Please note: This snippet will only show the last login date & time AFTER the snippet is activated. // The snippet has to be active to track the last login date & time. // Add a column to the…Continue reading
// Disable the Plugin and Theme Editor if ( ! defined( ‘DISALLOW_FILE_EDIT’ ) ) { define( ‘DISALLOW_FILE_EDIT’, true ); }Continue reading
// Disable auto-update emails. // add_filter( ‘auto_core_update_send_email’, ‘__return_false’ ); // Disable auto-update emails for plugins. add_filter( ‘auto_plugin_update_send_email’, ‘__return_false’ ); // Disable auto-update emails for themes. add_filter( ‘auto_theme_update_send_email’, ‘__return_false’ );Continue reading
// Admin Server Log / Kiri Vadivelu / 2026 // Log HTTP requests to a file define( ‘HTTP_LOG_FILE’, WP_CONTENT_DIR . ‘/http-requests.log’ ); function my_log_http_request( $response, $request, $url ) { $log_entry = [ ‘time’ => current_time( ‘mysql’ ), ‘method’ => $request[‘method’],…Continue reading
// Admin Email Log / Kiri Vadivelu / 2026 // Register the Admin Menu add_action(‘admin_menu’, ‘register_all_menus’); function register_all_menus() { add_menu_page( ‘Email Log’, ‘Email Log’, ‘manage_options’, // Access for Admin Only ‘smtp-log’, ‘render_smtp_log_page’, ‘dashicons-email-alt’, 99 ); } // Render the Email…Continue reading
// Debug file loading / Kiri Vadivelu / 2026 error_log(‘FILE LOADED: ‘ . __FILE__);Continue reading
/** * Sugar Calendar: reset The Events Calendar migration so it can run again. * * Adds a “Reset TEC migration” notice on the WordPress Dashboard (Sugar Calendar hides * other plugins’ notices on its own screens). Clicking it: *…Continue reading
add_action( ‘wp’, function () { if ( ! function_exists( ‘is_checkout’ ) || ! is_checkout() ) { return; } $hook = ‘woocommerce_after_checkout_billing_form’; $callback = ‘kl_mobile_compliance_text’; $priority = has_action( $hook, $callback ); if ( false === $priority ) { return; } remove_action(…Continue reading
// Simple HTTP Debug / Kiri Vadivelu / 2026 function simple_http_debug( $response, $context, $class, $parsed_args, $url ) { error_log( ‘http_debug: ‘.$url ); } add_action(‘http_api_debug’, ‘simple_http_debug’, 10, 5);Continue reading