BBP_Theme_Compat

Theme Compatibility base class.

Defined (1)

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

/includes/core/theme-compat.php  
  1. class BBP_Theme_Compat { 
  2.  
  3. /** 
  4. * Should be like: 
  5. * array( 
  6. * 'id' => ID of the theme (should be unique) 
  7. * 'name' => Name of the theme (should match style.css) 
  8. * 'version' => Theme version for cache busting scripts and styling 
  9. * 'dir' => Path to theme 
  10. * 'url' => URL to theme 
  11. * ); 
  12. * @var array 
  13. */ 
  14. private $_data = array(); 
  15.  
  16. /** 
  17. * Pass the $properties to the object on creation. 
  18. * @since bbPress (r3926) 
  19. * @param array $properties 
  20. */ 
  21. public function __construct( Array $properties = array() ) { 
  22. $this->_data = $properties; 
  23.  
  24. /** 
  25. * Set a theme's property. 
  26. * @since bbPress (r3926) 
  27. * @param string $property 
  28. * @param mixed $value 
  29. * @return mixed 
  30. */ 
  31. public function __set( $property, $value ) { 
  32. return $this->_data[$property] = $value; 
  33.  
  34. /** 
  35. * Get a theme's property. 
  36. * @since bbPress (r3926) 
  37. * @param string $property 
  38. * @param mixed $value 
  39. * @return mixed 
  40. */ 
  41. public function __get( $property ) { 
  42. return array_key_exists( $property, $this->_data ) ? $this->_data[$property] : '';