/app/addon/attributes/class-ms-addon-attributes.php

  1. <?php 
  2. /** 
  3. * Add-on: Add custom Attributes to memberships. 
  4. * 
  5. * @since 1.0.1.0 
  6. */ 
  7. class MS_Addon_Attributes extends MS_Addon { 
  8.  
  9. /** 
  10. * The Add-on ID 
  11. * 
  12. * @since 1.0.1.0 
  13. */ 
  14. const ID = 'addon_attribute'; 
  15.  
  16. /** 
  17. * Checks if the current Add-on is enabled. 
  18. * 
  19. * @since 1.0.1.0 
  20. * @return bool 
  21. */ 
  22. static public function is_active() { 
  23. return false; 
  24.  
  25. /** 
  26. * Returns the Add-on ID (self::ID). 
  27. * 
  28. * @since 1.0.1.0 
  29. * @return string 
  30. */ 
  31. public function get_id() { 
  32. return self::ID; 
  33.  
  34. /** 
  35. * Initializes the Add-on. Always executed. 
  36. * 
  37. * @since 1.0.1.0 
  38. */ 
  39. public function init() { 
  40. MS_Model_Addon::disable( self::ID ); 
  41.  
  42. /** 
  43. * Registers the Add-On. 
  44. * 
  45. * @since 1.0.1.0 
  46. * @param array $list The Add-Ons list. 
  47. * @return array The updated Add-Ons list. 
  48. */ 
  49. public function register( $list ) { 
  50. $list[ self::ID ] = (object) array( 
  51. 'name' => __( 'Membership Attributes', 'membership2' ),  
  52. 'description' => __( 'Add custom attributes to your memberships that you can use in shortcodes and code.', 'membership2' ),  
  53. 'icon' => 'wpmui-fa wpmui-fa-tags',  
  54. 'action' => array( __( 'Pro Version', 'membership2' ) ),  
  55. ); 
  56. return $list; 
  57.  
.