It’s not possible (as far as I know) to currently link directly to a help tab in WordPress. Here’s the jQuery solution I cooked up:
/** * Toggle the WP help menu tab by linking to the tab id * * The anchor must have arel
ofwp-help
*/ $('a[rel="wp-help"]').click(function() $('#contextual-help-link').click(); // Click on the tab link inside the help wrapper $('#screen-meta a[href*="' + $(this).attr('href').replace('#', '') +'"]').click(); // We're just anchor linking; don't go anywhere return false; );
If the tab’s ID that you pass to $screen->add_help_tab()
is example-plugin
, then you could create a link like this: <a href="#example-plugin" rel="wp-help">View the help docs</a>
.
The post Toggle WordPress Help Menu appeared first on KWS Blog.