How to translate add_contextual_help to get_current_screen()->add_help_tab()

Sorry only have time to offer a quick fix…. See where you can go from here.. /** * The Admin menu page */ function wptuts_add_menu(){ // Display Settings Page link under the “Appearance” Admin Menu // add_theme_page( $page_title, $menu_title, $capability, $menu_slug, $function); $wptuts_settings_page = add_theme_page(__(‘Wptuts Options’), __(‘Wptuts Options’,’wptuts_textdomain’), ‘manage_options’, WPTUTS_PAGE_BASENAME, ‘wptuts_settings_page_fn’); // css & js … Read more

Customizing contextual help for every page

You can add this code in your functions.php file. function example_contextual_help( $contextual_help, $screen_id, $screen ) { //echo ‘Screen ID = ‘.$screen_id.'<br />’; switch( $screen_id ) { case ‘my_plugin_page_1’ : $contextual_help .= ‘<p>’; $contextual_help = __( ‘Your text here.’ ); $contextual_help .= ‘</p>’; break; case ‘my_plugin_page_2’ : $contextual_help .= ‘<p>’; $contextual_help = __( ‘Your text here.’ … Read more

Custom plugin development get help context to work in WP 4.3

The problem here is this: add_action(‘load-‘ .CUSTOM_POST_TYPE, ‘my_plugin_add_help’); While your hunch that you need to put array( $this, ‘my_plugin_add_help’ ) because it’s inside a class is correct, the root of the problem is that the hook you’re trying to attach it to is never called, and isn’t a part of standard WordPress. Instead, try hooking … Read more

contextual_help, change the “Help” tab label

Look at the source, there is no filter to alter the ‘Help’. But it does translate the text so you can hook onto the gettext filter. Not the nicest of solutions (an alternative would be to use javascript) : add_filter( ‘gettext’, ‘wpse51861_change_help_text’, 10, 2 ); function wpse51861_change_help_text( $translation, $text ) { if ( $text == … Read more

Help Tabs with: add_help_tab() callback – How does the argument work?

Ok. The answer is NOT simple, but after some try and error, reading core, etc. I found out what the problem is: The callback (which should be used instead of the content) accepts two arguments: $current_screen and $tab. Here’s what $tab looks like, when dumped for a single tab. Array ( Help Tabs with: add_help_tab() … Read more

Edit dashboard’s help tab

The documentation in the Codex seems outdated. Use the following code (see comments): // Priority 5 allows the removal of default tabs and insertion of other plugin’s tabs add_filter( ‘contextual_help’, ‘wpse_77308_products_help’, 5, 3 ); function wpse_77308_products_help( $old_help, $screen_id, $screen ) { // Not our screen, exit earlier // Adjust for your correct screen_id, see plugin … Read more