Moved certificate and webinar to pro and Updated Webinar styles#2315
Merged
harunollyo merged 8 commits into4.0.0-devfrom Jan 23, 2026
Merged
Moved certificate and webinar to pro and Updated Webinar styles#2315harunollyo merged 8 commits into4.0.0-devfrom
harunollyo merged 8 commits into4.0.0-devfrom
Conversation
sazedul-haque
requested changes
Jan 20, 2026
| $is_pro = false; | ||
|
|
||
| // Pro subpages. | ||
| $pro_subpages = array( 'webinar', 'certificate' ); |
Collaborator
There was a problem hiding this comment.
We should manage this using hooks
| @@ -42,23 +42,19 @@ | |||
|
|
|||
| &-body { | |||
Collaborator
There was a problem hiding this comment.
Why not move this file to pro as well?
harunollyo
requested changes
Jan 20, 2026
Collaborator
There was a problem hiding this comment.
We are not rendering. So do not use esc function. Use esc function only on rendering
harunollyo
requested changes
Jan 23, 2026
| 'title' => __( 'Resources', 'tutor' ), | ||
| 'icon' => Icon::RESOURCES, | ||
| 'url' => UrlHelper::add_query_params( $base_url, array( 'subpage' => 'resources' ) ), | ||
| 'is_pro' => false, |
Collaborator
There was a problem hiding this comment.
No need to use this key. If not exist than default is false
| 'title' => __( 'Q&A', 'tutor' ), | ||
| 'icon' => Icon::QA, | ||
| 'url' => UrlHelper::add_query_params( $base_url, array( 'subpage' => 'qna' ) ), | ||
| 'is_pro' => false, |
|
|
||
| if ( $subpage ) { | ||
| $subpage_template = tutor_get_template( 'learning-area.subpages.' . $subpage ); | ||
| $is_pro = isset( $subpages[ $subpage ] ) && $subpages[ $subpage ]['is_pro']; |
Collaborator
There was a problem hiding this comment.
By adding 'template` key in pages array. We can simplify this
$template = $subpages[$subpage]['template'] ?? '';
if ( $template && file_exists( $template ) ) {
tutor_load_template_from_custom_path( $template );
}
harunollyo
approved these changes
Jan 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
In this pr I have moved the webinar and certificate page in learning area from free to pro as these are pro features. I have used the hook
tutor_learning_area_sub_page_nav_itemto add the two nav button of webinar and certificate from pro. Furthermore, I have used the structuretemplates > learning-area > subpage > webinar.phpto create the templates in pro so in free I check the sub page if it has any of the pro template I make theis_proflag to true which loads the template. I have also done some design fixes for webinar page in learning area.