Skip to content

Commit

Permalink
Merge pull request #275 from wikitongues/main
Browse files Browse the repository at this point in the history
staging deploy career gallery link hot fix
  • Loading branch information
FredericoAndrade authored Dec 9, 2024
2 parents e7a6362 + f6e9660 commit 5315c13
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 69 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<li class="gallery-item">
<?php
$title = get_the_title();
$location = get_field('location');
<?php
$url = get_permalink();
$title = get_the_title();
$location = get_field('location');

echo '<a href="">';
echo '<h3>' . $title . '</h3>';
echo '<p>&nbsp;— '.$location.'</p>';
echo '</a>';
?>
echo '<a href=' . esc_url($url) . '>' . $title . '&nbsp;— ' . $location . '</a>';
?>
</li>
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
$url = get_permalink();
$categories = get_the_terms(get_the_ID(), 'fellow-category');
$category_names = implode(', ', array_map('esc_html', wp_list_pluck($categories, 'name')));
$class = $atts['custom_class'];
Expand All @@ -10,27 +11,27 @@
$thumbnail = '';

if ($thumbnail_url) {
$thumbnail = '<div class="thumbnail" style="background-image:url('.esc_url($thumbnail_url).');" alt="' . get_the_title() . '"></div><span class="thumbnail-spacer">&nbsp;</span>';
$thumbnail = '<div class="thumbnail" style="background-image:url('.esc_url($thumbnail_url).');" alt="' . get_the_title() . '"></div><span class="thumbnail-spacer">&nbsp;</span>';
} else {
$thumbnail = '<div class="no-thumbnail"><p>Thumbnail unavailable</p></div><span class="thumbnail-spacer">&nbsp;</span>';
$thumbnail = '<div class="no-thumbnail"><p>Thumbnail unavailable</p></div><span class="thumbnail-spacer">&nbsp;</span>';
}

if ($class === "custom fundraiser") {
echo '<li>';
echo '<div class="thumbnail" style="background-image:url('.esc_url($thumbnail_url).');" alt="' . get_the_title() . '"></div>';
echo '<section>';
echo '<h2>'.$title.'<br>'.$location.'</h2>';
echo '<p>'.$marketing_text.'</p>';
echo '</section>';
echo '</li>';
echo '<li>';
echo '<div class="thumbnail" style="background-image:url('.esc_url($thumbnail_url).');" alt="' . get_the_title() . '"></div>';
echo '<section>';
echo '<h2>'.$title.'<br>'.$location.'</h2>';
echo '<p>'.$marketing_text.'</p>';
echo '</section>';
echo '</li>';
} else {
echo '<li class="gallery-item">';
echo '<a href="'.esc_url(get_permalink()).'">';
echo $thumbnail;
echo '<div><h3>' . $title . '</h3></div>';
$metadata = '<div class="fellow-metadata"><h3>'.$fellow_language_preferred_name.'</h3>';
$metadata .= '<p>'.$category_names.'</p><span><p>'.$location.'</p><p>'.$fellow_year.'</p></span></div>';
echo $metadata;
echo '</a>';
echo '</li>';
echo '<li class="gallery-item">';
echo '<a href="' . esc_url($url) . '">';
echo $thumbnail;
echo '<div><h3>' . $title . '</h3></div>';
$metadata = '<div class="fellow-metadata"><h3>'.$fellow_language_preferred_name.'</h3>';
$metadata .= '<p>'.$category_names.'</p><span><p>'.$location.'</p><p>'.$fellow_year.'</p></span></div>';
echo $metadata;
echo '</a>';
echo '</li>';
}
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
<li class="gallery-item">
<?php
$thumbnail_object = '';
$iso_code = get_the_title();
$iso_code_element = '<aside>'.esc_html($iso_code).'</aside>';
$video_query = get_videos_by_featured_language($iso_code);
$url = home_url('/languages/' . $iso_code, 'relative');
<?php
$url = get_permalink();
$thumbnail_object = '';
$iso_code = get_the_title();
$iso_code_element = '<aside>'.esc_html($iso_code).'</aside>';
$video_query = get_videos_by_featured_language($iso_code);

if ($video_query->have_posts()) {
while ($video_query->have_posts()) {
$video_query->the_post();
$thumbnail = get_custom_image('videos');
$video_title = get_custom_title('videos');
$thumbnail_object .= '<div class="thumbnail" style="background-image:url('.esc_url($thumbnail).');" alt="' . get_the_title() . '"> <p>' . $video_title . '</p></div>';
}
} else {
$thumbnail_object .= '<div class="no-thumbnail"><p>No resources found to display – Yet.</p></div>';
}
if ($video_query->have_posts()) {
while ($video_query->have_posts()) {
$video_query->the_post();
$thumbnail = get_custom_image('videos');
$video_title = get_custom_title('videos');
$thumbnail_object .= '<div class="thumbnail" style="background-image:url('.esc_url($thumbnail).');" alt="' . get_the_title() . '"> <p>' . $video_title . '</p></div>';
}
} else {
$thumbnail_object .= '<div class="no-thumbnail"><p>No resources found to display – Yet.</p></div>';
}

echo '<a href="'.$url.'">';
echo '<div><h3>' . $title . '</h3>' . $iso_code_element . '</div>';
echo $thumbnail_object;
echo '</a>';
?>
echo '<a href="' . esc_url($url) . '">';
echo '<div><h3>' . $title . '</h3>' . $iso_code_element . '</div>';
echo $thumbnail_object;
echo '</a>';
?>
</li>
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<li class="gallery-item">
<?php
$external_resources = get_field('external_resources');
$resource_link = get_field('resource_url');
$resource_title = get_field('resource_title') ? get_field('resource_title') : get_the_title();
$resource_description = get_field('resource_description');
$domain = getDomainFromUrl($resource_link);
<?php
$url = get_field('resource_url');
$title = get_field('resource_title') ? get_field('resource_title') : get_the_title();
$external_resources = get_field('external_resources');
$resource_description = get_field('resource_description');
$domain = getDomainFromUrl($url);

echo '<a href="' . esc_url($resource_link) . '">';
echo '<h1>' . esc_html($resource_title) . '</h1>';
if ($resource_description) {
echo '<p class="description">' . esc_html($resource_description) . '</p>';
}
echo '<p class="domain">' . esc_html($domain) . '</p>';
echo '</a>';
?>
echo '<a href="' . esc_url($url) . '">';
echo '<h1>' . esc_html($title) . '</h1>';
if ($resource_description) {
echo '<p class="description">' . esc_html($resource_description) . '</p>';
}
echo '<p class="domain">' . esc_html($domain) . '</p>';
echo '</a>';
?>
</li>
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
<li class="gallery-item">
<?php
<?php
$url = get_permalink();
$thumbnail_url = get_custom_image('videos');
$thumbnail_object = '';

if ($thumbnail_url) {
$thumbnail_object= '<div class="thumbnail" style="background-image:url('.esc_url($thumbnail_url).');" alt="' . get_the_title() . '"></div>';
$thumbnail_object= '<div class="thumbnail" style="background-image:url('.esc_url($thumbnail_url).');" alt="' . get_the_title() . '"></div>';
} else {
$thumbnail_object= '<div class="no-thumbnail"><p>Thumbnail unavailable</p></div>';
$thumbnail_object= '<div class="no-thumbnail"><p>Thumbnail unavailable</p></div>';
}

echo '<a href="'.esc_url(get_permalink()).'">';
echo $thumbnail_object;
echo '<div><h3>' . $title . '</h3></div>';
echo '</a>';
?>
echo '<a href="' . esc_url($url) . '">';
echo $thumbnail_object;
echo '<div><h3>' . $title . '</h3></div>';
echo '</a>';
?>
</li>

0 comments on commit 5315c13

Please sign in to comment.