static function admin_enqueue_scripts()
 {
     /*$q = new LP_Question();
     		$q->admin_script();*/
     LP_Admin_Assets::enqueue_style('select2', RWMB_CSS_URL . 'select2/select2.css');
     LP_Admin_Assets::enqueue_script('select2', RWMB_JS_URL . 'select2/select2.min.js');
     LP_Admin_Assets::enqueue_script('lpr-quiz-question', learn_press_plugin_url('assets/js/admin/meta-box-quiz.js'));
     wp_enqueue_script('modal-search-items');
 }
 /**
  * Load assets for admin
  */
 static function load_scripts()
 {
     self::add_style('learn-press-global', learn_press_plugin_url('assets/css/global-style.css'));
     self::add_style('learn-press-ui', learn_press_plugin_url('assets/css/ui.css'));
     self::add_style('learn-press-admin', learn_press_plugin_url('assets/css/learnpress-admin.css'), array('learn-press-global', 'learn-press-ui'));
     self::add_style('learn-press-icon', learn_press_plugin_url('assets/css/style.css'));
     self::add_script('learn-press-ui', learn_press_plugin_url('assets/js/ui.js'));
     self::add_script('learn-press-admin', learn_press_plugin_url('assets/js/admin/learnpress.js'), array('learn-press-ui'));
 }
 /**
  * Output common js settings in admin
  *
  * @since 0.9.4
  */
 function plugin_js_settings()
 {
     static $did = false;
     if ($did) {
         return;
     }
     $js = array('ajax' => admin_url('admin-ajax.php'), 'plugin_url' => learn_press_plugin_url(), 'siteurl' => home_url());
     echo '<script type="text/javascript">var LearnPress_Settings = ' . json_encode($js) . '</script>';
     if (LP_Settings::instance()->get('debug') == 'yes') {
         echo '<script type="text/javascript">var LEARN_PRESS_DEBUG = true;</script>';
     }
     $did = true;
 }
 /**
  * Enqueue scripts and styles
  *
  * @return void
  */
 static function admin_enqueue_scripts()
 {
     LP_Admin_Assets::enqueue_style('meta-box-course', LP()->plugin_url('assets/css/admin/meta-box-course.css'));
     LP_Admin_Assets::enqueue_style('select2', RWMB_CSS_URL . 'select2/select2.css');
     // LP_Admin_Assets::enqueue_style( 'toastr',          LP_CSS_URL . 'toastr.css' );
     //LP_Admin_Assets::enqueue_style( 'thim-course',     LearnPress()->plugin_url( 'inc/admin/meta-boxes/css/course.css' ) );
     LP_Admin_Assets::enqueue_script('select2', RWMB_JS_URL . 'select2/select2.min.js');
     //LP_Admin_Assets::enqueue_script( 'toastr',         LP_JS_URL . 'toastr.js' );
     //LP_Admin_Assets::enqueue_script( 'tojson',         LP_JS_URL . 'toJSON.js' );
     LP_Admin_Assets::enqueue_script('modal-search-items');
     LP_Admin_Assets::enqueue_script('meta-box-course', learn_press_plugin_url('assets/js/admin/meta-box-course.js'), array('jquery'));
     LP_Admin_Assets::add_localize(array('confirm_remove_section_lesson' => __('Do you want to remove this lesson permanently?', 'learn_press'), 'confirm_remove_section_quiz' => __('Do you want to remove this quiz permanently?', 'learn_press'), 'confirm_remove_section' => __('Do you want to remove this section permanently?', 'learn_press'), 'add_new_quiz' => __('New quiz added', 'learn_press'), 'add_new_lesson' => __('New lesson added', 'learn_press'), 'add_new_section' => __('New section added', 'learn_press'), 'remove_section_lesson' => __('The lesson removed', 'learn_press'), 'remove_section_quiz' => __('The quiz removed', 'learn_press'), 'remove_section' => __('The section removed', 'learn_press'), 'section_ordered' => __('The ordering completed', 'learn_press'), 'add_lesson_to_section' => __('Lesson added to section complete!', 'learn_press'), 'add_quiz_to_section' => __('Quiz added to section complete!', 'learn_press'), 'update_lesson_quiz' => __('%s updated', 'learn_press'), 'quick_edit_name' => __('Click to quick edit name', 'learn_press'), 'save_course' => __('Save Course', 'learn_press'), 'submit_course_review' => __('Submit for Review', 'learn_press')), null, 'meta-box-course');
 }
 /**
  * Load assets for admin
  */
 static function load_scripts()
 {
     $screen = get_current_screen();
     $screen_id = $screen->id;
     if (in_array($screen_id, learn_press_get_screens())) {
         self::add_style('learn-press-global', learn_press_plugin_url('assets/css/global-style.css'));
         self::add_style('learn-press-admin', learn_press_plugin_url('assets/css/admin/admin.css'), array('learn-press-global'));
         self::add_style('learn-press-icons', learn_press_plugin_url('assets/css/icons.css'));
         //self::add_script( 'learn-press-ui', learn_press_plugin_url( 'assets/js/ui.js' ) );
         self::add_script('learn-press-admin', learn_press_plugin_url('assets/js/admin/admin.js'));
         self::add_script('modal-search-items', LearnPress()->plugin_url('assets/js/admin/modal-search-items.js'), array('jquery'));
     }
     if (in_array($screen_id, array('lp_order', 'order'))) {
         self::add_style('learn-press-order', learn_press_plugin_url('assets/css/admin/meta-box-order.css'));
         self::add_script('learn-press-order', LP()->plugin_url('assets/js/admin/meta-box-order.js'), array('backbone', 'wp-util'));
     }
 }
 /**
  * Load assets for frontend
  */
 static function load_scripts()
 {
     // global
     self::add_style('learn-press-icon', learn_press_plugin_url('assets/css/style.css'));
     self::add_script('learn-press-global', learn_press_plugin_url('assets/js/global.js'));
     self::add_script('learn-press-block-ui', learn_press_plugin_url('assets/js/jquery.block-ui.js'));
     // admin
     self::add_style('learn-press-admin', learn_press_plugin_url('assets/css/learnpress-admin.css'));
     // frontend
     self::add_style('learn-press', learn_press_plugin_url('assets/css/learnpress.css'));
     self::add_script('learn-press-js', learn_press_plugin_url('assets/js/frontend/learnpress.js'), array('learn-press-global'));
     // single course
     self::add_script('single-course', learn_press_plugin_url('assets/js/frontend/single-course.js'), array('backbone', 'utils'));
     if (LP()->settings->get('ajax_add_to_cart') == 'yes') {
         self::add_script('learn-press-add-to-cart', learn_press_plugin_url('assets/js/frontend/add-to-cart.js'));
     }
     // single quiz
     self::add_script('learn-press-timer', learn_press_plugin_url('assets/js/jquery.timer.js'));
     self::add_script('single-quiz', learn_press_plugin_url('assets/js/frontend/single-quiz.js'), array('backbone', 'utils'));
     // checkout page
     self::add_script('checkout', learn_press_plugin_url('assets/js/frontend/checkout.js'));
     //self::add_script( 'lpr-alert-js', LP_JS_URL . 'jquery.alert.js' );
     /*self::enqueue_style( 'lpr-learnpress-css' );
     		self::enqueue_style( 'lpr-time-circle-css' );
     
     		self::enqueue_script( 'learn-press-js' );
     		self::enqueue_script( 'lpr-alert-js' );
     		self::enqueue_script( 'lpr-time-circle-js' );
     		self::enqueue_script( 'block-ui' );
     */
 }
 /**
  * Load assets for frontend
  */
 static function load_scripts()
 {
     $deps = array('jquery', 'backbone', 'utils', 'course-lesson');
     // global
     self::add_style('learn-press-icon', learn_press_plugin_url('assets/css/icons.css'));
     self::add_script('learn-press-global', learn_press_plugin_url('assets/js/global.js'), $deps);
     //self::add_script( 'learn-press-block-ui', learn_press_plugin_url( 'assets/js/jquery.block-ui.js' ) );
     // admin
     self::add_style('learn-press-admin', learn_press_plugin_url('assets/css/admin/admin.css'));
     // frontend
     self::add_style('learn-press', learn_press_plugin_url('assets/css/learnpress.css'));
     self::add_script('learn-press-js', learn_press_plugin_url('assets/js/frontend/learnpress.js'), array('learn-press-global'));
     // lesson
     self::add_script('course-lesson', learn_press_plugin_url('assets/js/frontend/course-lesson.js'));
     // single course
     self::add_script('single-course', learn_press_plugin_url('assets/js/frontend/single-course.js'), $deps);
     if (LP()->settings->get('ajax_add_to_cart') == 'yes') {
         self::add_script('learn-press-add-to-cart', learn_press_plugin_url('assets/js/frontend/add-to-cart.js'));
     }
     // single quiz
     self::add_script('learn-press-timer', learn_press_plugin_url('assets/js/jquery.timer.js'));
     self::add_script('single-quiz', learn_press_plugin_url('assets/js/frontend/single-quiz.js'), $deps);
     // checkout page
     self::add_script('checkout', learn_press_plugin_url('assets/js/frontend/checkout.js'));
 }
 static function admin_assets()
 {
     LP_Admin_Assets::enqueue_style('learnpress-question', learn_press_plugin_url('assets/css/admin/meta-box-question.css'));
     LP_Admin_Assets::enqueue_script('learnpress-question', learn_press_plugin_url('assets/js/admin/meta-box-question.js'), array('jquery', 'jquery-ui-sortable'));
 }