| @@ -1,7 +1,8 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | namespace Elementor\Core\Common\Modules\Connect; |
| 3 | 3 | |
| 4 | +use Elementor\Utils; | |
| 4 | 5 | use Elementor\Core\Base\Module as BaseModule; |
| 5 | 6 | use Elementor\Core\Common\Modules\Connect\Apps\Base_App; |
| 6 | 7 | use Elementor\Core\Common\Modules\Connect\Apps\Connect; |
| 7 | 8 | use Elementor\Core\Common\Modules\Connect\Apps\Library; |
| @@ -11,8 +12,11 @@ | ||
| 11 | 12 | exit; // Exit if accessed directly |
| 12 | 13 | } |
| 13 | 14 | |
| 14 | 15 | class Module extends BaseModule { |
| 16 | + const ACCESS_LEVEL_CORE = 0; | |
| 17 | + const ACCESS_LEVEL_PRO = 1; | |
| 18 | + const ACCESS_LEVEL_EXPERT = 20; | |
| 15 | 19 | |
| 16 | 20 | /** |
| 17 | 21 | * @since 2.3.0 |
| 18 | 22 | * @access public |
| @@ -166,7 +170,32 @@ | ||
| 166 | 170 | * @access public |
| 167 | 171 | */ |
| 168 | 172 | public function get_categories() { |
| 169 | 173 | return $this->categories; |
| 174 | + } | |
| 175 | + | |
| 176 | + /** | |
| 177 | + * @param $context | |
| 178 | + * | |
| 179 | + * @return array | |
| 180 | + */ | |
| 181 | + public function get_subscription_plans( $context ) { | |
| 182 | + return [ | |
| 183 | + static::ACCESS_LEVEL_CORE => [ | |
| 184 | + 'label' => null, | |
| 185 | + 'promotion_url' => null, | |
| 186 | + 'color' => null, | |
| 187 | + ], | |
| 188 | + static::ACCESS_LEVEL_PRO => [ | |
| 189 | + 'label' => 'Pro', | |
| 190 | + 'promotion_url' => Utils::get_pro_link( "https://elementor.com/pro/?utm_source={$context}&utm_medium=wp-dash&utm_campaign=gopro" ), | |
| 191 | + 'color' => '#92003B', | |
| 192 | + ], | |
| 193 | + static::ACCESS_LEVEL_EXPERT => [ | |
| 194 | + 'label' => 'Expert', | |
| 195 | + 'promotion_url' => Utils::get_pro_link( "https://elementor.com/pro/?utm_source={$context}&utm_medium=wp-dash&utm_campaign=goexpert" ), | |
| 196 | + 'color' => '#010051', | |
| 197 | + ], | |
| 198 | + ]; | |
| 170 | 199 | } |
| 171 | 200 | |
| 172 | 201 | } |