Skip to content

Commit

Permalink
Add separator on front-end too
Browse files Browse the repository at this point in the history
  • Loading branch information
donnapep committed Apr 28, 2021
1 parent 208a2a9 commit b143a02
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assets/css/frontend.scss
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,8 @@ a.sensei-certificate-link {
font-size: .9em;
font-style: italic;

.lesson-length {
margin-right: 0.5em;
.separator {
margin: 0 0.5em 0;
}
}
.lesson-meta {
Expand Down
4 changes: 4 additions & 0 deletions includes/blocks/class-sensei-lesson-metadata-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ public function render( array $attributes, string $content ) : string {
'</span>';
}

if ( $length && $complexity ) {
$content .= '<span class="separator">|</span>';
}

if ( $complexity ) {
$complexities = Sensei()->lesson->lesson_complexities();
$lesson_complexity = $complexities[ $complexity ];
Expand Down

0 comments on commit b143a02

Please sign in to comment.