popover.help.php
13 years ago
popoveradmin.php
13 years ago
popoverajax.php
13 years ago
popoverpublic.php
13 years ago
popover.help.php
85 lines
| 1 | <?php |
| 2 | if(!class_exists('Popover_Help')) { |
| 3 | |
| 4 | class Popover_Help { |
| 5 | // The screen we want to access help for |
| 6 | var $screen = false; |
| 7 | |
| 8 | function __construct( &$screen = false ) { |
| 9 | |
| 10 | $this->screen = $screen; |
| 11 | |
| 12 | //print_r($screen); |
| 13 | |
| 14 | } |
| 15 | |
| 16 | function Popover_Help( &$screen = false ) { |
| 17 | $this->__construct( $screen ); |
| 18 | } |
| 19 | |
| 20 | function show() { |
| 21 | |
| 22 | |
| 23 | |
| 24 | } |
| 25 | |
| 26 | function attach() { |
| 27 | |
| 28 | switch($this->screen->id) { |
| 29 | |
| 30 | case 'toplevel_page_popover': $this->main_help(); |
| 31 | break; |
| 32 | |
| 33 | case 'pop-overs_page_popoveraddons': $this->addons_help(); |
| 34 | break; |
| 35 | |
| 36 | |
| 37 | } |
| 38 | |
| 39 | } |
| 40 | |
| 41 | // Specific help content creation functions |
| 42 | |
| 43 | function main_help() { |
| 44 | |
| 45 | ob_start(); |
| 46 | include_once(popover_dir('popoverincludes/help/popover.help.php')); |
| 47 | $help = ob_get_clean(); |
| 48 | |
| 49 | ob_start(); |
| 50 | include_once(popover_dir('popoverincludes/help/popoveredit.help.php')); |
| 51 | $helpedit = ob_get_clean(); |
| 52 | |
| 53 | $this->screen->add_help_tab( array( |
| 54 | 'id' => 'popover', |
| 55 | 'title' => __( 'Overview' , 'popover' ), |
| 56 | 'content' => $help, |
| 57 | ) ); |
| 58 | |
| 59 | $this->screen->add_help_tab( array( |
| 60 | 'id' => 'edit', |
| 61 | 'title' => __( 'Adding / Editing' , 'popover' ), |
| 62 | 'content' => $helpedit, |
| 63 | ) ); |
| 64 | |
| 65 | } |
| 66 | |
| 67 | function addons_help() { |
| 68 | |
| 69 | ob_start(); |
| 70 | include_once(popover_dir('popoverincludes/help/popoveraddons.help.php')); |
| 71 | $help = ob_get_clean(); |
| 72 | |
| 73 | $this->screen->add_help_tab( array( |
| 74 | 'id' => 'addons', |
| 75 | 'title' => __( 'Add-ons', 'popover' ), |
| 76 | 'content' => $help, |
| 77 | ) ); |
| 78 | |
| 79 | } |
| 80 | |
| 81 | |
| 82 | } |
| 83 | |
| 84 | } |
| 85 | ?> |