/** * Disable Auto-Update Email Notifications for Plugins and Themes. * Works for WordPress 5.5 and later. */ // Disable Plugin Auto-Update Emails add_filter( 'auto_plugin_update_send_email', '__return_false' ); // Disable Theme Auto-Update Emails add_filter( 'auto_theme_update_send_email', '__return_false' ); // Optional: Disable Core Auto-Update Emails (if you also want to stop these) // add_filter( 'auto_core_update_send_email', '__return_false', 10, 4 ); // Optional: Disable Translation Auto-Update Emails (if you also want to stop these) // add_filter( 'auto_translation_update_send_email', '__return_false' );

PHP snipets

Getting the current full URL in PHP

Sometimes, you might want to get the current full URL in PHP. Here is how you do that. Add the following code to a page:

function selfURL() {
$s = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on&quot ? "s" : "";
$protocol = strleft(strtolower($_SERVER["SERVER_PROTOCOL"]), "/&quot.$s;
$port = ($_SERVER["SERVER_PORT"] == "80″) ? "" : (":".$_SERVER["SERVER_PORT"]);
return $protocol."://".$_SERVER['SERVER_NAME'].$port.$_SERVER['REQUEST_URI'];
}
function strleft($s1, $s2) {
return substr($s1, 0, strpos($s1, $s2));
}

You can now get the full URL using the line:

Đọc tiếp→