update fontawesome integration and add kit support

This commit is contained in:
2026-02-10 15:22:19 +00:00
parent da7f917af0
commit 899bbd6129
10 changed files with 621 additions and 13886 deletions

View File

@@ -108,9 +108,7 @@ class Dynamic
'0' => '<i class="fa-solid"></i> <span>Please select an icon</span>',
];
foreach($icons as $slug => $props):
if(in_array($slug, range(0,9))) continue;
foreach($icons as $slug):
$choices[$slug] = '<i class="fa-'.$set.' fa-'.$slug.'" style="color: #2271b1;"></i> <span>' . (ucwords(str_replace('-', ' ', $slug))) . '</span>';
endforeach;

View File

@@ -13,9 +13,9 @@ class Enqueue
{
wp_enqueue_style(
'fontawesome',
'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css',
'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/all.min.css',
false,
'6.5.2',
'7.0.1',
'all'
);
}

View File

@@ -7,6 +7,7 @@ class Integrations
public function __construct()
{
add_action( 'wp_head', [$this, 'FathomAnalytics']);
add_action( 'wp_footer', [$this, 'FontAwesomeKit'], 100);
}
public function FathomAnalytics()
@@ -21,4 +22,17 @@ class Integrations
<?php endif;
}
public function FontAwesomeKit()
{
$kit = get_field('badegg_integrations_fontawesome_kit', 'option');
if($kit): ?>
<!-- FontAwesome Kit -->
<script src="https://kit.fontawesome.com/<?= $kit ?>.js" crossorigin="anonymous"></script>
<!-- / FontAwesome Kit -->
<?php endif;
}
}

View File

@@ -17,7 +17,8 @@
"id": ""
},
"placement": "top",
"endpoint": 0
"endpoint": 0,
"selected": 0
},
{
"key": "field_67658e49aba4f",
@@ -58,7 +59,10 @@
"default_value": "",
"enable_opacity": 0,
"return_format": "string",
"parent_repeater": "field_67658e49aba4f"
"parent_repeater": "field_67658e49aba4f",
"custom_palette_source": "",
"palette_colors": "",
"show_color_wheel": true
},
{
"key": "field_67658fba41889",
@@ -167,6 +171,7 @@
"id": ""
},
"layout": "block",
"parent_repeater": "field_67658e49aba4f",
"sub_fields": [
{
"key": "field_676590414188c",
@@ -184,7 +189,10 @@
},
"default_value": "",
"enable_opacity": 0,
"return_format": "string"
"return_format": "string",
"custom_palette_source": "",
"palette_colors": "",
"show_color_wheel": true
},
{
"key": "field_676590684188d",
@@ -202,7 +210,10 @@
},
"default_value": "",
"enable_opacity": 0,
"return_format": "string"
"return_format": "string",
"custom_palette_source": "",
"palette_colors": "",
"show_color_wheel": true
},
{
"key": "field_6765907f4188e",
@@ -220,7 +231,10 @@
},
"default_value": "",
"enable_opacity": 0,
"return_format": "string"
"return_format": "string",
"custom_palette_source": "",
"palette_colors": "",
"show_color_wheel": true
},
{
"key": "field_676590924188f",
@@ -238,7 +252,10 @@
},
"default_value": "",
"enable_opacity": 0,
"return_format": "string"
"return_format": "string",
"custom_palette_source": "",
"palette_colors": "",
"show_color_wheel": true
},
{
"key": "field_6765909941890",
@@ -256,7 +273,10 @@
},
"default_value": "",
"enable_opacity": 0,
"return_format": "string"
"return_format": "string",
"custom_palette_source": "",
"palette_colors": "",
"show_color_wheel": true
},
{
"key": "field_6765909f41891",
@@ -274,10 +294,12 @@
},
"default_value": "",
"enable_opacity": 0,
"return_format": "string"
"return_format": "string",
"custom_palette_source": "",
"palette_colors": "",
"show_color_wheel": true
}
],
"parent_repeater": "field_67658e49aba4f"
]
}
]
},
@@ -296,7 +318,8 @@
"id": ""
},
"placement": "top",
"endpoint": 0
"endpoint": 0,
"selected": 0
},
{
"key": "field_67659cb08081e",
@@ -372,7 +395,8 @@
"id": ""
},
"placement": "top",
"endpoint": 0
"endpoint": 0,
"selected": 0
},
{
"key": "field_676594615ead2",
@@ -393,6 +417,27 @@
"placeholder": "",
"prepend": "",
"append": ""
},
{
"key": "field_698b36010d055",
"label": "Font Awesome Kit ID",
"name": "badegg_integrations_fontawesome_kit",
"aria-label": "",
"type": "text",
"instructions": "The internet's icon library + toolkit. Used by millions of designers, devs, & content creators. Open-source. Always free. Always awesome. <a href=\"https:\/\/fontawesome.com\/\" target=\"_blank\" rel=\"noopener nofollow noindex\">Visit website<\/a>",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"maxlength": "",
"allow_in_bindings": 1,
"placeholder": "",
"prepend": "",
"append": ""
}
],
"location": [
@@ -413,5 +458,6 @@
"active": true,
"description": "",
"show_in_rest": 0,
"modified": 1734712625
"display_title": "",
"modified": 1770736471
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -1,12 +1,10 @@
<ul class="socials nolist">
@foreach($socials as $social)
<li>
<a
class="fa-brands fa-{{ get_field('fontawesome_brands', $social) }}"
href="{{ get_field('url', $social) }}"
rel="noopener nofollow noreferrer"
target="_blank"
><span class="visually-hidden">{{ get_the_title($social) }}</span></a>
<a href="{{ get_field('url', $social) }}" rel="noopener nofollow noreferrer" target="_blank">
<i class="fa-brands fa-{{ get_field('fontawesome_brands', $social) }}"></i>
<span class="visually-hidden">{{ get_the_title($social) }}</span>
</a>
</li>
@endforeach
</ul>

View File

@@ -1,3 +1,4 @@
<footer class="content-info">
@php(dynamic_sidebar('sidebar-footer'))
@include('components.socials')
</footer>