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 Customizer panel with setting for primary color #4441

Merged
merged 3 commits into from
Nov 25, 2021
Merged

Conversation

yscik
Copy link
Contributor

@yscik yscik commented Nov 23, 2021

Fixes #4385

Changes proposed in this Pull Request

  • Add Sensei_Customizer class to set up Wordpress theme customizer settings
  • Add Sensei LMS panel with a Course Theme section
  • Add primary color setting

Testing instructions

  • Enable the feature flag sensei_feature_flag_course_theme
  • View a course lesson that has course theme enabled, as an admin
  • Open Customize from the wp admin bar at the top of the page
  • Change the color in Sensei LMS > Course Theme > Primary color
  • Check that the color is updating on the page
  • Publish the change
  • Check that the color is being used

Screenshot / Video

image

@yscik yscik added this to the 3.14.0 milestone Nov 23, 2021
@yscik yscik requested a review from a team November 23, 2021 23:24
@yscik yscik modified the milestones: 3.14.0 Answer Feedback, 4.0.0 Nov 24, 2021
dadish
dadish previously approved these changes Nov 25, 2021
Copy link
Contributor

@dadish dadish left a comment

Choose a reason for hiding this comment

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

Awesome! 🔥 💥

aaronfc
aaronfc previously approved these changes Nov 25, 2021
foreach ( $this->css_variables as $variable ) {
$value = get_theme_mod( $variable );
if ( $value ) {
$css .= sprintf( "--%s: %s;\n", $variable, ( $value ) );
Copy link
Contributor

Choose a reason for hiding this comment

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

What are the parentheses around $value used for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Accidental leftover from a function call I believe :)

Base automatically changed from add/course-outline-view-block to master November 25, 2021 16:07
@yscik yscik dismissed stale reviews from aaronfc and dadish via c3b5162 November 25, 2021 16:07
@yscik yscik merged commit 83765ac into master Nov 25, 2021
@yscik yscik deleted the add/color-customizer branch November 25, 2021 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setting to add a primary color to the Course Theme
3 participants