cptbc_contextual_help_tab

The CPT Bootstrap Carousel cptbc contextual help tab function.

Description

cptbc_contextual_help_tab(); 

Usage

  1. if ( !function_exists( 'cptbc_contextual_help_tab' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'cpt-bootstrap-carousel/cptbc-admin.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = cptbc_contextual_help_tab(); 
  7.  

Defined (1)

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

/cptbc-admin.php  
  1. function cptbc_contextual_help_tab() { 
  2. $screen = get_current_screen(); 
  3. if( $screen->post_type === 'cptbc') { 
  4. $help = '<p>You can add a <strong>CPT Bootstrap Carousel</strong> image carousel using the shortcode <code>[image-carousel]</code>.</p> 
  5. <p>You can read the full plugin documentation on the <a href="http://wordpress.org/plugins/cpt-bootstrap-carousel/" target="_blank">WordPress plugins page</a></p> 
  6. <p>Most settings can be changed in the <a href="">settings page</a> but you can also specify options for individual carousels 
  7. using the following settings:</p> 
  8.  
  9. <ul> 
  10. <li><code>interval</code> <em>(default 5000)</em> 
  11. <ul> 
  12. <li>Length of time for the caption to pause on each image. Time in milliseconds.</li> 
  13. </ul></li> 
  14.  
  15. <li><code>showcaption</code> <em>(default true)</em> 
  16. <ul> 
  17. <li>Whether to display the text caption on each image or not. true or false.</li> 
  18. </ul></li> 
  19.  
  20. <li><code>showcontrols</code> <em>(default true)</em> 
  21. <ul> 
  22. <li>Whether to display the control arrows or not. true or false.</li> 
  23. </ul></li> 
  24.  
  25. <li><code>orderby</code> and <code>order</code> <em>(default menu_order ASC)</em> 
  26. <ul> 
  27. <li>What order to display the posts in. Uses WP_Query terms.</li> 
  28. </ul></li> 
  29.  
  30. <li><code>category</code> <em>(default all)</em> 
  31. <ul> 
  32. <li>Filter carousel items by a comma separated list of carousel category slugs.</li> 
  33. </ul></li> 
  34.  
  35. <li><code>image_size</code> <em>(default full)</em> 
  36. <ul> 
  37. <li>WordPress image size to use, useful for small carousels</li> 
  38. </ul></li> 
  39.  
  40. <li><code>id</code> <em>(default all)</em> 
  41. <ul> 
  42. <li>Specify the ID of a specific carousel post to display only one image.</li>'; 
  43. if(isset($_GET['post'])) { 
  44. $help .= '<li>The ID of the post you\'re currently editing is <strong>'.$_GET['post'].'</strong></li>'; 
  45. $help .= ' 
  46. </ul></li> 
  47.  
  48. <li><code>twbs</code> <em>(default 2)</em> 
  49. <ul> 
  50. <li>Output markup for Twitter Bootstrap Version 2 or 3.</li> 
  51. </ul></li> 
  52. </ul> 
  53. '; 
  54. $screen->add_help_tab( array( 
  55. 'id' => 'cptbc_contextual_help',  
  56. 'title' => __('Carousel'),  
  57. 'content' => __($help) 
  58. ) ); 
  59. } // if( $screen->post_type === 'cptbc') {