MS_Addon_Category

The Membership 2 MS Addon Category class.

Defined (1)

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

/app/addon/category/class-ms-addon-category.php  
  1. class MS_Addon_Category extends MS_Addon { 
  2.  
  3. /** 
  4. * The Add-on ID 
  5. * @since 1.0.0 
  6. */ 
  7. const ID = 'addon_category'; 
  8.  
  9. /** 
  10. * Checks if the current Add-on is enabled 
  11. * @since 1.0.0 
  12. * @return bool 
  13. */ 
  14. static public function is_active() { 
  15. return MS_Model_Addon::is_enabled( self::ID ); 
  16.  
  17. /** 
  18. * Returns the Add-on ID (self::ID). 
  19. * @since 1.0.1.0 
  20. * @return string 
  21. */ 
  22. public function get_id() { 
  23. return self::ID; 
  24.  
  25. /** 
  26. * Initializes the Add-on. Always executed. 
  27. * @since 1.0.0 
  28. */ 
  29. public function init() { 
  30. // This Add-on has no real logic. 
  31. // It is only a switch that is used in the MS_Rule_Category files... 
  32.  
  33. /** 
  34. * Registers the Add-On 
  35. * @since 1.0.0 
  36. * @param array $list The Add-Ons list. 
  37. * @return array The updated Add-Ons list. 
  38. */ 
  39. public function register( $list ) { 
  40. $list[ self::ID ] = (object) array( 
  41. 'name' => __( 'Category Protection', 'membership2' ),  
  42. 'description' => __( 'Protect your posts by category.', 'membership2' ),  
  43. ); 
  44. return $list; 
  45.