Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add course continue button, course progress and pricing table blocks #2492

Open
wants to merge 14 commits into
base: dev
Choose a base branch
from

Conversation

seothemes
Copy link
Contributor

@seothemes seothemes commented Jul 21, 2023

Description

Adds:

  • Course Continue Button block
  • Course Progress block
  • Pricing Table block

with Course ID settings allowing blocks to be used on other post types.

How has this been tested?

Manually

Types of changes

Bug fix (non-breaking change which fixes an issue)

Checklist:

  • This PR requires and contains at least one changelog file.
  • My code has been tested.
  • My code passes all existing automated tests.
  • My code follows the LifterLMS Coding & Documentation Standards.

@seothemes seothemes requested a review from a team July 21, 2023 07:33
@seothemes seothemes self-assigned this Jul 21, 2023
@seothemes seothemes changed the title Fix LLMS Rest API call in usePostOptions react hook Add course continue button, course progress and pricing table blocks Jul 25, 2023
@seothemes seothemes marked this pull request as ready for review July 25, 2023 13:18
includes/llms.template.functions.php Outdated Show resolved Hide resolved
*
* @param array $atts Associative array of shortcode attributes.
* @return string
*/
public static function course_progress( $atts ) {

$course_id = self::get_course_id();
$course_id = $atts['course_id'] ?? self::get_course_id() ?? null;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good, but I'd move the block editor related stuff into the class.llms.shortcodes.blocks.php what do you think?
I'd use existing filters or add new ones if needed, but I wouldn't do the checks here.
Same for the pricing table and the course continue button.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems you missed this. There's a similar comment on the other PR.

includes/llms.template.functions.php Outdated Show resolved Hide resolved
src/blocks/course-continue-button/index.jsx Show resolved Hide resolved
src/blocks/pricing-table/index.jsx Show resolved Hide resolved
*
* @param array $atts Associative array of shortcode attributes.
* @return string
*/
public static function course_progress( $atts ) {

$course_id = self::get_course_id();
$course_id = $atts['course_id'] ?? self::get_course_id() ?? null;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems you missed this. There's a similar comment on the other PR.

@@ -601,12 +606,26 @@ public static function pricing_table( $atts ) {

if ( ! empty( $atts['product'] ) && is_numeric( $atts['product'] ) ) {

// enqueue match height for height alignments.
$block_editor = llms_is_editor_block_rendering();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above.

src/blocks/pricing-table/index.jsx Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To do
Development

Successfully merging this pull request may close these issues.

None yet

2 participants