惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Last Week in AI
Last Week in AI
H
Help Net Security
博客园 - 叶小钗
V
Visual Studio Blog
阮一峰的网络日志
阮一峰的网络日志
博客园 - 三生石上(FineUI控件)
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Microsoft Azure Blog
Microsoft Azure Blog
G
Google Developers Blog
腾讯CDC
MongoDB | Blog
MongoDB | Blog
宝玉的分享
宝玉的分享
P
Proofpoint News Feed
GbyAI
GbyAI
Microsoft Security Blog
Microsoft Security Blog
A
About on SuperTechFans
博客园 - 司徒正美
人人都是产品经理
人人都是产品经理
T
The Blog of Author Tim Ferriss
Martin Fowler
Martin Fowler
月光博客
月光博客
博客园 - 聂微东
酷 壳 – CoolShell
酷 壳 – CoolShell
Vercel News
Vercel News

轻语博客

从 7711 元到单日 4.6 万:《牛来》的反向出圈,是烂片奇迹还是观众狂欢? QUX主题后台设置完整使用指南 QUX 主题内置短代码使用教程 什么是 LLMs.txt?它对SEO有用吗?WordPress 网站如何生成 LLMs.txt? QUX子主题模块化首页 Linux如何重启Redis?如何优化Redis性能? 宝塔面板自动重启数据库服务的shell脚本代码 2023奥维图源 免费谷歌地图 热门神器:ChatGPT在线,无需魔法开箱即用!最新接口高效稳定 WordPress 开发人员必备的 12 个工具 WP-China-Yes插件:将你的WordPress接入本土生态体系中 WordPress 6.2 引入 HTML API 修改HTML标签和属性
WordPress 移除菜单代码中没必要的部分
0 个人已赞 · 2025-09-10 · via 轻语博客
<li id="menu-item-223" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-223">
    菜单名
</li>
if (!function_exists('tb_css_attributes_filter')) :
    add_filter('nav_menu_css_class', 'tb_css_attributes_filter', 100, 1);
    add_filter('nav_menu_item_id', 'tb_css_attributes_filter', 100, 1);
    function tb_css_attributes_filter($var) {
        $arrs = array('current-menu-item', 'current-category-ancestor', 'current-post-ancestor', 'current-menu-ancestor', 'current-menu-parent', 'menu-item-has-children');
        return is_array($var) ? array_intersect($var, $arrs) : '';
    }
endif;