| @@ -365,12 +365,15 @@ | ||
| 365 | 365 | * @since v.1.0.0 |
| 366 | 366 | * @return void No return value. |
| 367 | 367 | */ |
| 368 | 368 | public function register_option_panel_scripts_callback() { |
| 369 | - $is_active = ultimate_post()->is_lc_active(); | |
| 370 | - $license_key = Xpo::get_lc_key(); | |
| 369 | + $is_active = ultimate_post()->is_lc_active(); | |
| 370 | + $is_expired = Xpo::is_lc_expired(); | |
| 371 | + | |
| 372 | + $license_key = Xpo::get_lc_key(); | |
| 371 | 373 | $_page = isset($_GET['page']) ? sanitize_text_field($_GET['page']) : ''; // @codingStandardsIgnoreLine |
| 372 | - $post_type = get_post_type(); | |
| 374 | + $post_type = get_post_type(); | |
| 375 | + $is_woocommerce_active = class_exists( 'WooCommerce' ) ? true : false; | |
| 373 | 376 | |
| 374 | 377 | wp_enqueue_style( 'wp-color-picker' ); |
| 375 | 378 | wp_enqueue_script( 'wp-color-picker' ); |
| 376 | 379 | |
| @@ -382,13 +385,15 @@ | ||
| 382 | 385 | array( |
| 383 | 386 | 'url' => ULTP_URL, |
| 384 | 387 | 'version' => ULTP_VER, |
| 385 | 388 | 'active' => $is_active, |
| 389 | + 'expierd' => $is_expired, | |
| 386 | 390 | 'security' => wp_create_nonce( 'ultp-nonce' ), |
| 387 | 391 | 'ajax' => admin_url( 'admin-ajax.php' ), |
| 388 | 392 | 'settings' => ultimate_post()->get_setting(), |
| 389 | 393 | 'post_type' => $post_type, |
| 390 | 394 | 'saved_template_url' => admin_url( 'admin.php?page=ultp-settings#saved-templates' ), |
| 395 | + 'woocommerce' => $is_woocommerce_active, | |
| 391 | 396 | ) |
| 392 | 397 | ); |
| 393 | 398 | |
| 394 | 399 | if ( $post_type == 'ultp_custom_font' ) { |
| @@ -431,8 +436,9 @@ | ||
| 431 | 436 | 'ajax' => admin_url( 'admin-ajax.php' ), |
| 432 | 437 | 'security' => wp_create_nonce( 'ultp-nonce' ), |
| 433 | 438 | 'url' => ULTP_URL, |
| 434 | 439 | 'active' => $is_active, |
| 440 | + 'expierd' => $is_expired, | |
| 435 | 441 | 'license' => $license_key, |
| 436 | 442 | 'settings' => ultimate_post()->get_setting(), |
| 437 | 443 | 'addons_settings' => apply_filters( 'ultp_settings', array() ), |
| 438 | 444 | 'builder_url' => admin_url( 'admin.php?page=ultp-settings#builder' ), |
| @@ -462,8 +468,9 @@ | ||
| 462 | 468 | * @return void No return value. |
| 463 | 469 | */ |
| 464 | 470 | public function register_block_scripts_editor_area() { |
| 465 | 471 | ultimate_post()->register_scripts_common(); |
| 472 | + $is_expired = Xpo::is_lc_expired(); | |
| 466 | 473 | global $pagenow; |
| 467 | 474 | $depends = 'wp-editor'; |
| 468 | 475 | if ( $pagenow === 'widgets.php' ) { |
| 469 | 476 | $depends = 'wp-edit-widgets'; |
| @@ -528,8 +535,9 @@ | ||
| 528 | 535 | 'disable_image_size' => ultimate_post()->get_setting( 'disable_image_size' ), |
| 529 | 536 | 'dark_logo' => get_option( 'ultp_site_dark_logo' ) ? get_option( 'ultp_site_dark_logo' ) : false, |
| 530 | 537 | 'builder_url' => admin_url( 'admin.php?page=ultp-settings#builder' ), |
| 531 | 538 | 'custom_fonts' => $custom_fonts, |
| 539 | + 'expierd' => $is_expired, | |
| 532 | 540 | ) |
| 533 | 541 | ); |
| 534 | 542 | wp_set_script_translations( 'ultp-blocks-editor-script', 'ultimate-post', ULTP_PATH . 'languages/' ); |
| 535 | 543 | } |