從 WordPress 中刪除版本號

如果將其新增到 functions.php 中,它會從 RSS 提要和標題中刪除 WordPress 版本號。

function remove_wordpress_ver() {
     return '';
}
add_filter('the_generator', 'remove_wordpress_ver', 999);