| @@ -319,9 +319,9 @@ | ||
| 319 | 319 | '', |
| 320 | 320 | array( 'strategy' => 'async' ) |
| 321 | 321 | ), |
| 322 | 322 | // need build if change source vue |
| 323 | - 'vue-libs' => new LP_Asset_Key( $this->url( 'js/vendor/vue/vue_libs.js' ) ), | |
| 323 | + //'vue-libs' => new LP_Asset_Key( $this->url( 'js/vendor/vue/vue_libs.js' ) ), | |
| 324 | 324 | //'select2' => new LP_Asset_Key( $this->url( 'src/js/vendor/select2.full.min.js' ) ), |
| 325 | 325 | 'jquery-tipsy' => new LP_Asset_Key( $this->url( 'src/js/vendor/jquery/jquery-tipsy.js' ) ), |
| 326 | 326 | 'html2pdf' => new LP_Asset_Key( $this->url( 'src/js/vendor/html2pdf.bundle.min.js' ) ), |
| 327 | 327 | 'lp-utils' => new LP_Asset_Key( |
| @@ -329,12 +329,8 @@ | ||
| 329 | 329 | array(), |
| 330 | 330 | array(), |
| 331 | 331 | 1 |
| 332 | 332 | ), |
| 333 | - /*'dropdown-pages' => new LP_Asset_Key( | |
| 334 | - $this->url( self::$_folder_source . 'js/admin/share/dropdown-pages' . self::$_min_assets . '.js' ), | |
| 335 | - array( 'lp-utils', 'select2' ) | |
| 336 | - ),*/ | |
| 337 | 333 | /* |
| 338 | 334 | 'jquery-ui-timepicker-addon' => new LP_Asset_Key( |
| 339 | 335 | $this->url( 'src/js/vendor/jquery/jquery-ui-timepicker-addon.js' ), |
| 340 | 336 | array( 'jquery-ui-datepicker' ) |
| @@ -377,9 +373,8 @@ | ||
| 377 | 373 | array( |
| 378 | 374 | 'learn-press-global', |
| 379 | 375 | 'wp-color-picker', |
| 380 | 376 | 'jquery-tipsy', |
| 381 | - //'dropdown-pages', | |
| 382 | 377 | 'wp-api-fetch', |
| 383 | 378 | // 'jquery-ui-timepicker-addon', |
| 384 | 379 | // 'select2' |
| 385 | 380 | ), |
| @@ -506,16 +501,15 @@ | ||
| 506 | 501 | array( 'learnpress_page_learn-press-tools' ), |
| 507 | 502 | 0, |
| 508 | 503 | 1 |
| 509 | 504 | ),*/ |
| 510 | - /* | |
| 511 | - 'lp-setup' => new LP_Asset_Key( | |
| 512 | - $this->url( 'js/dist/admin/pages/setup' . self::$_min_assets . '.js' ), | |
| 513 | - array( 'jquery', 'dropdown-pages' ), | |
| 505 | + 'lp-setup-wizard' => new LP_Asset_Key( | |
| 506 | + $this->url( 'dist/js/admin/setup-wizard' . self::$_min_assets . '.js' ), | |
| 507 | + [], | |
| 514 | 508 | array( 'lp-page-setup' ), |
| 515 | 509 | 0, |
| 516 | 510 | 1 |
| 517 | - ),*/ | |
| 511 | + ), | |
| 518 | 512 | /* |
| 519 | 513 | 'learn-press-statistic' => new LP_Asset_Key( |
| 520 | 514 | $this->url( 'js/dist/admin/pages/statistic' . self::$_min_assets . '.js' ), |
| 521 | 515 | array( 'jquery', 'jquery-ui-datepicker', 'chart' ), |
| @@ -543,20 +537,9 @@ | ||
| 543 | 537 | 1 |
| 544 | 538 | ),*/ |
| 545 | 539 | 'lp-tools-course-tab' => new LP_Asset_Key( |
| 546 | 540 | $this->url( 'js/dist/admin/pages/tools' . self::$_min_assets . '.js' ), |
| 547 | - array( | |
| 548 | - 'jquery', | |
| 549 | - 'wp-element', | |
| 550 | - 'wp-compose', | |
| 551 | - 'wp-components', | |
| 552 | - 'wp-data', | |
| 553 | - 'wp-hooks', | |
| 554 | - 'wp-api-fetch', | |
| 555 | - 'lodash', | |
| 556 | - 'vue-libs', | |
| 557 | - | |
| 558 | - ), | |
| 541 | + [], | |
| 559 | 542 | array( 'learnpress_page_learn-press-tools' ), |
| 560 | 543 | 0, |
| 561 | 544 | 1, |
| 562 | 545 | '', |
| @@ -610,16 +593,25 @@ | ||
| 610 | 593 | '', |
| 611 | 594 | array( 'strategy' => 'async' ) |
| 612 | 595 | ), |
| 613 | 596 | 'lp-admin-tools' => new LP_Asset_Key( |
| 614 | - $this->url( 'js/dist/admin/admin-tools' . self::$_min_assets . '.js' ), | |
| 597 | + $this->url( 'dist/js/admin/admin-tools' . self::$_min_assets . '.js' ), | |
| 615 | 598 | array(), |
| 616 | 599 | array( 'learnpress_page_learn-press-tools' ), |
| 617 | 600 | 0, |
| 618 | - 1, | |
| 601 | + 0, | |
| 619 | 602 | '', |
| 620 | 603 | array( 'strategy' => 'defer' ) |
| 621 | 604 | ), |
| 605 | + 'lp-themes' => new LP_Asset_Key( | |
| 606 | + $this->url( 'dist/js/admin/lp-themes' . self::$_min_assets . '.js' ), | |
| 607 | + array(), | |
| 608 | + array( 'learnpress_page_learn-press-themes' ), | |
| 609 | + 0, | |
| 610 | + 0, | |
| 611 | + '', | |
| 612 | + array( 'strategy' => 'async' ) | |
| 613 | + ), | |
| 622 | 614 | 'lp-admin-statistic' => new LP_Asset_Key( |
| 623 | 615 | $this->url( 'js/dist/admin/admin-statistic' . self::$_min_assets . '.js' ), |
| 624 | 616 | array( 'lp-load-ajax' ), |
| 625 | 617 | array( 'learnpress_page_learn-press-statistics' ), |
| @@ -693,8 +685,21 @@ | ||
| 693 | 685 | ), |
| 694 | 686 | array(), |
| 695 | 687 | 0 |
| 696 | 688 | ), |
| 689 | + 'lp-help-center' => new LP_Asset_Key( | |
| 690 | + $this->url( 'css/admin/help-center' . $is_rtl . self::$_min_assets . '.css' ), | |
| 691 | + array(), | |
| 692 | + array( 'learnpress_page_learn-press-help-center' ), | |
| 693 | + 0 | |
| 694 | + ), | |
| 695 | + 'lp-themes' => new LP_Asset_Key( | |
| 696 | + $this->url( 'css/admin/themes' . $is_rtl . self::$_min_assets . '.css' ), | |
| 697 | + array(), | |
| 698 | + array( 'learnpress_page_learn-press-themes' ), | |
| 699 | + 0, | |
| 700 | + 0 | |
| 701 | + ), | |
| 697 | 702 | 'lp-edit-curriculum' => new LP_Asset_Key( |
| 698 | 703 | $this->url( 'css/edit-curriculum' . $is_rtl . self::$_min_assets . '.css' ), |
| 699 | 704 | array(), |
| 700 | 705 | array(), |
| @@ -711,14 +716,14 @@ | ||
| 711 | 716 | array(), |
| 712 | 717 | array(), |
| 713 | 718 | 1 |
| 714 | 719 | ), |
| 715 | - 'learn-press-statistic' => new LP_Asset_Key( | |
| 720 | + /*'learn-press-statistic' => new LP_Asset_Key( | |
| 716 | 721 | LP_CSS_URL . 'admin/statistic' . $is_rtl . self::$_min_assets . '.css', |
| 717 | 722 | array(), |
| 718 | 723 | array( 'learners_page_learn-press-statistics' ), |
| 719 | 724 | 0 |
| 720 | - ), | |
| 725 | + ),*/ | |
| 721 | 726 | 'lp-tom-select' => new LP_Asset_Key( |
| 722 | 727 | $this->url( 'src/css/vendor/tom-select.min.css' ), |
| 723 | 728 | array(), |
| 724 | 729 | array(), |
| @@ -723,8 +728,14 @@ | ||
| 723 | 728 | array(), |
| 724 | 729 | array(), |
| 725 | 730 | 0 |
| 726 | 731 | ), |
| 732 | + 'lp-setup-wizard' => new LP_Asset_Key( | |
| 733 | + $this->url( 'css/admin/setup-wizard' . $is_rtl . self::$_min_assets . '.css' ), | |
| 734 | + array(), | |
| 735 | + array(), | |
| 736 | + 1 | |
| 737 | + ), | |
| 727 | 738 | ) |
| 728 | 739 | ); |
| 729 | 740 | } |
| 730 | 741 | |
| @@ -734,9 +745,9 @@ | ||
| 734 | 745 | public function load_scripts() { |
| 735 | 746 | $screen_id = LP_Admin::instance()->get_screen_id(); |
| 736 | 747 | |
| 737 | 748 | if ( empty( $screen_id ) ) { |
| 738 | - return; | |
| 749 | + $screen_id = ''; | |
| 739 | 750 | } |
| 740 | 751 | |
| 741 | 752 | // wp_enqueue_media(); //Todo: tungnx need check why call for that using. |
| 742 | 753 | $this->handle_js( $screen_id ); |
| @@ -830,8 +841,11 @@ | ||
| 830 | 841 | ) |
| 831 | 842 | ); |
| 832 | 843 | }*/ |
| 833 | 844 | |
| 845 | + /** | |
| 846 | + * Instance | |
| 847 | + */ | |
| 834 | 848 | public static function instance() { |
| 835 | 849 | if ( ! is_admin() ) { |
| 836 | 850 | return null; |
| 837 | 851 | } |