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

推荐订阅源

Engineering at Meta
Engineering at Meta
人人都是产品经理
人人都是产品经理
aimingoo的专栏
aimingoo的专栏
M
MIT News - Artificial intelligence
Recent Announcements
Recent Announcements
V
Visual Studio Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
MyScale Blog
MyScale Blog
Hugging Face - Blog
Hugging Face - Blog
宝玉的分享
宝玉的分享
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园 - 叶小钗
博客园 - 聂微东
U
Unit 42
F
Fortinet All Blogs
Microsoft Security Blog
Microsoft Security Blog
GbyAI
GbyAI
IT之家
IT之家
The GitHub Blog
The GitHub Blog
Stack Overflow Blog
Stack Overflow Blog
MongoDB | Blog
MongoDB | Blog
Y
Y Combinator Blog
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)

轻语博客

从 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;