addons-page.php
4 years ago
base-page.php
4 years ago
page-config.php
4 years ago
pages-manager.php
4 years ago
settings-page.php
4 years ago
addons-page.php
58 lines
| 1 | <?php |
| 2 | namespace Jet_Form_Builder\Admin\Pages; |
| 3 | |
| 4 | use Jet_Form_Builder\Plugin; |
| 5 | |
| 6 | class Addons_Page extends Base_Page { |
| 7 | |
| 8 | /** |
| 9 | * Page slug |
| 10 | */ |
| 11 | public function slug(): string { |
| 12 | return 'jfb-addons'; |
| 13 | } |
| 14 | |
| 15 | /** |
| 16 | * Page title |
| 17 | */ |
| 18 | public function title(): string { |
| 19 | return __( 'Addons', 'jet-form-builder' ); |
| 20 | } |
| 21 | |
| 22 | /** |
| 23 | * Page Assets |
| 24 | */ |
| 25 | public function assets() { |
| 26 | parent::assets(); |
| 27 | |
| 28 | wp_enqueue_style( |
| 29 | $this->slug(), |
| 30 | Plugin::instance()->plugin_url( 'assets/css/admin/settings.css' ), |
| 31 | array(), |
| 32 | Plugin::instance()->get_version() |
| 33 | ); |
| 34 | } |
| 35 | |
| 36 | /** |
| 37 | * Return page config array |
| 38 | */ |
| 39 | public function page_config(): array { |
| 40 | |
| 41 | return apply_filters( |
| 42 | 'jfb-addons-page/page-localize-data', |
| 43 | array( |
| 44 | 'ajaxUrl' => esc_url_raw( admin_url( 'admin-ajax.php' ) ), |
| 45 | 'allAddons' => Plugin::instance()->addons_manager->get_plugin_data_list(), |
| 46 | 'licenseMode' => false, |
| 47 | 'licenseKey' => '', |
| 48 | 'licenseList' => array(), |
| 49 | 'themeInfo' => Plugin::instance()->addons_manager->get_theme_info(), |
| 50 | 'miscInfo' => array( |
| 51 | 'mainSiteUrl' => 'https://jetformbuilder.com/', |
| 52 | 'pricingPageUrl' => 'https://jetformbuilder.com/pricing/', |
| 53 | ), |
| 54 | ) |
| 55 | ); |
| 56 | } |
| 57 | } |
| 58 |