Skip to content

Commit

Permalink
Merge pull request #250 from wikitongues/main
Browse files Browse the repository at this point in the history
staging deploy
  • Loading branch information
FredericoAndrade authored Nov 19, 2024
2 parents 6218475 + bbd0a22 commit b0abe9c
Show file tree
Hide file tree
Showing 9 changed files with 677 additions and 15 deletions.
2 changes: 1 addition & 1 deletion wp-content/plugins/wt-gallery/includes/queries.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function get_custom_gallery_query($atts = array()) {
} elseif ($atts['meta_key'] === 'nations_of_origin') {
$compare_operator = '=';
} elseif ($atts['meta_key'] === 'language_iso_codes') {
$compare_operator = '=';
$compare_operator = 'LIKE';
}

if (count($val_array) > 1) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php
$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'];
$thumbnail_url = get_custom_image('fellows');
$fellow_year = get_field('fellow_year');
$location = get_field('fellow_location');
$fellow_language_preferred_name = get_field('fellow_language_preferred_name');
$marketing_text = get_field('marketing_text');
$thumbnail = '';

if ($thumbnail_url) {
Expand All @@ -15,13 +15,22 @@
$thumbnail = '<div class="no-thumbnail"><p>Thumbnail unavailable</p></div><span class="thumbnail-spacer">&nbsp;</span>';
}


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>';
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>';
} 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>';
}
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@
"max_height": "",
"max_size": "",
"mime_types": "",
"allow_in_bindings": 1,
"preview_size": "medium"
},
{
Expand Down Expand Up @@ -270,6 +271,7 @@
"max_height": "",
"max_size": "",
"mime_types": "",
"allow_in_bindings": 1,
"preview_size": "medium"
},
{
Expand Down Expand Up @@ -555,6 +557,26 @@
"parent_repeater": "field_65026258fda44"
}
]
},
{
"key": "field_673603d7a1bd1",
"label": "Marketing Text",
"name": "marketing_text",
"aria-label": "",
"type": "textarea",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"maxlength": "",
"rows": "",
"placeholder": "",
"new_lines": ""
}
],
"location": [
Expand All @@ -575,5 +597,5 @@
"active": true,
"description": "",
"show_in_rest": 0,
"modified": 1728232228
"modified": 1731593396
}
244 changes: 244 additions & 0 deletions wp-content/themes/blankslate-child/acf-json/group_6735ff7970d17.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,244 @@
{
"key": "group_6735ff7970d17",
"title": "Template: 2024 Fundraiser Landing Page",
"fields": [
{
"key": "field_6735ff7908d64",
"label": "Banner",
"name": "banner",
"aria-label": "",
"type": "group",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"layout": "block",
"sub_fields": [
{
"key": "field_6735ffa308d65",
"label": "Banner Image",
"name": "banner_image",
"aria-label": "",
"type": "image",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"return_format": "array",
"library": "all",
"min_width": "",
"min_height": "",
"min_size": "",
"max_width": "",
"max_height": "",
"max_size": "",
"mime_types": "",
"preview_size": "medium"
},
{
"key": "field_6735ffa308d66",
"label": "Banner Header",
"name": "banner_header",
"aria-label": "",
"type": "textarea",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"maxlength": "",
"rows": "",
"placeholder": "",
"new_lines": ""
},
{
"key": "field_6735ffa708d67",
"label": "Banner Copy",
"name": "banner_copy",
"aria-label": "",
"type": "textarea",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"maxlength": "",
"rows": "",
"placeholder": "",
"new_lines": ""
}
]
},
{
"key": "field_673617392c71c",
"label": "Impact Photo",
"name": "impact_photo",
"aria-label": "",
"type": "image",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"return_format": "array",
"library": "all",
"min_width": "",
"min_height": "",
"min_size": "",
"max_width": "",
"max_height": "",
"max_size": "",
"mime_types": "",
"preview_size": "medium"
},
{
"key": "field_673602f069b1e",
"label": "Custom Gallery",
"name": "custom_gallery",
"aria-label": "",
"type": "group",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"layout": "block",
"sub_fields": [
{
"key": "field_6736031369b1f",
"label": "Custom Gallery ID",
"name": "custom_gallery_id",
"aria-label": "",
"type": "text",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"maxlength": "",
"placeholder": "",
"prepend": "",
"append": ""
},
{
"key": "field_6736031e69b20",
"label": "Custom Gallery Title",
"name": "custom_gallery_title",
"aria-label": "",
"type": "text",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"maxlength": "",
"placeholder": "",
"prepend": "",
"append": ""
},
{
"key": "field_6736032769b21",
"label": "Custom Gallery Posts",
"name": "custom_gallery_posts",
"aria-label": "",
"type": "post_object",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"post_type": [
"fellows"
],
"post_status": [
"publish"
],
"taxonomy": "",
"return_format": "object",
"multiple": 1,
"allow_null": 0,
"bidirectional": 0,
"ui": 1,
"bidirectional_target": []
}
]
},
{
"key": "field_673617502c71d",
"label": "Fundraising Photo",
"name": "fundraising_photo",
"aria-label": "",
"type": "image",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"return_format": "array",
"library": "all",
"min_width": "",
"min_height": "",
"min_size": "",
"max_width": "",
"max_height": "",
"max_size": "",
"mime_types": "",
"preview_size": "medium"
}
],
"location": [
[
{
"param": "post_template",
"operator": "==",
"value": "template-giving-campaign-24.php"
}
]
],
"menu_order": 0,
"position": "normal",
"style": "default",
"label_placement": "top",
"instruction_placement": "label",
"hide_on_screen": "",
"active": true,
"description": "",
"show_in_rest": 0,
"modified": 1731598192
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function get_current_datetime() {
return date('Y-m-d H:i:s');
}

function log_data($data, $method = 'console') {
function log_data($data, $method = 'console') { // methods: console, dom
if ($method === 'console') {
echo '<script>';
echo 'console.log(' . json_encode($data) . ')';
Expand Down
Loading

0 comments on commit b0abe9c

Please sign in to comment.