@@ 79-87 (lines=9) @@ | ||
76 | * |
|
77 | * @return Jetpack_Memberships |
|
78 | */ |
|
79 | public static function get_instance() { |
|
80 | if ( ! self::$instance ) { |
|
81 | self::$instance = new self(); |
|
82 | self::$instance->register_init_hook(); |
|
83 | // Yes, `personal-bundle` with a dash, `jetpack_personal` with an underscore. Check the v1.5 endpoint to verify. |
|
84 | self::$required_plan = ( defined( 'IS_WPCOM' ) && IS_WPCOM ) ? 'personal-bundle' : 'jetpack_personal'; |
|
85 | } |
|
86 | ||
87 | return self::$instance; |
|
88 | } |
|
89 | /** |
|
90 | * Get the map that defines the shape of CPT post. keys are names of fields and |
@@ 30-37 (lines=8) @@ | ||
27 | // Classic singleton pattern: |
|
28 | private static $instance; |
|
29 | private function __construct() {} |
|
30 | static function getInstance() { |
|
31 | if ( ! self::$instance ) { |
|
32 | self::$instance = new self(); |
|
33 | self::$instance->register_init_hooks(); |
|
34 | self::$required_plan = ( defined( 'IS_WPCOM' ) && IS_WPCOM ) ? 'value_bundle' : 'jetpack_premium'; |
|
35 | } |
|
36 | return self::$instance; |
|
37 | } |
|
38 | ||
39 | private function register_scripts_and_styles() { |
|
40 | /** |