所以我找到了解决问题的办法。我刚刚添加了一个span
在add\\u submenu\\u page()挂钩中添加标签,它会起作用:
add_submenu_page(
# The slug for the parent menu page to which this sub menu belongs
\'email-service\',
# The text that\'t rendered in the browser title bar
\'Breaking News Email\',
# The text to be rendered in the menu
\'<span class="breaking-news-toggle">Breaking News Email</span>\',
# the capability required to access this menu item
\'send_email\',
# The slug by which this sub menu is identified
\'my-email-service\',
# the function used to display the options for this menu\'s page
array(&$this, \'email_service_form\')
);