Skip to main content
deleted 20 characters in body
Source Link
John
  • 1
  • 2
function add_context_menu_help(){
// get the current screen object
    $current_screen = get_current_screen();
// content for help tab
    $content = '<p>Has this replaced it?</p>';
// register our main help tab - Overview
    $current_screen->add_help_tab( array(
            'id'        => 'overview-link',
            'title'     => __('Overview'),
            'content'   => $content
        )
    );
// content for help tab
    $content = '<p>Im a help tab, woo!</p>';
// register our main help tab
    $current_screen->add_help_tab( array(
            'id'        => 'sp_basic_help_tab',
            'title'     => __('Basic Help Tab'),
            'content'   => $content
        )
    );
// register our secondary help tab (with a callback instead of content)
    $current_screen->add_help_tab( array(
            'id'        => 'sp_help_tab_callback',
            'title'     => __('Help Tab With Callback'),
            'callback'  => 'display_help_tab'
        )
    );
// This sets the sidebar, which is common for all tabs of this screen
    get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
        '<p>' . __('<a href="http://wordpress.stackexchangedomainname.com/" title="WordPresstitle="SCS StackExchange"Help target="_blank">WordPressFiles Answers<" target="_blank">SCS Knowledgebase</a>') . '</p>' .
        '<p>' . __('<a href="http://wordpressdomainname.orgcom/support/" target="_blank">Support Forums</a>') . '</p>'
    );
}
add_filter('admin_head', 'add_context_menu_help');
//function used to display the second help tab
function display_help_tab(){
    $content = '<p>This is text from our output function</p>';
    echo $content;
}
function add_context_menu_help(){
// get the current screen object
    $current_screen = get_current_screen();
// content for help tab
    $content = '<p>Has this replaced it?</p>';
// register our main help tab - Overview
    $current_screen->add_help_tab( array(
            'id'        => 'overview-link',
            'title'     => __('Overview'),
            'content'   => $content
        )
    );
// content for help tab
    $content = '<p>Im a help tab, woo!</p>';
// register our main help tab
    $current_screen->add_help_tab( array(
            'id'        => 'sp_basic_help_tab',
            'title'     => __('Basic Help Tab'),
            'content'   => $content
        )
    );
// register our secondary help tab (with a callback instead of content)
    $current_screen->add_help_tab( array(
            'id'        => 'sp_help_tab_callback',
            'title'     => __('Help Tab With Callback'),
            'callback'  => 'display_help_tab'
        )
    );
// This sets the sidebar, which is common for all tabs of this screen
    get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
        '<p>' . __('<a href="http://wordpress.stackexchange.com/" title="WordPress StackExchange" target="_blank">WordPress Answers</a>') . '</p>' .
        '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
    );
}
add_filter('admin_head', 'add_context_menu_help');
//function used to display the second help tab
function display_help_tab(){
    $content = '<p>This is text from our output function</p>';
    echo $content;
}
function add_context_menu_help(){
// get the current screen object
    $current_screen = get_current_screen();
// content for help tab
    $content = '<p>Has this replaced it?</p>';
// register our main help tab - Overview
    $current_screen->add_help_tab( array(
            'id'        => 'overview-link',
            'title'     => __('Overview'),
            'content'   => $content
        )
    );
// content for help tab
    $content = '<p>Im a help tab, woo!</p>';
// register our main help tab
    $current_screen->add_help_tab( array(
            'id'        => 'sp_basic_help_tab',
            'title'     => __('Basic Help Tab'),
            'content'   => $content
        )
    );
// register our secondary help tab (with a callback instead of content)
    $current_screen->add_help_tab( array(
            'id'        => 'sp_help_tab_callback',
            'title'     => __('Help Tab With Callback'),
            'callback'  => 'display_help_tab'
        )
    );
// This sets the sidebar, which is common for all tabs of this screen
    get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
        '<p>' . __('<a href="http://domainname.com/" title="SCS Help Files " target="_blank">SCS Knowledgebase</a>') . '</p>' .
        '<p>' . __('<a href="http://domainname.com/support/" target="_blank">Support Forums</a>') . '</p>'
    );
}
add_filter('admin_head', 'add_context_menu_help');
//function used to display the second help tab
function display_help_tab(){
    $content = '<p>This is text from our output function</p>';
    echo $content;
}
added 9 characters in body
Source Link
John
  • 1
  • 2

theme/ functions.php / Contextual Help Tab / Global

The aim is to avoid"avoid installing any more pluginsplugins" than I have to. Additionally, I'm not interest in targeting any particular page, post or plugin, this is a global help as per defualt worpress help tab.

functions.php / Contextual Help Tab / Global

The aim is to avoid installing any more plugins than I have to. Additionally, I'm not interest in targeting any particular page, post or plugin, this is a global help as per defualt worpress help tab.

theme/ functions.php / Contextual Help Tab / Global

The aim is to "avoid installing any more plugins" than I have to. Additionally, I'm not interest in targeting any particular page, post or plugin, this is a global help as per defualt worpress help tab.

added 9 characters in body
Source Link
Tom J Nowell
  • 60.6k
  • 7
  • 77
  • 147
function add_context_menu_help(){
// get the current screen object
    $current_screen = get_current_screen();
// content for help tab
    $content = '<p>Has this replaced it?</p>';
// register our main help tab - Overview
    $current_screen->add_help_tab( array(
            'id'        => 'overview-link',
            'title'     => __('Overview'),
            'content'   => $content
        )
    );
// content for help tab
    $content = '<p>Im a help tab, woo!</p>';
// register our main help tab
    $current_screen->add_help_tab( array(
            'id'        => 'sp_basic_help_tab',
            'title'     => __('Basic Help Tab'),
            'content'   => $content
        )
    );
// register our secondary help tab (with a callback instead of content)
    $current_screen->add_help_tab( array(
            'id'        => 'sp_help_tab_callback',
            'title'     => __('Help Tab With Callback'),
            'callback'  => 'display_help_tab'
        )
    );
// This sets the sidebar, which is common for all tabs of this screen
    get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
        '<p>' . __('<a href="http://wordpress.stackexchange.com/" title="WordPress StackExchange" target="_blank">WordPress Answers</a>') . '</p>' .
        '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
    );
}
add_filter('admin_head', 'add_context_menu_help');
//function used to display the second help tab
function display_help_tab(){
    $content = '<p>This is text from our output function</p>';
    echo $content;
}

function add_context_menu_help(){ // get the current screen object $current_screen = get_current_screen(); // content for help tab $content = '<p>Has this replaced it?</p>'; // register our main help tab - Overview $current_screen->add_help_tab( array( 'id' => 'overview-link', 'title' => __('Overview'), 'content' => $content ) ); // content for help tab $content = '<p>Im a help tab, woo!</p>'; // register our main help tab $current_screen->add_help_tab( array( 'id' => 'sp_basic_help_tab', 'title' => __('Basic Help Tab'), 'content' => $content ) ); // register our secondary help tab (with a callback instead of content) $current_screen->add_help_tab( array( 'id' => 'sp_help_tab_callback', 'title' => __('Help Tab With Callback'), 'callback' => 'display_help_tab' ) ); // This sets the sidebar, which is common for all tabs of this screen get_current_screen()->set_help_sidebar( '<p><strong>' . __('For more information:') . '</strong></p>' . '<p>' . __('<a href="http://wordpress.stackexchange.com/" title="WordPress StackExchange" target="_blank">WordPress Answers</a>') . '</p>' . '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>' ); } add_filter('admin_head', 'add_context_menu_help'); //function used to display the second help tab function display_help_tab(){ $content = '<p>This is text from our output function</p>'; echo $content; } I I know I'm missing something, and not for looking; How do I call on the relevant 'id and title' to either remove and or overwrite it, or do I have to call on a link such as Dashboard / Home or Updates, etc?

function add_context_menu_help(){ // get the current screen object $current_screen = get_current_screen(); // content for help tab $content = '<p>Has this replaced it?</p>'; // register our main help tab - Overview $current_screen->add_help_tab( array( 'id' => 'overview-link', 'title' => __('Overview'), 'content' => $content ) ); // content for help tab $content = '<p>Im a help tab, woo!</p>'; // register our main help tab $current_screen->add_help_tab( array( 'id' => 'sp_basic_help_tab', 'title' => __('Basic Help Tab'), 'content' => $content ) ); // register our secondary help tab (with a callback instead of content) $current_screen->add_help_tab( array( 'id' => 'sp_help_tab_callback', 'title' => __('Help Tab With Callback'), 'callback' => 'display_help_tab' ) ); // This sets the sidebar, which is common for all tabs of this screen get_current_screen()->set_help_sidebar( '<p><strong>' . __('For more information:') . '</strong></p>' . '<p>' . __('<a href="http://wordpress.stackexchange.com/" title="WordPress StackExchange" target="_blank">WordPress Answers</a>') . '</p>' . '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>' ); } add_filter('admin_head', 'add_context_menu_help'); //function used to display the second help tab function display_help_tab(){ $content = '<p>This is text from our output function</p>'; echo $content; } I know I'm missing something, and not for looking; How do I call on the relevant 'id and title' to either remove and or overwrite it, or do I have to call on a link such as Dashboard / Home or Updates, etc?

function add_context_menu_help(){
// get the current screen object
    $current_screen = get_current_screen();
// content for help tab
    $content = '<p>Has this replaced it?</p>';
// register our main help tab - Overview
    $current_screen->add_help_tab( array(
            'id'        => 'overview-link',
            'title'     => __('Overview'),
            'content'   => $content
        )
    );
// content for help tab
    $content = '<p>Im a help tab, woo!</p>';
// register our main help tab
    $current_screen->add_help_tab( array(
            'id'        => 'sp_basic_help_tab',
            'title'     => __('Basic Help Tab'),
            'content'   => $content
        )
    );
// register our secondary help tab (with a callback instead of content)
    $current_screen->add_help_tab( array(
            'id'        => 'sp_help_tab_callback',
            'title'     => __('Help Tab With Callback'),
            'callback'  => 'display_help_tab'
        )
    );
// This sets the sidebar, which is common for all tabs of this screen
    get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
        '<p>' . __('<a href="http://wordpress.stackexchange.com/" title="WordPress StackExchange" target="_blank">WordPress Answers</a>') . '</p>' .
        '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
    );
}
add_filter('admin_head', 'add_context_menu_help');
//function used to display the second help tab
function display_help_tab(){
    $content = '<p>This is text from our output function</p>';
    echo $content;
}

I know I'm missing something, and not for looking; How do I call on the relevant 'id and title' to either remove and or overwrite it, or do I have to call on a link such as Dashboard / Home or Updates, etc?

Source Link
John
  • 1
  • 2
Loading