refactor(icons): replace local brand SVGs with FA5 classes
Unify social/OAuth/contact icons on the global Font Awesome 5.15.4 pack, add aksrt_render_social_links for author hero, enqueue FA on admin SPA, and delete assets/img/icons.
This commit is contained in:
1 parent
e0f1e0a8ad
commit
fe870bfc19
26 files changed
+285
-129
No files matched your search
@@ -115,6 +115,14 @@ class AKSRT_Admin {
|
||||
}
|
||||
}
|
||||
|
||||
// Match frontend FA5 pack so FaIcon / menu glyphs render in the SPA.
|
||||
wp_enqueue_style(
|
||||
'aksrt-font-awesome-5',
|
||||
'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css',
|
||||
[],
|
||||
'5.15.4'
|
||||
);
|
||||
|
||||
wp_enqueue_script(
|
||||
'aksrt-admin-app',
|
||||
$build_uri . 'index.js',
|
||||
|
||||
@@ -239,7 +239,7 @@ trait AKSRT_OAuth_Part_1 {
|
||||
$result[] = [
|
||||
'name' => $key,
|
||||
'label' => $platform_names[$key] ?? ucfirst($key),
|
||||
'icon' => aksrt_inline_svg($key),
|
||||
'icon' => function_exists('aksrt_brand_icon') ? aksrt_brand_icon((string) $key) : '',
|
||||
'url' => esc_url($url),
|
||||
];
|
||||
}
|
||||
@@ -350,14 +350,14 @@ trait AKSRT_OAuth_Part_1 {
|
||||
if (empty($enabled_providers)) return '';
|
||||
|
||||
$icons = [
|
||||
'github' => aksrt_inline_svg('github'),
|
||||
'gitee' => aksrt_inline_svg('gitee'),
|
||||
'qq' => aksrt_inline_svg('qq'),
|
||||
'google' => aksrt_inline_svg('google'),
|
||||
'weibo' => aksrt_inline_svg('weibo'),
|
||||
'weixin' => aksrt_inline_svg('wechat'),
|
||||
'baidu' => '<span class="oauth-btn__fallback">B</span>',
|
||||
'alipay' => '<span class="oauth-btn__fallback">A</span>',
|
||||
'github' => aksrt_brand_icon('github'),
|
||||
'gitee' => aksrt_brand_icon('gitee'),
|
||||
'qq' => aksrt_brand_icon('qq'),
|
||||
'google' => aksrt_brand_icon('google'),
|
||||
'weibo' => aksrt_brand_icon('weibo'),
|
||||
'weixin' => aksrt_brand_icon('weixin'),
|
||||
'baidu' => aksrt_brand_icon('baidu'),
|
||||
'alipay' => aksrt_brand_icon('alipay'),
|
||||
];
|
||||
|
||||
ob_start();
|
||||
|
||||
@@ -16,14 +16,14 @@ trait AKSRT_OAuth_Part_2 {
|
||||
'baidu' => 'Baidu', 'alipay' => 'Alipay',
|
||||
];
|
||||
$icons = [
|
||||
'github' => aksrt_inline_svg('github'),
|
||||
'gitee' => aksrt_inline_svg('gitee'),
|
||||
'qq' => aksrt_inline_svg('qq'),
|
||||
'google' => aksrt_inline_svg('google'),
|
||||
'weibo' => aksrt_inline_svg('weibo'),
|
||||
'weixin' => aksrt_inline_svg('wechat'),
|
||||
'baidu' => '<span class="oauth-btn__fallback">B</span>',
|
||||
'alipay' => '<span class="oauth-btn__fallback">A</span>',
|
||||
'github' => aksrt_brand_icon('github'),
|
||||
'gitee' => aksrt_brand_icon('gitee'),
|
||||
'qq' => aksrt_brand_icon('qq'),
|
||||
'google' => aksrt_brand_icon('google'),
|
||||
'weibo' => aksrt_brand_icon('weibo'),
|
||||
'weixin' => aksrt_brand_icon('weixin'),
|
||||
'baidu' => aksrt_brand_icon('baidu'),
|
||||
'alipay' => aksrt_brand_icon('alipay'),
|
||||
];
|
||||
|
||||
$bindings = [];
|
||||
|
||||
Reference in new issue
Block a user