Skip to content

Commit

Permalink
WP-287 fix featured curriculum slider display on a resource template
Browse files Browse the repository at this point in the history
  • Loading branch information
johnpaulbalagolan committed Oct 5, 2022
1 parent 733e22b commit b64c3f6
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 14 deletions.
1 change: 1 addition & 0 deletions css/resource-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ p.center { text-align:center; }
.oer-lp-full-content {
display: none;
}
.oer-lp-full-content .bx-wrapper.mobile .featuredwpr_bxslider li { width:375px !important; }
.oer-lp-full-content pre {
white-space: normal !important;
}
Expand Down
11 changes: 7 additions & 4 deletions oer_template/single-resource-audio.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php /** Website/Image/Document(except PDF)/Other Resource Template **/

$allowed_tags = oer_allowed_html();

// Checks if display more button should be displayed
Expand All @@ -12,10 +13,12 @@
<div class="oer-sngl-rsrc-img oer-sngl-audio-type">
<?php
$type=oer_get_resource_file_type($url);
if ($type['name']=="Audio")
echo oer_generate_audio_resource_embed($url);
else
echo oer_display_default_thumbnail($post);
if (is_array($type)){
if ($type['name']=="Audio")
echo oer_generate_audio_resource_embed($url);
else
echo oer_display_default_thumbnail($post);
}
?>
</div>
<div id="" class="oer-authorName oer-cbxl">
Expand Down
11 changes: 7 additions & 4 deletions oer_template/single-resource-standard.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

$post_meta_data = get_post_meta($post->ID );
$author_set = (get_option('oer_authorname_label'))?true:false;
$author_enabled = (get_option('oer_authorname_enabled'))?true:false;
Expand Down Expand Up @@ -87,10 +88,12 @@
}
} else {
$type=oer_get_resource_file_type($url);
if ($type['name']=="Video"){
echo oer_embed_video_file($url, $type['type']);
} else {
echo oer_display_default_thumbnail($post);
if (is_array($type)){
if ($type['name']=="Video"){
echo oer_embed_video_file($url, $type['type']);
} else {
echo oer_display_default_thumbnail($post);
}
}
}
if ($embed_disabled){
Expand Down
7 changes: 5 additions & 2 deletions oer_template/single-resource-video.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php /** Video Resource Template **/

$allowed_tags = oer_allowed_html();

// Checks if display more button should be displayed
Expand All @@ -9,8 +10,10 @@
<div class="oer-rsrclftcntr-video col-md-12 col-sm-12 col-xs-12">
<?php
$type=oer_get_resource_file_type($url);
if ($type['name']=="Video")
echo oer_embed_video_file($url, $type['type']);
if (is_array($type)){
if ($type['name']=="Video")
echo oer_embed_video_file($url, $type['type']);
}
?>
</div>
<div class="oer-rsrccntr-details col-md-12 col-sm-12 col-xs-12">
Expand Down
10 changes: 6 additions & 4 deletions oer_template/single-resource.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,12 @@
case "other":
case "image":
$oer_type=oer_get_resource_file_type($url);
if ($oer_type['name']=="PDF")
$resource_template = OER_PATH.'oer_template/single-resource-pdf.php';
else
$resource_template = OER_PATH.'oer_template/single-resource-website.php';
if (is_array($oer_type)){
if ($oer_type['name']=="PDF")
$resource_template = OER_PATH.'oer_template/single-resource-pdf.php';
else
$resource_template = OER_PATH.'oer_template/single-resource-website.php';
}
break;
case "audio":
$oer_type=oer_get_resource_file_type($url);
Expand Down

0 comments on commit b64c3f6

Please sign in to comment.