| @@ -68,8 +68,9 @@ | ||
| 68 | 68 | 'yes' => esc_html__( 'Yes' ), |
| 69 | 69 | 'cancel' => esc_html__( 'Cancel' ), |
| 70 | 70 | 'generate_with_ai' => esc_html__( 'Generate with AI', 'learnpress' ), |
| 71 | 71 | 'confirm_close_ai' => esc_html__( 'Are you sure you want to close? Generate data will stop.', 'learnpress' ), |
| 72 | + 'select_user' => esc_html__( 'Select users', 'learnpress' ), | |
| 72 | 73 | ), |
| 73 | 74 | 'current_screen' => $screen ? $screen->id : '', |
| 74 | 75 | 'show_search_author_field' => empty( $html_search_author_field ) ? 0 : $html_search_author_field, |
| 75 | 76 | 'toast' => array( |
| @@ -501,16 +502,15 @@ | ||
| 501 | 502 | array( 'learnpress_page_learn-press-tools' ), |
| 502 | 503 | 0, |
| 503 | 504 | 1 |
| 504 | 505 | ),*/ |
| 505 | - /* | |
| 506 | - 'lp-setup' => new LP_Asset_Key( | |
| 507 | - $this->url( 'js/dist/admin/pages/setup' . self::$_min_assets . '.js' ), | |
| 508 | - array( 'jquery', 'dropdown-pages' ), | |
| 506 | + 'lp-setup-wizard' => new LP_Asset_Key( | |
| 507 | + $this->url( 'dist/js/admin/setup-wizard' . self::$_min_assets . '.js' ), | |
| 508 | + [], | |
| 509 | 509 | array( 'lp-page-setup' ), |
| 510 | 510 | 0, |
| 511 | 511 | 1 |
| 512 | - ),*/ | |
| 512 | + ), | |
| 513 | 513 | /* |
| 514 | 514 | 'learn-press-statistic' => new LP_Asset_Key( |
| 515 | 515 | $this->url( 'js/dist/admin/pages/statistic' . self::$_min_assets . '.js' ), |
| 516 | 516 | array( 'jquery', 'jquery-ui-datepicker', 'chart' ), |
| @@ -594,16 +594,25 @@ | ||
| 594 | 594 | '', |
| 595 | 595 | array( 'strategy' => 'async' ) |
| 596 | 596 | ), |
| 597 | 597 | 'lp-admin-tools' => new LP_Asset_Key( |
| 598 | - $this->url( 'js/dist/admin/admin-tools' . self::$_min_assets . '.js' ), | |
| 598 | + $this->url( 'dist/js/admin/admin-tools' . self::$_min_assets . '.js' ), | |
| 599 | 599 | array(), |
| 600 | 600 | array( 'learnpress_page_learn-press-tools' ), |
| 601 | 601 | 0, |
| 602 | - 1, | |
| 602 | + 0, | |
| 603 | 603 | '', |
| 604 | 604 | array( 'strategy' => 'defer' ) |
| 605 | 605 | ), |
| 606 | + 'lp-themes' => new LP_Asset_Key( | |
| 607 | + $this->url( 'dist/js/admin/lp-themes' . self::$_min_assets . '.js' ), | |
| 608 | + array(), | |
| 609 | + array( 'learnpress_page_learn-press-themes' ), | |
| 610 | + 0, | |
| 611 | + 0, | |
| 612 | + '', | |
| 613 | + array( 'strategy' => 'async' ) | |
| 614 | + ), | |
| 606 | 615 | 'lp-admin-statistic' => new LP_Asset_Key( |
| 607 | 616 | $this->url( 'js/dist/admin/admin-statistic' . self::$_min_assets . '.js' ), |
| 608 | 617 | array( 'lp-load-ajax' ), |
| 609 | 618 | array( 'learnpress_page_learn-press-statistics' ), |
| @@ -683,8 +692,15 @@ | ||
| 683 | 692 | array(), |
| 684 | 693 | array( 'learnpress_page_learn-press-help-center' ), |
| 685 | 694 | 0 |
| 686 | 695 | ), |
| 696 | + 'lp-themes' => new LP_Asset_Key( | |
| 697 | + $this->url( 'css/admin/themes' . $is_rtl . self::$_min_assets . '.css' ), | |
| 698 | + array(), | |
| 699 | + array( 'learnpress_page_learn-press-themes' ), | |
| 700 | + 0, | |
| 701 | + 0 | |
| 702 | + ), | |
| 687 | 703 | 'lp-edit-curriculum' => new LP_Asset_Key( |
| 688 | 704 | $this->url( 'css/edit-curriculum' . $is_rtl . self::$_min_assets . '.css' ), |
| 689 | 705 | array(), |
| 690 | 706 | array(), |
| @@ -701,14 +717,14 @@ | ||
| 701 | 717 | array(), |
| 702 | 718 | array(), |
| 703 | 719 | 1 |
| 704 | 720 | ), |
| 705 | - 'learn-press-statistic' => new LP_Asset_Key( | |
| 721 | + /*'learn-press-statistic' => new LP_Asset_Key( | |
| 706 | 722 | LP_CSS_URL . 'admin/statistic' . $is_rtl . self::$_min_assets . '.css', |
| 707 | 723 | array(), |
| 708 | 724 | array( 'learners_page_learn-press-statistics' ), |
| 709 | 725 | 0 |
| 710 | - ), | |
| 726 | + ),*/ | |
| 711 | 727 | 'lp-tom-select' => new LP_Asset_Key( |
| 712 | 728 | $this->url( 'src/css/vendor/tom-select.min.css' ), |
| 713 | 729 | array(), |
| 714 | 730 | array(), |
| @@ -713,8 +729,14 @@ | ||
| 713 | 729 | array(), |
| 714 | 730 | array(), |
| 715 | 731 | 0 |
| 716 | 732 | ), |
| 733 | + 'lp-setup-wizard' => new LP_Asset_Key( | |
| 734 | + $this->url( 'css/admin/setup-wizard' . $is_rtl . self::$_min_assets . '.css' ), | |
| 735 | + array(), | |
| 736 | + array(), | |
| 737 | + 1 | |
| 738 | + ), | |
| 717 | 739 | ) |
| 718 | 740 | ); |
| 719 | 741 | } |
| 720 | 742 | |
| @@ -724,9 +746,9 @@ | ||
| 724 | 746 | public function load_scripts() { |
| 725 | 747 | $screen_id = LP_Admin::instance()->get_screen_id(); |
| 726 | 748 | |
| 727 | 749 | if ( empty( $screen_id ) ) { |
| 728 | - return; | |
| 750 | + $screen_id = ''; | |
| 729 | 751 | } |
| 730 | 752 | |
| 731 | 753 | // wp_enqueue_media(); //Todo: tungnx need check why call for that using. |
| 732 | 754 | $this->handle_js( $screen_id ); |
| @@ -820,8 +842,11 @@ | ||
| 820 | 842 | ) |
| 821 | 843 | ); |
| 822 | 844 | }*/ |
| 823 | 845 | |
| 846 | + /** | |
| 847 | + * Instance | |
| 848 | + */ | |
| 824 | 849 | public static function instance() { |
| 825 | 850 | if ( ! is_admin() ) { |
| 826 | 851 | return null; |
| 827 | 852 | } |