Skip to content

Commit

Permalink
Merge branch 'release/3.2.5.4' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
tunnhn committed Apr 22, 2019
2 parents 0984488 + 185b351 commit 8fd5598
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 29 deletions.
13 changes: 8 additions & 5 deletions assets/js/vendor/chart.min.js

Large diffs are not rendered by default.

34 changes: 24 additions & 10 deletions inc/admin/class-lp-admin-assets.php
Expand Up @@ -66,27 +66,41 @@ protected function _get_scripts() {
'lp-vue' => array(
'url' => self::url( 'js/vendor/vue' . $min . '.js' ),
'ver' => '2.5.16',
'deps' => array( 'lp-vuex', 'lp-vue-resource', 'lp-vuedraggable' ),
'screens' => array(
'learnpress_page_learn-press-tools'
'learnpress'
)
),
'lp-vuex' => array(
'url' => self::url( 'js/vendor/vuex.js' ),
'ver' => '3.1.0'
'url' => self::url( 'js/vendor/vuex.js' ),
'ver' => '3.1.0',
'deps' => array( 'lp-vue' ),
'screens' => array(
'learnpress'
)
),
'lp-vue-resource' => array(
'url' => self::url( 'js/vendor/vue-resource.js' ),
'ver' => '1.3.4'
'url' => self::url( 'js/vendor/vue-resource.js' ),
'ver' => '1.3.4',
'deps' => array( 'lp-vue' ),
'screens' => array(
'learnpress'
)
),
'lp-sortable' => array(
'url' => self::url( 'js/vendor/sortable.js' ),
'ver' => '1.6.0'
'url' => self::url( 'js/vendor/sortable.js' ),
'ver' => '1.6.0',
'deps' => array( 'lp-vue' ),
'screens' => array(
'learnpress'
)
),
'lp-vuedraggable' => array(
'url' => self::url( 'js/vendor/vuedraggable.js' ),
'ver' => '2.14.1',
'deps' => array( 'lp-sortable' )
'deps' => array( 'lp-vue', 'lp-sortable' ),
'screens' => array(
'learnpress'
)
),
'learn-press-global' => array(
'url' => $this->url( 'js/global.js' ),
Expand Down Expand Up @@ -174,7 +188,7 @@ protected function _get_scripts() {
'deps' => array( 'lp-vue' )
),
'learn-press-chartjs' => array(
'url' => $this->url( 'js/vendor/chart.min.js' ),
'url' => $this->url( 'js/vendor/chart.min.js' ),
'screens' => 'dashboard'
)
)
Expand Down
15 changes: 9 additions & 6 deletions inc/admin/lp-admin-functions.php
Expand Up @@ -2307,7 +2307,10 @@ function learn_press_is_admin_page() {
$is_learnpress = false;

// Is editing post-type of LP
$post_types = array( LP_COURSE_CPT, LP_QUIZ_CPT, LP_LESSON_CPT, LP_QUESTION_CPT, LP_ORDER_CPT );
$post_types = apply_filters(
'learn-press/admin-post-type-pages',
array( LP_COURSE_CPT, LP_QUIZ_CPT, LP_LESSON_CPT, LP_QUESTION_CPT, LP_ORDER_CPT, 'lp_cert', 'lp_assignment' )
);
foreach ( $post_types as $post_type ) {
if ( in_array( $screen_id, array( "edit-{$post_type}", $post_type ) ) ) {
$is_learnpress = true;
Expand Down Expand Up @@ -2340,15 +2343,15 @@ function learn_press_get_orders_status_chart_data() {
'rgba(75, 192, 192, 0.2)',
'rgba(153, 102, 255, 0.2)',
'rgba(255, 159, 64, 0.2)'
),
),
'borderColor' => array(
'rgba(54, 162, 235, 1)',
'rgba(255, 206, 86, 1)',
'rgba(75, 192, 192, 1)',
'rgba(153, 102, 255, 1)',
'rgba(255, 159, 64, 1)'
),
'borderWidth' => 1
),
'borderWidth' => 1
)
]
),
Expand Down Expand Up @@ -2381,8 +2384,8 @@ function learn_press_get_orders_status_chart_data() {
$counts = learn_press_count_orders( array( 'status' => $specific_statuses ) );

foreach ( $counts as $k => $v ) {
$data['data']['labels'][] = isset( $labels[ $k ] ) ? $labels[ $k ] : 'Untitled';
$data['data']['datasets'][0]['data'][] = $v;
$data['data']['labels'][] = isset( $labels[ $k ] ) ? $labels[ $k ] : 'Untitled';
$data['data']['datasets'][0]['data'][] = $v;
//$data['data']['datasets'][0]['backgroundColor'][] = 'rgba(54, 162, 235, 0.2)';
//$data['data']['datasets'][0]['borderColor'][] = 'rgba(54, 162, 235, 1)';
}
Expand Down
1 change: 1 addition & 0 deletions inc/class-lp-assets.php
Expand Up @@ -175,6 +175,7 @@ public function load_scripts() {
}*/
$enqueue = apply_filters( 'learn-press/enqueue-script', $enqueue, $handle );
if ( $handle == 'font-awesome' || $enqueue ) {
wp_enqueue_script('jquery');
wp_enqueue_script( $handle );
}
}
Expand Down
1 change: 1 addition & 0 deletions inc/class-lp-emails.php
Expand Up @@ -126,6 +126,7 @@ public function register_emails() {
//$this->emails['LP_Email_User_Order_Changed_Status'] = include( 'emails/class-lp-email-user-order-changed-status.php' );

//$this->emails['LP_Email_Enrolled_Course_Admin'] = include( 'emails/class-lp-email-enrolled-course-admin.php' );
do_action_ref_array( 'learn-press/register-emails', array( &$this->emails, $this ) );
}


Expand Down
15 changes: 10 additions & 5 deletions inc/custom-post-types/abstract.php
Expand Up @@ -149,8 +149,13 @@ public function admin_footer_scripts() {
?>
<script>
jQuery(function ($) {
var $input = $('#post-search-input'),
$form = $($input[0].form),
var $input = $('#post-search-input');

if (!$input.length) {
return;
}

var $form = $($input[0].form),
$select = $('<select name="author" id="author"></select>').append($('<?php echo $option;?>')).insertAfter($input).select2({
ajax: {
url: window.location.href + '&lp-ajax=search-authors',
Expand Down Expand Up @@ -635,8 +640,8 @@ public function columns_content( $column, $post_id = 0 ) {
}

/**
* Get string for searching
*
* Get string for searching
*
* @return string
*/
private function _get_search() {
Expand Down Expand Up @@ -801,7 +806,7 @@ public function updated_messages( $messages ) {
}
}

class LP_Abstract_Post_Type_Core extends LP_Abstract_Post_Type{
class LP_Abstract_Post_Type_Core extends LP_Abstract_Post_Type {
/**
* Get string for searching
*
Expand Down
2 changes: 1 addition & 1 deletion inc/lp-constants.php
Expand Up @@ -4,7 +4,7 @@
*/
$upload_dir = wp_upload_dir();
// version
define( 'LEARNPRESS_VERSION', '3.2.5.3' );
define( 'LEARNPRESS_VERSION', '3.2.5.4' );

define( 'LP_WP_CONTENT', basename( WP_CONTENT_DIR ) );

Expand Down
2 changes: 1 addition & 1 deletion learnpress.php
Expand Up @@ -4,7 +4,7 @@
Plugin URI: http://thimpress.com/learnpress
Description: LearnPress is a WordPress complete solution for creating a Learning Management System (LMS). It can help you to create courses, lessons and quizzes.
Author: ThimPress
Version: 3.2.5.3
Version: 3.2.5.4
Author URI: http://thimpress.com
Requires at least: 3.8
Tested up to: 5.0.2
Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Expand Up @@ -4,7 +4,7 @@ Donate link:
Tags: WordPress LMS, LMS, eLearning, e-Learning, Learning Management System, LMS WordPress, Course, Courses, Quiz, Quizzes, Training, Guru, Sell Courses
Requires at least: 3.8
Tested up to: 5.0.2
Stable tag: 3.2.5.3
Stable tag: 3.2.5.4
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -199,6 +199,9 @@ https://www.transifex.com/projects/p/learnpress/
8. Add-ons of LearnPress.

== Changelog ==
= 3.2.5.4 =
~ Fixed load js missing dependencies and only in LP page.

= 3.2.5.3 =
~ Changed SQL to read course items by user item ID.
~ Improved performance in admin orders page.
Expand Down

0 comments on commit 8fd5598

Please sign in to comment.