Skip to content

Commit

Permalink
Version bump 1.2 + readme update.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewlimaza committed Sep 27, 2022
1 parent 8106821 commit bd95215
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 26 deletions.
27 changes: 5 additions & 22 deletions includes/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,49 +2,32 @@
/**
* Register block types for both My Courses and All Courses shortcode.
*
* @since TBD
* @since 1.2
*/
function pmpro_courses_register_block_type() {

register_block_type(
PMPRO_COURSES_DIR . '/blocks/build/my-courses',
array(
'editor_script' => 'pmpro-block-my-courses-js',
'render_callback' => 'pmpro_courses_my_courses_callback',
'render_callback' => 'pmpro_courses_shortcode_my_courses',
)
);

register_block_type(
PMPRO_COURSES_DIR . '/blocks/build/all-courses',
array(
'editor_script' => 'pmpro-block-all-courses-js',
'render_callback' => 'pmpro_courses_all_courses_callback',
'render_callback' => 'pmpro_courses_shortcode_all_courses',
)
);
}
add_action( 'init', 'pmpro_courses_register_block_type' );

/**
* Callback that is a wrapper for the pmpro_my_courses shortcode.
*
* @since TBD
*/
function pmpro_courses_my_courses_callback( $attributes ) {
return do_shortcode( "[pmpro_my_courses limit='" . (int) $attributes['limit'] . "']" );
}

/**
* Callback that is a wrapper for the pmpro_all_courses shortcode.
*
* @since TBD
*/
function pmpro_courses_all_courses_callback( $attributes ) {
return do_shortcode( "[pmpro_all_courses limit='" . (int) $attributes['limit'] . "']" );
}

/**
* Enqueue the Block Scripts for both blocks.
*
* @since TBD
* @since 1.2
*/
function pmpro_courses_block_scripts() {
wp_enqueue_script(
Expand Down
2 changes: 1 addition & 1 deletion pmpro-courses.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Paid Memberships Pro - Courses for Membership Add On
* Plugin URI: https://www.paidmembershipspro.com/add-ons/pmpro-courses-lms-integration/
* Description: Create courses and lessons for members. Integrates LMS plugins with Paid Memberships Pro.
* Version: 1.1
* Version: 1.2
* Author: Paid Memberships Pro
* Author URI: https://www.paidmembershipspro.com
* Text Domain: pmpro-courses
Expand Down
11 changes: 8 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Tags: course, education, elearning, lms, membership, pmpro
Requires at least: 5.4
Tested up to: 6.0
Stable tag: 1.1
Requires PHP: 5.6
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Requires PHP: 7.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Create, protect, & sell courses with recurring subscriptions for Paid Memberships Pro, LearnDash, & LifterLMS.

Expand Down Expand Up @@ -121,6 +121,11 @@ Please visit [our support site at https://www.paidmembershipspro.com](http://www
4. A course page on the site frontend showing overview content, a registration box with required levels, and a list of lessons.

== Changelog ==
= 1.2 - 2022-09-27 =
* ENHANCEMENT: Added blocks for "My Courses" and "All Courses" shortcodes. This works only when the default module is being used.
* BUG FIX: Fixed an issue where lessons in TutorLMS weren't restricting correctly.
* BUG FIX: Fixed an issue where the limit attribute wasn't filtering the courses content for [pmpro_my_courses] and [pmpro_all_courses].
* BUG FIX: Fixed an issue for the plugin_action_links throwing an error for certain user roles.

= 1.1 - 2022-06-09 =
* SECURITY: Improved security by preparing, sanitization and escaping of variables.
Expand Down

0 comments on commit bd95215

Please sign in to comment.