jssb_help_menu

The WordPress Core jssb help menu function.

Description

jssb_help_menu( $contextual_help, $screen_id, $screen ); 

Parameters (3)

0. $contextual_help
The contextual help.
1. $screen_id
The screen id.
2. $screen
The screen.

Usage

  1. if ( !function_exists( 'jssb_help_menu' ) ) { 
  2. require_once '/jetpack-status-board.php'; 
  3.  
  4. // The contextual help. 
  5. $contextual_help = null; 
  6.  
  7. // The screen id. 
  8. $screen_id = null; 
  9.  
  10. // The screen. 
  11. $screen = null; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = jssb_help_menu($contextual_help, $screen_id, $screen); 
  15.  

Defined (1)

The function is defined in the following location(s).

/jetpack-status-board.php  
  1. function jssb_help_menu( $contextual_help, $screen_id, $screen ) { 
  2. global $jssb_plugin_hook; 
  3. if ($screen_id == $jssb_plugin_hook) { 
  4. $contextual_help = __( 'This plugin allows you to view your Jetpack stats on the Status Board App for iPads. If you are having any issues, please see the "Troubleshooting" tab.', 'js-statusboard-txt' ); 
  5.  
  6. $key = sha1( wp_salt() ); 
  7. $sb_url = get_bloginfo( 'url' ) . '/jssb-stats/?jssb-verify=' . $key; 
  8. $troubleshooting = '<ol>'; 
  9. $troubleshooting .= '<li>' . __( 'To add the graph manually, copy this URL and add it to your Status Board iPad app.', 'js-statusboard-txt' ) . '<br />'; 
  10. $troubleshooting .= '<span id="jssb-key_url"><pre>' . $sb_url . '</pre></span></li>'; 
  11. $troubleshooting .= '<li>' . sprintf( __( 'If this gives you a \'404\' error, try clicking \'Save Changes\' on the <a href="%s">Permalinks</a> page to help flush the rewrite rules, and re-add the graph', 'js-statusboard-txt' ), admin_url( 'options-permalink.php' ) ) . '</li>'; 
  12. $troubleshooting .= '<li>' . sprintf( __( 'If you are still having problems, you can <a href="%s" target="new">submit a support request</a> and we can try and solve the issue.', 'js-statusboard-txt' ), 'http://wordpress.org/support/plugin/jetpack-status-board' ) . '</li>'; 
  13. $troubleshooting .= '</ol>'; 
  14.  
  15. // Add if current screen is My Admin Page 
  16. $screen->add_help_tab( array( 
  17. 'id' => 'jssb_troubleshooting',  
  18. 'title' => __( 'Troubleshooting', 'js-statusboard-txt' ),  
  19. 'content' => '<p>' . $troubleshooting . '</p>',  
  20. ) ); 
  21. return $contextual_help;