update fontawesome integration and add kit support
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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'
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user