FS_Plugin

The NextGEN Gallery FS Plugin class.

Defined (1)

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

/freemius/includes/entities/class-fs-plugin.php  
  1. class FS_Plugin extends FS_Scope_Entity { 
  2. /** 
  3. * @since 1.0.6 
  4. * @var null|number 
  5. */ 
  6. public $parent_plugin_id; 
  7. /** 
  8. * @var string 
  9. */ 
  10. public $title; 
  11. /** 
  12. * @var string 
  13. */ 
  14. public $slug; 
  15. /** 
  16. * @var string 'plugin' or 'theme' 
  17. */ 
  18. public $type; 
  19.  
  20. #region Install Specific Properties 
  21.  
  22. /** 
  23. * @var string 
  24. */ 
  25. public $file; 
  26. /** 
  27. * @var string 
  28. */ 
  29. public $version; 
  30. /** 
  31. * @var bool 
  32. */ 
  33. public $auto_update; 
  34. /** 
  35. * @var FS_Plugin_Info 
  36. */ 
  37. public $info; 
  38. /** 
  39. * @since 1.0.9 
  40. * @var bool 
  41. */ 
  42. public $is_premium; 
  43. /** 
  44. * @since 1.0.9 
  45. * @var bool 
  46. */ 
  47. public $is_live; 
  48.  
  49. #endregion Install Specific Properties 
  50.  
  51. /** 
  52. * @param stdClass|bool $plugin 
  53. */ 
  54. function __construct( $plugin = false ) { 
  55. parent::__construct( $plugin ); 
  56.  
  57. $this->is_premium = false; 
  58. $this->is_live = true; 
  59.  
  60. if ( isset( $plugin->info ) && is_object( $plugin->info ) ) { 
  61. $this->info = new FS_Plugin_Info( $plugin->info ); 
  62.  
  63. /** 
  64. * Check if plugin is an add-on (has parent). 
  65. * @author Vova Feldman (@svovaf) 
  66. * @since 1.0.6 
  67. * @return bool 
  68. */ 
  69. function is_addon() { 
  70. return isset( $this->parent_plugin_id ) && is_numeric( $this->parent_plugin_id ); 
  71.  
  72. static function get_type() { 
  73. return 'plugin';