We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 20acdad commit 33234dfCopy full SHA for 33234df
1 file changed
content/template/data/ogp.php
@@ -39,13 +39,19 @@
39
$selected_course = json_decode( EDUAPIHelper()->GetOnDemandCourseDetailInfo( $course_id, $group_by_city ), true );
40
}
41
42
+ $description = ! empty( $selected_course['CourseDescriptionShort'] ) ?
43
+ $selected_course['CourseDescriptionShort'] :
44
+ $selected_course['CourseDescription'];
45
+
46
+ if ( $description == null || strlen( $description ) == 0 ) {
47
+ return;
48
+ }
49
50
$description = wp_strip_all_tags(
51
str_replace(
52
[ "<br />", "<br>", "</p>" ],
53
[ "
", "
", "</p>

" ],
- ! empty( $selected_course['CourseDescriptionShort'] ) ?
- $selected_course['CourseDescriptionShort'] :
- $selected_course['CourseDescription']
54
+ $description
55
)
56
);
57
0 commit comments