| 1 |
<?php |
| 2 |
|
| 3 |
// Exit if accessed directly. |
| 4 |
defined( 'ABSPATH' ) || exit; |
| 5 |
|
| 6 |
define( 'BORDERLESS_MAIN_FILE', __FILE__ ); |
| 7 |
|
| 8 |
// Carrega a classe do SDK |
| 9 |
require_once BORDERLESS__INC . '/templates/license/license-client.php'; |
| 10 |
|
| 11 |
// Inicializa o gerenciador de licença depois de plugins_loaded |
| 12 |
function borderless_init_license_manager() { |
| 13 |
|
| 14 |
if ( ! class_exists( 'BORDERLESS_LICENSE' ) ) { |
| 15 |
return; |
| 16 |
} |
| 17 |
|
| 18 |
$wcam_lib_custom_menu = array( |
| 19 |
'menu_type' => 'add_submenu_page', |
| 20 |
'parent_slug' => 'borderless.php', |
| 21 |
'page_title' => __( 'License', 'vslmd' ), |
| 22 |
'menu_title' => __( 'License', 'vslmd' ), |
| 23 |
); |
| 24 |
|
| 25 |
global $borderless_license; |
| 26 |
|
| 27 |
$borderless_license = new BORDERLESS_LICENSE( |
| 28 |
BORDERLESS_MAIN_FILE, // usa o principal do plugin |
| 29 |
'', // product_id vazio, vai usar o select |
| 30 |
null, |
| 31 |
'1.0.0', |
| 32 |
'plugin', |
| 33 |
'https://visualmodo.com/', |
| 34 |
__( 'Borderless Pro', 'vslmd' ), |
| 35 |
'vslmd', |
| 36 |
$wcam_lib_custom_menu |
| 37 |
); |
| 38 |
} |
| 39 |
add_action( 'plugins_loaded', 'borderless_init_license_manager' ); |
| 40 |
|