PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.8
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.8
4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 4.2.0 All 139 releases
← All changes | inc/lp-template-functions.php +18 -11 4.4.24.4.8 View file →
@@ -202,11 +202,11 @@
202 202 if ( $lp_course_item ) {
203 203 $post_type_object = get_post_type_object( $lp_course_item->get_item_type() );
204 204
205 205 if ( $post_type_object && current_user_can(
206 - 'edit_post',
207 - $lp_course_item->get_id()
208 - ) && $post_type_object->show_in_admin_bar && get_edit_post_link( $lp_course_item->get_id() ) ) {
206 + 'edit_post',
207 + $lp_course_item->get_id()
208 + ) && $post_type_object->show_in_admin_bar && get_edit_post_link( $lp_course_item->get_id() ) ) {
209 209 $type = get_post_type( $lp_course_item->get_id() );
210 210
211 211 if ( apply_filters( 'learn-press/edit-admin-bar-button', true, $lp_course_item ) ) {
212 212 $wp_admin_bar->add_menu(
@@ -227,11 +227,11 @@
227 227 $post_type_object = get_post_type_object( $lp_quiz_question->get_item_type() );
228 228 $edit_post_link = get_edit_post_link( $lp_quiz_question->get_id() );
229 229
230 230 if ( $post_type_object && current_user_can(
231 - 'edit_post',
232 - $lp_quiz_question->get_id()
233 - ) && $post_type_object->show_in_admin_bar && $edit_post_link ) {
231 + 'edit_post',
232 + $lp_quiz_question->get_id()
233 + ) && $post_type_object->show_in_admin_bar && $edit_post_link ) {
234 234 $type = get_post_type( $lp_quiz_question->get_id() );
235 235 $wp_admin_bar->add_menu(
236 236 array(
237 237 'id' => 'edit-' . $type,
@@ -640,9 +640,9 @@
640 640
641 641 /**
642 642 * Show message only one time.
643 643 * @return void
644 - * @version 1.0.0
644 + * @version 1.0.1
645 645 * @since 4.2.0
646 646 */
647 647 function learn_press_show_message() {
648 648 try {
@@ -655,9 +655,13 @@
655 655
656 656 unset( $message_data[ $customer_id ] );
657 657 update_option( 'lp-customer-message', $message_data );
658 658 //delete_option( 'lp-message' );
659 - Template::instance()->get_frontend_template( 'global/lp-message.php', compact( 'customer_message' ) );
659 + //Template::instance()->get_frontend_template( 'global/lp-message.php', compact( 'customer_message' ) );
660 + Template::print_message(
661 + $customer_message['content'] ?? '',
662 + $customer_message['status'] ?? ''
663 + );
660 664 } catch ( Throwable $e ) {
661 665 error_log( $e->getMessage() );
662 666 }
663 667 }
@@ -1110,15 +1114,18 @@
1110 1114 }
1111 1115 }
1112 1116 }
1113 1117
1114 -if ( ! function_exists( 'learn_press_sort_course_tabs' ) ) {
1118 +/**
1119 + * @deprecated 4.4.5
1120 + */
1121 +/*if ( ! function_exists( 'learn_press_sort_course_tabs' ) ) {
1115 1122 function learn_press_sort_course_tabs( $tabs = array() ) {
1116 1123 uasort( $tabs, 'learn_press_sort_list_by_priority_callback' );
1117 1124
1118 1125 return $tabs;
1119 1126 }
1120 -}
1127 +}*/
1121 1128
1122 1129 if ( ! function_exists( 'learn_press_get_profile_display_name' ) ) {
1123 1130 /**
1124 1131 * Get Display name publicly as in Profile page
@@ -1547,9 +1554,9 @@
1547 1554 function lp_get_email_content( $format, $meta = array(), $field = array() ) {
1548 1555 if ( $meta && isset( $meta[ $format ] ) ) {
1549 1556 $content = stripslashes( $meta[ $format ] );
1550 1557 } else {
1551 - $template = ! empty( $field["template_{$format}"] ) ? $field["template_{$format}"] : null;
1558 + $template = ! empty( $field[ "template_{$format}" ] ) ? $field[ "template_{$format}" ] : null;
1552 1559 $template_file = $field['template_base'] . $template;
1553 1560 $content = LP_WP_Filesystem::instance()->file_get_contents( $template_file );
1554 1561 }
1555 1562