class-debug-bar-panel.php 750 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. class Debug_Bar_Panel {
  3. var $_title = '';
  4. var $_visible = true;
  5. function Debug_Bar_Panel( $title='' ) {
  6. $this->title( $title );
  7. if ( $this->init() === false ) {
  8. $this->set_visible( false );
  9. return;
  10. }
  11. add_filter( 'debug_bar_classes', array( &$this, 'debug_bar_classes' ) );
  12. }
  13. /**
  14. * Initializes the panel.
  15. */
  16. function init() {}
  17. function prerender() {}
  18. /**
  19. * Renders the panel.
  20. */
  21. function render() {}
  22. function is_visible() {
  23. return $this->_visible;
  24. }
  25. function set_visible( $visible ) {
  26. $this->_visible = $visible;
  27. }
  28. function title( $title=NULL ) {
  29. if ( ! isset( $title ) )
  30. return $this->_title;
  31. $this->_title = $title;
  32. }
  33. function debug_bar_classes( $classes ) {
  34. return $classes;
  35. }
  36. }