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