-
Notifications
You must be signed in to change notification settings - Fork 198
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
Make sensei_start_course_form() text filterable #4020
base: trunk
Are you sure you want to change the base?
Conversation
First pull request, so I tried to make it simple – please let me know if I can improve anything! |
@@ -99,11 +99,13 @@ function sensei_start_course_form( $course_id ) { | |||
if ( $prerequisite_complete ) { | |||
wp_enqueue_script( 'sensei-stop-double-submission' ); | |||
|
|||
$sensei_start_course_form_text = apply_filters( 'sensei_start_course_form_text', esc_html( 'Take This Course', 'sensei-lms' ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should consider calling this filter something else to more accurately describe what it filters. What about sensei_take_course_button_text
?
@anekola Thanks for the PR. There's a PHP linting error that will need to be addressed before this PR can be merged. Also, I wanted to let you know that when you create a new course now, it will use blocks. There is actually a Take Course block that enables customizing the button text right in the editor. Thought I'd mention it in case you'd like to give blocks a try instead. |
Fixes #4019
Changes proposed in this Pull Request
Testing instructions
New/Updated Hooks