From a33f13e15c83887515a154f3ab6de4f6e8058c87 Mon Sep 17 00:00:00 2001 From: Qara Yahya Date: Wed, 2 Sep 2026 16:01:26 +0100 Subject: [PATCH 1/6] feat: add icon collection registration and SVG icons for WordPress 7.1+ --- assets/icons/bolt.svg | 3 + assets/icons/briefcase.svg | 4 ++ assets/icons/chat.svg | 4 ++ assets/icons/clock.svg | 3 + assets/icons/code.svg | 3 + assets/icons/education.svg | 5 ++ assets/icons/film.svg | 3 + assets/icons/fire.svg | 3 + assets/icons/gift.svg | 5 ++ assets/icons/globe.svg | 11 ++++ assets/icons/heart.svg | 3 + assets/icons/megaphone.svg | 4 ++ assets/icons/music.svg | 3 + assets/icons/office.svg | 3 + assets/icons/paint-brush.svg | 3 + assets/icons/paper-plane.svg | 3 + assets/icons/phone.svg | 3 + assets/icons/play.svg | 3 + assets/icons/presentation.svg | 3 + assets/icons/puzzle-piece.svg | 3 + assets/icons/rocket.svg | 4 ++ assets/icons/shopping-bag.svg | 3 + assets/icons/sparkles.svg | 5 ++ assets/icons/support.svg | 3 + assets/icons/ticket.svg | 3 + assets/icons/tools.svg | 5 ++ assets/icons/trending-up.svg | 3 + assets/icons/trophy.svg | 3 + assets/icons/truck.svg | 7 +++ assets/icons/verified.svg | 3 + functions.php | 7 +++ inc/icons.php | 106 ++++++++++++++++++++++++++++++++++ readme.txt | 6 ++ 33 files changed, 233 insertions(+) create mode 100644 assets/icons/bolt.svg create mode 100644 assets/icons/briefcase.svg create mode 100644 assets/icons/chat.svg create mode 100644 assets/icons/clock.svg create mode 100644 assets/icons/code.svg create mode 100644 assets/icons/education.svg create mode 100644 assets/icons/film.svg create mode 100644 assets/icons/fire.svg create mode 100644 assets/icons/gift.svg create mode 100644 assets/icons/globe.svg create mode 100644 assets/icons/heart.svg create mode 100644 assets/icons/megaphone.svg create mode 100644 assets/icons/music.svg create mode 100644 assets/icons/office.svg create mode 100644 assets/icons/paint-brush.svg create mode 100644 assets/icons/paper-plane.svg create mode 100644 assets/icons/phone.svg create mode 100644 assets/icons/play.svg create mode 100644 assets/icons/presentation.svg create mode 100644 assets/icons/puzzle-piece.svg create mode 100644 assets/icons/rocket.svg create mode 100644 assets/icons/shopping-bag.svg create mode 100644 assets/icons/sparkles.svg create mode 100644 assets/icons/support.svg create mode 100644 assets/icons/ticket.svg create mode 100644 assets/icons/tools.svg create mode 100644 assets/icons/trending-up.svg create mode 100644 assets/icons/trophy.svg create mode 100644 assets/icons/truck.svg create mode 100644 assets/icons/verified.svg create mode 100644 inc/icons.php diff --git a/assets/icons/bolt.svg b/assets/icons/bolt.svg new file mode 100644 index 00000000..727b9519 --- /dev/null +++ b/assets/icons/bolt.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/briefcase.svg b/assets/icons/briefcase.svg new file mode 100644 index 00000000..1a9b94d8 --- /dev/null +++ b/assets/icons/briefcase.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/icons/chat.svg b/assets/icons/chat.svg new file mode 100644 index 00000000..71681426 --- /dev/null +++ b/assets/icons/chat.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/icons/clock.svg b/assets/icons/clock.svg new file mode 100644 index 00000000..f8398867 --- /dev/null +++ b/assets/icons/clock.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/code.svg b/assets/icons/code.svg new file mode 100644 index 00000000..e5be7b9f --- /dev/null +++ b/assets/icons/code.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/education.svg b/assets/icons/education.svg new file mode 100644 index 00000000..25e68884 --- /dev/null +++ b/assets/icons/education.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/icons/film.svg b/assets/icons/film.svg new file mode 100644 index 00000000..6f31a931 --- /dev/null +++ b/assets/icons/film.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/fire.svg b/assets/icons/fire.svg new file mode 100644 index 00000000..386da880 --- /dev/null +++ b/assets/icons/fire.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/gift.svg b/assets/icons/gift.svg new file mode 100644 index 00000000..9914ff02 --- /dev/null +++ b/assets/icons/gift.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/icons/globe.svg b/assets/icons/globe.svg new file mode 100644 index 00000000..803e9379 --- /dev/null +++ b/assets/icons/globe.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/assets/icons/heart.svg b/assets/icons/heart.svg new file mode 100644 index 00000000..728772bc --- /dev/null +++ b/assets/icons/heart.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/megaphone.svg b/assets/icons/megaphone.svg new file mode 100644 index 00000000..6cfaccb7 --- /dev/null +++ b/assets/icons/megaphone.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/icons/music.svg b/assets/icons/music.svg new file mode 100644 index 00000000..6e20a788 --- /dev/null +++ b/assets/icons/music.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/office.svg b/assets/icons/office.svg new file mode 100644 index 00000000..8b0ff122 --- /dev/null +++ b/assets/icons/office.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/paint-brush.svg b/assets/icons/paint-brush.svg new file mode 100644 index 00000000..4ae58855 --- /dev/null +++ b/assets/icons/paint-brush.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/paper-plane.svg b/assets/icons/paper-plane.svg new file mode 100644 index 00000000..53cf8cb5 --- /dev/null +++ b/assets/icons/paper-plane.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/phone.svg b/assets/icons/phone.svg new file mode 100644 index 00000000..328b5a45 --- /dev/null +++ b/assets/icons/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/play.svg b/assets/icons/play.svg new file mode 100644 index 00000000..b59e3d8b --- /dev/null +++ b/assets/icons/play.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/presentation.svg b/assets/icons/presentation.svg new file mode 100644 index 00000000..3b89c3cd --- /dev/null +++ b/assets/icons/presentation.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/puzzle-piece.svg b/assets/icons/puzzle-piece.svg new file mode 100644 index 00000000..bb5b5518 --- /dev/null +++ b/assets/icons/puzzle-piece.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/rocket.svg b/assets/icons/rocket.svg new file mode 100644 index 00000000..bb89a0d3 --- /dev/null +++ b/assets/icons/rocket.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/icons/shopping-bag.svg b/assets/icons/shopping-bag.svg new file mode 100644 index 00000000..dcc27007 --- /dev/null +++ b/assets/icons/shopping-bag.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/sparkles.svg b/assets/icons/sparkles.svg new file mode 100644 index 00000000..37dfcb48 --- /dev/null +++ b/assets/icons/sparkles.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/icons/support.svg b/assets/icons/support.svg new file mode 100644 index 00000000..d921e950 --- /dev/null +++ b/assets/icons/support.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/ticket.svg b/assets/icons/ticket.svg new file mode 100644 index 00000000..155c8bc6 --- /dev/null +++ b/assets/icons/ticket.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/tools.svg b/assets/icons/tools.svg new file mode 100644 index 00000000..4441e9cd --- /dev/null +++ b/assets/icons/tools.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/icons/trending-up.svg b/assets/icons/trending-up.svg new file mode 100644 index 00000000..824662fe --- /dev/null +++ b/assets/icons/trending-up.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/trophy.svg b/assets/icons/trophy.svg new file mode 100644 index 00000000..38bdcd95 --- /dev/null +++ b/assets/icons/trophy.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/truck.svg b/assets/icons/truck.svg new file mode 100644 index 00000000..20940666 --- /dev/null +++ b/assets/icons/truck.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/assets/icons/verified.svg b/assets/icons/verified.svg new file mode 100644 index 00000000..94aa0590 --- /dev/null +++ b/assets/icons/verified.svg @@ -0,0 +1,3 @@ + + + diff --git a/functions.php b/functions.php index 18bfa676..e0b78fcb 100644 --- a/functions.php +++ b/functions.php @@ -136,6 +136,13 @@ */ require INSPIRO_THEME_DIR . 'inc/icon-functions.php'; +/** + * Icon collection registration for the Icon block (WordPress 7.1+). + * + * @since Inspiro 2.2.4 + */ +require INSPIRO_THEME_DIR . 'inc/icons.php'; + /** * Misc features — pre-footer CTA, topbar, back-to-top, preloader. * diff --git a/inc/icons.php b/inc/icons.php new file mode 100644 index 00000000..baf98028 --- /dev/null +++ b/inc/icons.php @@ -0,0 +1,106 @@ +, and survive, and stroke + * attributes are stripped, so the icons are filled paths without a hard-coded + * fill in order to inherit the Icon block's color settings. + * + * @package Inspiro + * @subpackage Inspiro_Lite + * @since Inspiro 2.2.4 + */ + +if ( ! function_exists( 'inspiro_get_icons' ) ) { + /** + * Returns the icons bundled with the theme. + * + * The array keys match the SVG file names in assets/icons/. + * + * @since Inspiro 2.2.4 + * + * @return array Associative array of icon slug => human-readable label. + */ + function inspiro_get_icons() { + return array( + 'bolt' => __( 'Lightning Bolt', 'inspiro' ), + 'briefcase' => __( 'Briefcase', 'inspiro' ), + 'chat' => __( 'Chat', 'inspiro' ), + 'clock' => __( 'Clock', 'inspiro' ), + 'code' => __( 'Code', 'inspiro' ), + 'education' => __( 'Education', 'inspiro' ), + 'film' => __( 'Film', 'inspiro' ), + 'fire' => __( 'Fire', 'inspiro' ), + 'gift' => __( 'Gift', 'inspiro' ), + 'globe' => __( 'Globe', 'inspiro' ), + 'heart' => __( 'Heart', 'inspiro' ), + 'megaphone' => __( 'Megaphone', 'inspiro' ), + 'music' => __( 'Music', 'inspiro' ), + 'office' => __( 'Office Building', 'inspiro' ), + 'paint-brush' => __( 'Paint Brush', 'inspiro' ), + 'paper-plane' => __( 'Paper Plane', 'inspiro' ), + 'phone' => __( 'Phone', 'inspiro' ), + 'play' => __( 'Play', 'inspiro' ), + 'presentation' => __( 'Presentation', 'inspiro' ), + 'puzzle-piece' => __( 'Puzzle Piece', 'inspiro' ), + 'rocket' => __( 'Rocket', 'inspiro' ), + 'shopping-bag' => __( 'Shopping Bag', 'inspiro' ), + 'sparkles' => __( 'Sparkles', 'inspiro' ), + 'support' => __( 'Support', 'inspiro' ), + 'ticket' => __( 'Ticket', 'inspiro' ), + 'tools' => __( 'Tools', 'inspiro' ), + 'trending-up' => __( 'Trending Up', 'inspiro' ), + 'trophy' => __( 'Trophy', 'inspiro' ), + 'truck' => __( 'Truck', 'inspiro' ), + 'verified' => __( 'Verified Badge', 'inspiro' ), + ); + } +} + +if ( ! function_exists( 'inspiro_register_icons' ) ) { + /** + * Registers the Inspiro icon collection and its icons. + * + * Does nothing on WordPress versions older than 7.1, where the Icons API + * is not available. + * + * @since Inspiro 2.2.4 + * + * @return void + */ + function inspiro_register_icons() { + if ( ! function_exists( 'wp_register_icon_collection' ) || ! function_exists( 'wp_register_icon' ) ) { + return; + } + + $is_registered = wp_register_icon_collection( + 'inspiro', + array( + 'label' => __( 'Inspiro', 'inspiro' ), + 'description' => __( 'Icons bundled with the Inspiro theme.', 'inspiro' ), + ) + ); + + if ( ! $is_registered ) { + return; + } + + $icons_dir = INSPIRO_THEME_DIR . 'assets/icons/'; + + foreach ( inspiro_get_icons() as $slug => $label ) { + wp_register_icon( + 'inspiro/' . $slug, + array( + 'label' => $label, + 'file_path' => $icons_dir . $slug . '.svg', + ) + ); + } + } +} +add_action( 'init', 'inspiro_register_icons' ); diff --git a/readme.txt b/readme.txt index 79d8085c..bf723fac 100644 --- a/readme.txt +++ b/readme.txt @@ -92,6 +92,12 @@ Included as part of the following classes and functions: - inspiro_get_theme_svg() - inspiro_dropdown_icon_to_menu_link() +Heroicons, Copyright (c) Tailwind Labs, Inc. +License: MIT +Source: https://github.com/tailwindlabs/heroicons +Included as the SVG files in assets/icons/, registered with the WordPress +Icons API in inc/icons.php. + Bundled header image, Jeremy Bishop License: CC0 1.0 Universal (CC0 1.0) Source: https://stocksnap.io/photo/sea-ocean-ECZV5RZKSZ From f2237df77b6fab3790cf91fd8e5fbf9c75415270 Mon Sep 17 00:00:00 2001 From: Qara Yahya Date: Thu, 10 Sep 2026 12:43:08 +0100 Subject: [PATCH 2/6] feat: add social icons --- assets/icons/social/dribbble.svg | 3 + assets/icons/social/etsy.svg | 3 + assets/icons/social/facebook.svg | 3 + assets/icons/social/github.svg | 3 + assets/icons/social/google.svg | 3 + assets/icons/social/instagram.svg | 3 + assets/icons/social/maildotru.svg | 3 + assets/icons/social/medium.svg | 3 + assets/icons/social/patreon.svg | 3 + assets/icons/social/pinterest.svg | 3 + assets/icons/social/reddit.svg | 3 + assets/icons/social/telegram.svg | 3 + assets/icons/social/tiktok.svg | 3 + assets/icons/social/twitch.svg | 3 + assets/icons/social/vimeo.svg | 3 + assets/icons/social/whatsapp.svg | 3 + assets/icons/social/wordpress.svg | 3 + assets/icons/social/x.svg | 3 + assets/icons/social/youtube.svg | 3 + inc/icons.php | 96 +++++++++++++++++++++++-------- readme.txt | 6 ++ 21 files changed, 135 insertions(+), 24 deletions(-) create mode 100644 assets/icons/social/dribbble.svg create mode 100644 assets/icons/social/etsy.svg create mode 100644 assets/icons/social/facebook.svg create mode 100644 assets/icons/social/github.svg create mode 100644 assets/icons/social/google.svg create mode 100644 assets/icons/social/instagram.svg create mode 100644 assets/icons/social/maildotru.svg create mode 100644 assets/icons/social/medium.svg create mode 100644 assets/icons/social/patreon.svg create mode 100644 assets/icons/social/pinterest.svg create mode 100644 assets/icons/social/reddit.svg create mode 100644 assets/icons/social/telegram.svg create mode 100644 assets/icons/social/tiktok.svg create mode 100644 assets/icons/social/twitch.svg create mode 100644 assets/icons/social/vimeo.svg create mode 100644 assets/icons/social/whatsapp.svg create mode 100644 assets/icons/social/wordpress.svg create mode 100644 assets/icons/social/x.svg create mode 100644 assets/icons/social/youtube.svg diff --git a/assets/icons/social/dribbble.svg b/assets/icons/social/dribbble.svg new file mode 100644 index 00000000..fbbf7ba7 --- /dev/null +++ b/assets/icons/social/dribbble.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/social/etsy.svg b/assets/icons/social/etsy.svg new file mode 100644 index 00000000..0b705a0d --- /dev/null +++ b/assets/icons/social/etsy.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/social/facebook.svg b/assets/icons/social/facebook.svg new file mode 100644 index 00000000..da8e5f04 --- /dev/null +++ b/assets/icons/social/facebook.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/social/github.svg b/assets/icons/social/github.svg new file mode 100644 index 00000000..6c02d2b4 --- /dev/null +++ b/assets/icons/social/github.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/social/google.svg b/assets/icons/social/google.svg new file mode 100644 index 00000000..1837bb5d --- /dev/null +++ b/assets/icons/social/google.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/social/instagram.svg b/assets/icons/social/instagram.svg new file mode 100644 index 00000000..ead14802 --- /dev/null +++ b/assets/icons/social/instagram.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/social/maildotru.svg b/assets/icons/social/maildotru.svg new file mode 100644 index 00000000..4e1845c2 --- /dev/null +++ b/assets/icons/social/maildotru.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/social/medium.svg b/assets/icons/social/medium.svg new file mode 100644 index 00000000..f52f1db2 --- /dev/null +++ b/assets/icons/social/medium.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/social/patreon.svg b/assets/icons/social/patreon.svg new file mode 100644 index 00000000..9d3e4006 --- /dev/null +++ b/assets/icons/social/patreon.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/social/pinterest.svg b/assets/icons/social/pinterest.svg new file mode 100644 index 00000000..254a6209 --- /dev/null +++ b/assets/icons/social/pinterest.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/social/reddit.svg b/assets/icons/social/reddit.svg new file mode 100644 index 00000000..f67b344e --- /dev/null +++ b/assets/icons/social/reddit.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/social/telegram.svg b/assets/icons/social/telegram.svg new file mode 100644 index 00000000..a396fd1d --- /dev/null +++ b/assets/icons/social/telegram.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/social/tiktok.svg b/assets/icons/social/tiktok.svg new file mode 100644 index 00000000..ff495fdc --- /dev/null +++ b/assets/icons/social/tiktok.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/social/twitch.svg b/assets/icons/social/twitch.svg new file mode 100644 index 00000000..cf063bd9 --- /dev/null +++ b/assets/icons/social/twitch.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/social/vimeo.svg b/assets/icons/social/vimeo.svg new file mode 100644 index 00000000..2f65b7a4 --- /dev/null +++ b/assets/icons/social/vimeo.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/social/whatsapp.svg b/assets/icons/social/whatsapp.svg new file mode 100644 index 00000000..c0d2b388 --- /dev/null +++ b/assets/icons/social/whatsapp.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/social/wordpress.svg b/assets/icons/social/wordpress.svg new file mode 100644 index 00000000..1a482fcf --- /dev/null +++ b/assets/icons/social/wordpress.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/social/x.svg b/assets/icons/social/x.svg new file mode 100644 index 00000000..f908ce28 --- /dev/null +++ b/assets/icons/social/x.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/social/youtube.svg b/assets/icons/social/youtube.svg new file mode 100644 index 00000000..489f8b47 --- /dev/null +++ b/assets/icons/social/youtube.svg @@ -0,0 +1,3 @@ + + + diff --git a/inc/icons.php b/inc/icons.php index baf98028..ddd32f49 100644 --- a/inc/icons.php +++ b/inc/icons.php @@ -2,11 +2,13 @@ /** * Inspiro Lite icon registration. * - * Registers the "Inspiro" icon collection and its icons with the WordPress - * Icons API introduced in WordPress 7.1, which makes them selectable in the - * Icon block and available to templates through wp_get_icon(). + * Registers the "Inspiro" and "Social" icon collections and their icons with + * the WordPress Icons API introduced in WordPress 7.1, which makes them + * selectable in the Icon block and available to templates through + * wp_get_icon(). * - * The SVG files live in assets/icons/ and are sanitized by core on + * The SVG files live in assets/icons/ (general icons) and assets/icons/social/ + * (social network icons). They are sanitized by core on * registration: only , and survive, and stroke * attributes are stripped, so the icons are filled paths without a hard-coded * fill in order to inherit the Icon block's color settings. @@ -62,9 +64,44 @@ function inspiro_get_icons() { } } +if ( ! function_exists( 'inspiro_get_social_icons' ) ) { + /** + * Returns the social network icons bundled with the theme. + * + * The array keys match the SVG file names in assets/icons/social/. + * + * @since Inspiro 2.2.4 + * + * @return array Associative array of icon slug => human-readable label. + */ + function inspiro_get_social_icons() { + return array( + 'dribbble' => __( 'Dribbble', 'inspiro' ), + 'etsy' => __( 'Etsy', 'inspiro' ), + 'facebook' => __( 'Facebook', 'inspiro' ), + 'github' => __( 'GitHub', 'inspiro' ), + 'google' => __( 'Google', 'inspiro' ), + 'instagram' => __( 'Instagram', 'inspiro' ), + 'maildotru' => __( 'Mail.ru', 'inspiro' ), + 'medium' => __( 'Medium', 'inspiro' ), + 'patreon' => __( 'Patreon', 'inspiro' ), + 'pinterest' => __( 'Pinterest', 'inspiro' ), + 'reddit' => __( 'Reddit', 'inspiro' ), + 'telegram' => __( 'Telegram', 'inspiro' ), + 'tiktok' => __( 'TikTok', 'inspiro' ), + 'twitch' => __( 'Twitch', 'inspiro' ), + 'vimeo' => __( 'Vimeo', 'inspiro' ), + 'whatsapp' => __( 'WhatsApp', 'inspiro' ), + 'wordpress' => __( 'WordPress', 'inspiro' ), + 'x' => __( 'X', 'inspiro' ), + 'youtube' => __( 'YouTube', 'inspiro' ), + ); + } +} + if ( ! function_exists( 'inspiro_register_icons' ) ) { /** - * Registers the Inspiro icon collection and its icons. + * Registers the Inspiro and Social icon collections and their icons. * * Does nothing on WordPress versions older than 7.1, where the Icons API * is not available. @@ -78,28 +115,39 @@ function inspiro_register_icons() { return; } - $is_registered = wp_register_icon_collection( - 'inspiro', - array( - 'label' => __( 'Inspiro', 'inspiro' ), - 'description' => __( 'Icons bundled with the Inspiro theme.', 'inspiro' ), - ) + $collections = array( + 'inspiro' => array( + 'args' => array( + 'label' => __( 'Inspiro', 'inspiro' ), + 'description' => __( 'Icons bundled with the Inspiro theme.', 'inspiro' ), + ), + 'icons_dir' => INSPIRO_THEME_DIR . 'assets/icons/', + 'icons' => inspiro_get_icons(), + ), + 'social' => array( + 'args' => array( + 'label' => __( 'Social', 'inspiro' ), + 'description' => __( 'Social network icons bundled with the Inspiro theme.', 'inspiro' ), + ), + 'icons_dir' => INSPIRO_THEME_DIR . 'assets/icons/social/', + 'icons' => inspiro_get_social_icons(), + ), ); - if ( ! $is_registered ) { - return; - } - - $icons_dir = INSPIRO_THEME_DIR . 'assets/icons/'; + foreach ( $collections as $collection => $collection_data ) { + if ( ! wp_register_icon_collection( $collection, $collection_data['args'] ) ) { + continue; + } - foreach ( inspiro_get_icons() as $slug => $label ) { - wp_register_icon( - 'inspiro/' . $slug, - array( - 'label' => $label, - 'file_path' => $icons_dir . $slug . '.svg', - ) - ); + foreach ( $collection_data['icons'] as $slug => $label ) { + wp_register_icon( + $collection . '/' . $slug, + array( + 'label' => $label, + 'file_path' => $collection_data['icons_dir'] . $slug . '.svg', + ) + ); + } } } } diff --git a/readme.txt b/readme.txt index bf723fac..922f7301 100644 --- a/readme.txt +++ b/readme.txt @@ -98,6 +98,12 @@ Source: https://github.com/tailwindlabs/heroicons Included as the SVG files in assets/icons/, registered with the WordPress Icons API in inc/icons.php. +Simple Icons +License: CC0 1.0 Universal (CC0 1.0) +Source: https://github.com/simple-icons/simple-icons +Included as the SVG files in assets/icons/social/, registered with the +WordPress Icons API in inc/icons.php. + Bundled header image, Jeremy Bishop License: CC0 1.0 Universal (CC0 1.0) Source: https://stocksnap.io/photo/sea-ocean-ECZV5RZKSZ From 43f2c775e81697950a647f1a374bb69dbc0fd256 Mon Sep 17 00:00:00 2001 From: Qara Yahya Date: Thu, 10 Sep 2026 14:21:41 +0100 Subject: [PATCH 3/6] feat: add new SVG icons --- assets/icons/academic-cap.svg | 1 + assets/icons/arrow-down.svg | 1 + assets/icons/arrow-left.svg | 1 + assets/icons/arrow-long-right.svg | 1 + assets/icons/arrow-right.svg | 1 + assets/icons/arrow-up-right.svg | 1 + assets/icons/banknotes.svg | 1 + assets/icons/bolt.svg | 4 +- assets/icons/book-open.svg | 1 + assets/icons/briefcase.svg | 5 +- assets/icons/building.svg | 1 + assets/icons/cake.svg | 1 + assets/icons/calendar.svg | 1 + assets/icons/camera.svg | 1 + assets/icons/chart-bar.svg | 1 + assets/icons/chart-pie.svg | 1 + assets/icons/chat.svg | 5 +- assets/icons/check-badge.svg | 1 + assets/icons/check-circle.svg | 1 + assets/icons/check.svg | 1 + assets/icons/chevron-down.svg | 1 + assets/icons/chevron-left.svg | 1 + assets/icons/chevron-right.svg | 1 + assets/icons/clipboard-list.svg | 1 + assets/icons/clock.svg | 4 +- assets/icons/close.svg | 1 + assets/icons/code.svg | 3 - assets/icons/conversation.svg | 1 + assets/icons/credit-card.svg | 1 + assets/icons/currency-dollar.svg | 1 + assets/icons/document-check.svg | 1 + assets/icons/document.svg | 1 + assets/icons/education.svg | 5 - assets/icons/email.svg | 1 + assets/icons/external-link.svg | 1 + assets/icons/film.svg | 3 - assets/icons/fire.svg | 4 +- assets/icons/gift.svg | 6 +- assets/icons/globe.svg | 12 +- assets/icons/grid.svg | 1 + assets/icons/hand-raised.svg | 1 + assets/icons/heart.svg | 4 +- assets/icons/home.svg | 1 + assets/icons/info.svg | 1 + assets/icons/library.svg | 1 + assets/icons/lightbulb.svg | 1 + assets/icons/lock.svg | 1 + assets/icons/map-pin.svg | 1 + assets/icons/megaphone.svg | 5 +- assets/icons/menu.svg | 1 + assets/icons/microphone.svg | 1 + assets/icons/minus.svg | 1 + assets/icons/music.svg | 4 +- assets/icons/office.svg | 3 - assets/icons/paint-brush.svg | 4 +- assets/icons/paper-plane.svg | 3 - assets/icons/phone.svg | 4 +- assets/icons/photo.svg | 1 + assets/icons/play.svg | 4 +- assets/icons/plus-circle.svg | 1 + assets/icons/presentation.svg | 4 +- assets/icons/puzzle-piece.svg | 3 - assets/icons/receipt-percent.svg | 1 + assets/icons/rectangle-group.svg | 1 + assets/icons/rocket.svg | 5 +- assets/icons/search.svg | 1 + assets/icons/send.svg | 1 + assets/icons/share.svg | 1 + assets/icons/shield-check.svg | 1 + assets/icons/shopping-bag.svg | 4 +- assets/icons/shopping-cart.svg | 1 + assets/icons/smile.svg | 1 + assets/icons/social/dribbble.svg | 4 +- assets/icons/social/etsy.svg | 4 +- assets/icons/social/facebook.svg | 4 +- assets/icons/social/github.svg | 4 +- assets/icons/social/google.svg | 4 +- assets/icons/social/instagram.svg | 4 +- assets/icons/social/maildotru.svg | 4 +- assets/icons/social/medium.svg | 4 +- assets/icons/social/patreon.svg | 4 +- assets/icons/social/pinterest.svg | 4 +- assets/icons/social/reddit.svg | 4 +- assets/icons/social/telegram.svg | 4 +- assets/icons/social/tiktok.svg | 4 +- assets/icons/social/twitch.svg | 4 +- assets/icons/social/vimeo.svg | 4 +- assets/icons/social/whatsapp.svg | 4 +- assets/icons/social/wordpress.svg | 4 +- assets/icons/social/x.svg | 4 +- assets/icons/social/youtube.svg | 4 +- assets/icons/sparkles.svg | 6 +- assets/icons/star.svg | 1 + assets/icons/storefront.svg | 1 + assets/icons/sun.svg | 1 + assets/icons/support.svg | 3 - assets/icons/tag.svg | 1 + assets/icons/ticket.svg | 3 - assets/icons/tools.svg | 5 - assets/icons/trending-up.svg | 4 +- assets/icons/trophy.svg | 4 +- assets/icons/truck.svg | 8 +- assets/icons/user-circle.svg | 1 + assets/icons/user-group.svg | 1 + assets/icons/user.svg | 1 + assets/icons/users.svg | 1 + assets/icons/verified.svg | 3 - assets/icons/video-camera.svg | 1 + assets/icons/wallet.svg | 1 + inc/icons.php | 308 ++++++++++++++++++++++-------- 110 files changed, 323 insertions(+), 255 deletions(-) create mode 100644 assets/icons/academic-cap.svg create mode 100644 assets/icons/arrow-down.svg create mode 100644 assets/icons/arrow-left.svg create mode 100644 assets/icons/arrow-long-right.svg create mode 100644 assets/icons/arrow-right.svg create mode 100644 assets/icons/arrow-up-right.svg create mode 100644 assets/icons/banknotes.svg create mode 100644 assets/icons/book-open.svg create mode 100644 assets/icons/building.svg create mode 100644 assets/icons/cake.svg create mode 100644 assets/icons/calendar.svg create mode 100644 assets/icons/camera.svg create mode 100644 assets/icons/chart-bar.svg create mode 100644 assets/icons/chart-pie.svg create mode 100644 assets/icons/check-badge.svg create mode 100644 assets/icons/check-circle.svg create mode 100644 assets/icons/check.svg create mode 100644 assets/icons/chevron-down.svg create mode 100644 assets/icons/chevron-left.svg create mode 100644 assets/icons/chevron-right.svg create mode 100644 assets/icons/clipboard-list.svg create mode 100644 assets/icons/close.svg delete mode 100644 assets/icons/code.svg create mode 100644 assets/icons/conversation.svg create mode 100644 assets/icons/credit-card.svg create mode 100644 assets/icons/currency-dollar.svg create mode 100644 assets/icons/document-check.svg create mode 100644 assets/icons/document.svg delete mode 100644 assets/icons/education.svg create mode 100644 assets/icons/email.svg create mode 100644 assets/icons/external-link.svg delete mode 100644 assets/icons/film.svg create mode 100644 assets/icons/grid.svg create mode 100644 assets/icons/hand-raised.svg create mode 100644 assets/icons/home.svg create mode 100644 assets/icons/info.svg create mode 100644 assets/icons/library.svg create mode 100644 assets/icons/lightbulb.svg create mode 100644 assets/icons/lock.svg create mode 100644 assets/icons/map-pin.svg create mode 100644 assets/icons/menu.svg create mode 100644 assets/icons/microphone.svg create mode 100644 assets/icons/minus.svg delete mode 100644 assets/icons/office.svg delete mode 100644 assets/icons/paper-plane.svg create mode 100644 assets/icons/photo.svg create mode 100644 assets/icons/plus-circle.svg delete mode 100644 assets/icons/puzzle-piece.svg create mode 100644 assets/icons/receipt-percent.svg create mode 100644 assets/icons/rectangle-group.svg create mode 100644 assets/icons/search.svg create mode 100644 assets/icons/send.svg create mode 100644 assets/icons/share.svg create mode 100644 assets/icons/shield-check.svg create mode 100644 assets/icons/shopping-cart.svg create mode 100644 assets/icons/smile.svg create mode 100644 assets/icons/star.svg create mode 100644 assets/icons/storefront.svg create mode 100644 assets/icons/sun.svg delete mode 100644 assets/icons/support.svg create mode 100644 assets/icons/tag.svg delete mode 100644 assets/icons/ticket.svg delete mode 100644 assets/icons/tools.svg create mode 100644 assets/icons/user-circle.svg create mode 100644 assets/icons/user-group.svg create mode 100644 assets/icons/user.svg create mode 100644 assets/icons/users.svg delete mode 100644 assets/icons/verified.svg create mode 100644 assets/icons/video-camera.svg create mode 100644 assets/icons/wallet.svg diff --git a/assets/icons/academic-cap.svg b/assets/icons/academic-cap.svg new file mode 100644 index 00000000..cf23a7c3 --- /dev/null +++ b/assets/icons/academic-cap.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/arrow-down.svg b/assets/icons/arrow-down.svg new file mode 100644 index 00000000..dfeb0aaa --- /dev/null +++ b/assets/icons/arrow-down.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/arrow-left.svg b/assets/icons/arrow-left.svg new file mode 100644 index 00000000..1be1eb58 --- /dev/null +++ b/assets/icons/arrow-left.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/arrow-long-right.svg b/assets/icons/arrow-long-right.svg new file mode 100644 index 00000000..f48e4705 --- /dev/null +++ b/assets/icons/arrow-long-right.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/arrow-right.svg b/assets/icons/arrow-right.svg new file mode 100644 index 00000000..eb47cd66 --- /dev/null +++ b/assets/icons/arrow-right.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/arrow-up-right.svg b/assets/icons/arrow-up-right.svg new file mode 100644 index 00000000..9ede8b20 --- /dev/null +++ b/assets/icons/arrow-up-right.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/banknotes.svg b/assets/icons/banknotes.svg new file mode 100644 index 00000000..ba8dc3ea --- /dev/null +++ b/assets/icons/banknotes.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/bolt.svg b/assets/icons/bolt.svg index 727b9519..b1c88236 100644 --- a/assets/icons/bolt.svg +++ b/assets/icons/bolt.svg @@ -1,3 +1 @@ - - - + diff --git a/assets/icons/book-open.svg b/assets/icons/book-open.svg new file mode 100644 index 00000000..775cfe53 --- /dev/null +++ b/assets/icons/book-open.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/briefcase.svg b/assets/icons/briefcase.svg index 1a9b94d8..5511dedb 100644 --- a/assets/icons/briefcase.svg +++ b/assets/icons/briefcase.svg @@ -1,4 +1 @@ - - - - + diff --git a/assets/icons/building.svg b/assets/icons/building.svg new file mode 100644 index 00000000..a80f32a6 --- /dev/null +++ b/assets/icons/building.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/cake.svg b/assets/icons/cake.svg new file mode 100644 index 00000000..509cfa39 --- /dev/null +++ b/assets/icons/cake.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/calendar.svg b/assets/icons/calendar.svg new file mode 100644 index 00000000..e43ae7e8 --- /dev/null +++ b/assets/icons/calendar.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/camera.svg b/assets/icons/camera.svg new file mode 100644 index 00000000..3e8e19e4 --- /dev/null +++ b/assets/icons/camera.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/chart-bar.svg b/assets/icons/chart-bar.svg new file mode 100644 index 00000000..b1aeba9e --- /dev/null +++ b/assets/icons/chart-bar.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/chart-pie.svg b/assets/icons/chart-pie.svg new file mode 100644 index 00000000..0eff6ff6 --- /dev/null +++ b/assets/icons/chart-pie.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/chat.svg b/assets/icons/chat.svg index 71681426..136520c1 100644 --- a/assets/icons/chat.svg +++ b/assets/icons/chat.svg @@ -1,4 +1 @@ - - - - + diff --git a/assets/icons/check-badge.svg b/assets/icons/check-badge.svg new file mode 100644 index 00000000..ba712fb8 --- /dev/null +++ b/assets/icons/check-badge.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/check-circle.svg b/assets/icons/check-circle.svg new file mode 100644 index 00000000..86690b43 --- /dev/null +++ b/assets/icons/check-circle.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/check.svg b/assets/icons/check.svg new file mode 100644 index 00000000..81679c03 --- /dev/null +++ b/assets/icons/check.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/chevron-down.svg b/assets/icons/chevron-down.svg new file mode 100644 index 00000000..aee6f138 --- /dev/null +++ b/assets/icons/chevron-down.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/chevron-left.svg b/assets/icons/chevron-left.svg new file mode 100644 index 00000000..a48c3837 --- /dev/null +++ b/assets/icons/chevron-left.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/chevron-right.svg b/assets/icons/chevron-right.svg new file mode 100644 index 00000000..6f60cec8 --- /dev/null +++ b/assets/icons/chevron-right.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/clipboard-list.svg b/assets/icons/clipboard-list.svg new file mode 100644 index 00000000..dcefa1c3 --- /dev/null +++ b/assets/icons/clipboard-list.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/clock.svg b/assets/icons/clock.svg index f8398867..0b956dc7 100644 --- a/assets/icons/clock.svg +++ b/assets/icons/clock.svg @@ -1,3 +1 @@ - - - + diff --git a/assets/icons/close.svg b/assets/icons/close.svg new file mode 100644 index 00000000..7eaf9ea4 --- /dev/null +++ b/assets/icons/close.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/code.svg b/assets/icons/code.svg deleted file mode 100644 index e5be7b9f..00000000 --- a/assets/icons/code.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/conversation.svg b/assets/icons/conversation.svg new file mode 100644 index 00000000..373828d1 --- /dev/null +++ b/assets/icons/conversation.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/credit-card.svg b/assets/icons/credit-card.svg new file mode 100644 index 00000000..ee2cd85a --- /dev/null +++ b/assets/icons/credit-card.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/currency-dollar.svg b/assets/icons/currency-dollar.svg new file mode 100644 index 00000000..60457b5a --- /dev/null +++ b/assets/icons/currency-dollar.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/document-check.svg b/assets/icons/document-check.svg new file mode 100644 index 00000000..b7811387 --- /dev/null +++ b/assets/icons/document-check.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/document.svg b/assets/icons/document.svg new file mode 100644 index 00000000..cc08c0cd --- /dev/null +++ b/assets/icons/document.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/education.svg b/assets/icons/education.svg deleted file mode 100644 index 25e68884..00000000 --- a/assets/icons/education.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/assets/icons/email.svg b/assets/icons/email.svg new file mode 100644 index 00000000..a9eef9bd --- /dev/null +++ b/assets/icons/email.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/external-link.svg b/assets/icons/external-link.svg new file mode 100644 index 00000000..2196de30 --- /dev/null +++ b/assets/icons/external-link.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/film.svg b/assets/icons/film.svg deleted file mode 100644 index 6f31a931..00000000 --- a/assets/icons/film.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/fire.svg b/assets/icons/fire.svg index 386da880..a14485b8 100644 --- a/assets/icons/fire.svg +++ b/assets/icons/fire.svg @@ -1,3 +1 @@ - - - + diff --git a/assets/icons/gift.svg b/assets/icons/gift.svg index 9914ff02..104d4202 100644 --- a/assets/icons/gift.svg +++ b/assets/icons/gift.svg @@ -1,5 +1 @@ - - - - - + diff --git a/assets/icons/globe.svg b/assets/icons/globe.svg index 803e9379..7c0420bc 100644 --- a/assets/icons/globe.svg +++ b/assets/icons/globe.svg @@ -1,11 +1 @@ - - - - - - - - - - - + diff --git a/assets/icons/grid.svg b/assets/icons/grid.svg new file mode 100644 index 00000000..aed31575 --- /dev/null +++ b/assets/icons/grid.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/hand-raised.svg b/assets/icons/hand-raised.svg new file mode 100644 index 00000000..b2d2e7e5 --- /dev/null +++ b/assets/icons/hand-raised.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/heart.svg b/assets/icons/heart.svg index 728772bc..dc0cae6d 100644 --- a/assets/icons/heart.svg +++ b/assets/icons/heart.svg @@ -1,3 +1 @@ - - - + diff --git a/assets/icons/home.svg b/assets/icons/home.svg new file mode 100644 index 00000000..41714fd0 --- /dev/null +++ b/assets/icons/home.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/info.svg b/assets/icons/info.svg new file mode 100644 index 00000000..9d7f68e8 --- /dev/null +++ b/assets/icons/info.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/library.svg b/assets/icons/library.svg new file mode 100644 index 00000000..64ec3f65 --- /dev/null +++ b/assets/icons/library.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/lightbulb.svg b/assets/icons/lightbulb.svg new file mode 100644 index 00000000..e7370737 --- /dev/null +++ b/assets/icons/lightbulb.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/lock.svg b/assets/icons/lock.svg new file mode 100644 index 00000000..06154ec7 --- /dev/null +++ b/assets/icons/lock.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/map-pin.svg b/assets/icons/map-pin.svg new file mode 100644 index 00000000..08132c40 --- /dev/null +++ b/assets/icons/map-pin.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/megaphone.svg b/assets/icons/megaphone.svg index 6cfaccb7..44526340 100644 --- a/assets/icons/megaphone.svg +++ b/assets/icons/megaphone.svg @@ -1,4 +1 @@ - - - - + diff --git a/assets/icons/menu.svg b/assets/icons/menu.svg new file mode 100644 index 00000000..c92daff5 --- /dev/null +++ b/assets/icons/menu.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/microphone.svg b/assets/icons/microphone.svg new file mode 100644 index 00000000..49d3dff7 --- /dev/null +++ b/assets/icons/microphone.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/minus.svg b/assets/icons/minus.svg new file mode 100644 index 00000000..20f412a9 --- /dev/null +++ b/assets/icons/minus.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/music.svg b/assets/icons/music.svg index 6e20a788..358fee82 100644 --- a/assets/icons/music.svg +++ b/assets/icons/music.svg @@ -1,3 +1 @@ - - - + diff --git a/assets/icons/office.svg b/assets/icons/office.svg deleted file mode 100644 index 8b0ff122..00000000 --- a/assets/icons/office.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/paint-brush.svg b/assets/icons/paint-brush.svg index 4ae58855..32a830ec 100644 --- a/assets/icons/paint-brush.svg +++ b/assets/icons/paint-brush.svg @@ -1,3 +1 @@ - - - + diff --git a/assets/icons/paper-plane.svg b/assets/icons/paper-plane.svg deleted file mode 100644 index 53cf8cb5..00000000 --- a/assets/icons/paper-plane.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/phone.svg b/assets/icons/phone.svg index 328b5a45..dd89657b 100644 --- a/assets/icons/phone.svg +++ b/assets/icons/phone.svg @@ -1,3 +1 @@ - - - + diff --git a/assets/icons/photo.svg b/assets/icons/photo.svg new file mode 100644 index 00000000..b965b44f --- /dev/null +++ b/assets/icons/photo.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/play.svg b/assets/icons/play.svg index b59e3d8b..132216e3 100644 --- a/assets/icons/play.svg +++ b/assets/icons/play.svg @@ -1,3 +1 @@ - - - + diff --git a/assets/icons/plus-circle.svg b/assets/icons/plus-circle.svg new file mode 100644 index 00000000..d0777b22 --- /dev/null +++ b/assets/icons/plus-circle.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/presentation.svg b/assets/icons/presentation.svg index 3b89c3cd..c948b1cc 100644 --- a/assets/icons/presentation.svg +++ b/assets/icons/presentation.svg @@ -1,3 +1 @@ - - - + diff --git a/assets/icons/puzzle-piece.svg b/assets/icons/puzzle-piece.svg deleted file mode 100644 index bb5b5518..00000000 --- a/assets/icons/puzzle-piece.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/receipt-percent.svg b/assets/icons/receipt-percent.svg new file mode 100644 index 00000000..50e6824b --- /dev/null +++ b/assets/icons/receipt-percent.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/rectangle-group.svg b/assets/icons/rectangle-group.svg new file mode 100644 index 00000000..6d9539ce --- /dev/null +++ b/assets/icons/rectangle-group.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/rocket.svg b/assets/icons/rocket.svg index bb89a0d3..e88e00da 100644 --- a/assets/icons/rocket.svg +++ b/assets/icons/rocket.svg @@ -1,4 +1 @@ - - - - + diff --git a/assets/icons/search.svg b/assets/icons/search.svg new file mode 100644 index 00000000..f6c9e603 --- /dev/null +++ b/assets/icons/search.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/send.svg b/assets/icons/send.svg new file mode 100644 index 00000000..139ec509 --- /dev/null +++ b/assets/icons/send.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/share.svg b/assets/icons/share.svg new file mode 100644 index 00000000..acd62293 --- /dev/null +++ b/assets/icons/share.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/shield-check.svg b/assets/icons/shield-check.svg new file mode 100644 index 00000000..6d75b683 --- /dev/null +++ b/assets/icons/shield-check.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/shopping-bag.svg b/assets/icons/shopping-bag.svg index dcc27007..f61971e6 100644 --- a/assets/icons/shopping-bag.svg +++ b/assets/icons/shopping-bag.svg @@ -1,3 +1 @@ - - - + diff --git a/assets/icons/shopping-cart.svg b/assets/icons/shopping-cart.svg new file mode 100644 index 00000000..2fbae5f7 --- /dev/null +++ b/assets/icons/shopping-cart.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/smile.svg b/assets/icons/smile.svg new file mode 100644 index 00000000..1e87ae8c --- /dev/null +++ b/assets/icons/smile.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/social/dribbble.svg b/assets/icons/social/dribbble.svg index fbbf7ba7..73cd7032 100644 --- a/assets/icons/social/dribbble.svg +++ b/assets/icons/social/dribbble.svg @@ -1,3 +1 @@ - - - + diff --git a/assets/icons/social/etsy.svg b/assets/icons/social/etsy.svg index 0b705a0d..0443b7c4 100644 --- a/assets/icons/social/etsy.svg +++ b/assets/icons/social/etsy.svg @@ -1,3 +1 @@ - - - + diff --git a/assets/icons/social/facebook.svg b/assets/icons/social/facebook.svg index da8e5f04..8549d26b 100644 --- a/assets/icons/social/facebook.svg +++ b/assets/icons/social/facebook.svg @@ -1,3 +1 @@ - - - + diff --git a/assets/icons/social/github.svg b/assets/icons/social/github.svg index 6c02d2b4..534729a0 100644 --- a/assets/icons/social/github.svg +++ b/assets/icons/social/github.svg @@ -1,3 +1 @@ - - - + diff --git a/assets/icons/social/google.svg b/assets/icons/social/google.svg index 1837bb5d..d73f140a 100644 --- a/assets/icons/social/google.svg +++ b/assets/icons/social/google.svg @@ -1,3 +1 @@ - - - + diff --git a/assets/icons/social/instagram.svg b/assets/icons/social/instagram.svg index ead14802..779b0010 100644 --- a/assets/icons/social/instagram.svg +++ b/assets/icons/social/instagram.svg @@ -1,3 +1 @@ - - - + diff --git a/assets/icons/social/maildotru.svg b/assets/icons/social/maildotru.svg index 4e1845c2..eace5d77 100644 --- a/assets/icons/social/maildotru.svg +++ b/assets/icons/social/maildotru.svg @@ -1,3 +1 @@ - - - + diff --git a/assets/icons/social/medium.svg b/assets/icons/social/medium.svg index f52f1db2..14216d2f 100644 --- a/assets/icons/social/medium.svg +++ b/assets/icons/social/medium.svg @@ -1,3 +1 @@ - - - + diff --git a/assets/icons/social/patreon.svg b/assets/icons/social/patreon.svg index 9d3e4006..43ab5d0a 100644 --- a/assets/icons/social/patreon.svg +++ b/assets/icons/social/patreon.svg @@ -1,3 +1 @@ - - - + diff --git a/assets/icons/social/pinterest.svg b/assets/icons/social/pinterest.svg index 254a6209..8e42f0d0 100644 --- a/assets/icons/social/pinterest.svg +++ b/assets/icons/social/pinterest.svg @@ -1,3 +1 @@ - - - + diff --git a/assets/icons/social/reddit.svg b/assets/icons/social/reddit.svg index f67b344e..9211f7e8 100644 --- a/assets/icons/social/reddit.svg +++ b/assets/icons/social/reddit.svg @@ -1,3 +1 @@ - - - + diff --git a/assets/icons/social/telegram.svg b/assets/icons/social/telegram.svg index a396fd1d..0c75415c 100644 --- a/assets/icons/social/telegram.svg +++ b/assets/icons/social/telegram.svg @@ -1,3 +1 @@ - - - + diff --git a/assets/icons/social/tiktok.svg b/assets/icons/social/tiktok.svg index ff495fdc..90d93d3b 100644 --- a/assets/icons/social/tiktok.svg +++ b/assets/icons/social/tiktok.svg @@ -1,3 +1 @@ - - - + diff --git a/assets/icons/social/twitch.svg b/assets/icons/social/twitch.svg index cf063bd9..5cab6008 100644 --- a/assets/icons/social/twitch.svg +++ b/assets/icons/social/twitch.svg @@ -1,3 +1 @@ - - - + diff --git a/assets/icons/social/vimeo.svg b/assets/icons/social/vimeo.svg index 2f65b7a4..a8b4e53e 100644 --- a/assets/icons/social/vimeo.svg +++ b/assets/icons/social/vimeo.svg @@ -1,3 +1 @@ - - - + diff --git a/assets/icons/social/whatsapp.svg b/assets/icons/social/whatsapp.svg index c0d2b388..1497a1e9 100644 --- a/assets/icons/social/whatsapp.svg +++ b/assets/icons/social/whatsapp.svg @@ -1,3 +1 @@ - - - + diff --git a/assets/icons/social/wordpress.svg b/assets/icons/social/wordpress.svg index 1a482fcf..5da6d1c5 100644 --- a/assets/icons/social/wordpress.svg +++ b/assets/icons/social/wordpress.svg @@ -1,3 +1 @@ - - - + diff --git a/assets/icons/social/x.svg b/assets/icons/social/x.svg index f908ce28..fb4bc421 100644 --- a/assets/icons/social/x.svg +++ b/assets/icons/social/x.svg @@ -1,3 +1 @@ - - - + diff --git a/assets/icons/social/youtube.svg b/assets/icons/social/youtube.svg index 489f8b47..9b054713 100644 --- a/assets/icons/social/youtube.svg +++ b/assets/icons/social/youtube.svg @@ -1,3 +1 @@ - - - + diff --git a/assets/icons/sparkles.svg b/assets/icons/sparkles.svg index 37dfcb48..4eefc611 100644 --- a/assets/icons/sparkles.svg +++ b/assets/icons/sparkles.svg @@ -1,5 +1 @@ - - - - - + diff --git a/assets/icons/star.svg b/assets/icons/star.svg new file mode 100644 index 00000000..9ecadc25 --- /dev/null +++ b/assets/icons/star.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/storefront.svg b/assets/icons/storefront.svg new file mode 100644 index 00000000..881e27e6 --- /dev/null +++ b/assets/icons/storefront.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/sun.svg b/assets/icons/sun.svg new file mode 100644 index 00000000..0e6561d7 --- /dev/null +++ b/assets/icons/sun.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/support.svg b/assets/icons/support.svg deleted file mode 100644 index d921e950..00000000 --- a/assets/icons/support.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/tag.svg b/assets/icons/tag.svg new file mode 100644 index 00000000..afd1eda4 --- /dev/null +++ b/assets/icons/tag.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/ticket.svg b/assets/icons/ticket.svg deleted file mode 100644 index 155c8bc6..00000000 --- a/assets/icons/ticket.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/tools.svg b/assets/icons/tools.svg deleted file mode 100644 index 4441e9cd..00000000 --- a/assets/icons/tools.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/assets/icons/trending-up.svg b/assets/icons/trending-up.svg index 824662fe..b7f7441e 100644 --- a/assets/icons/trending-up.svg +++ b/assets/icons/trending-up.svg @@ -1,3 +1 @@ - - - + diff --git a/assets/icons/trophy.svg b/assets/icons/trophy.svg index 38bdcd95..fece27aa 100644 --- a/assets/icons/trophy.svg +++ b/assets/icons/trophy.svg @@ -1,3 +1 @@ - - - + diff --git a/assets/icons/truck.svg b/assets/icons/truck.svg index 20940666..f8020d63 100644 --- a/assets/icons/truck.svg +++ b/assets/icons/truck.svg @@ -1,7 +1 @@ - - - - - - - + diff --git a/assets/icons/user-circle.svg b/assets/icons/user-circle.svg new file mode 100644 index 00000000..cc2b0f97 --- /dev/null +++ b/assets/icons/user-circle.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/user-group.svg b/assets/icons/user-group.svg new file mode 100644 index 00000000..789f6d48 --- /dev/null +++ b/assets/icons/user-group.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/user.svg b/assets/icons/user.svg new file mode 100644 index 00000000..f7ba71b7 --- /dev/null +++ b/assets/icons/user.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/users.svg b/assets/icons/users.svg new file mode 100644 index 00000000..f356d6c3 --- /dev/null +++ b/assets/icons/users.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/verified.svg b/assets/icons/verified.svg deleted file mode 100644 index 94aa0590..00000000 --- a/assets/icons/verified.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/video-camera.svg b/assets/icons/video-camera.svg new file mode 100644 index 00000000..2ac3d1a3 --- /dev/null +++ b/assets/icons/video-camera.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/wallet.svg b/assets/icons/wallet.svg new file mode 100644 index 00000000..a7396300 --- /dev/null +++ b/assets/icons/wallet.svg @@ -0,0 +1 @@ + diff --git a/inc/icons.php b/inc/icons.php index ddd32f49..286cf971 100644 --- a/inc/icons.php +++ b/inc/icons.php @@ -1,81 +1,179 @@ , and survive, and stroke - * attributes are stripped, so the icons are filled paths without a hard-coded - * fill in order to inherit the Icon block's color settings. + * Two collections are registered: + * + * - "inspiro", the general icon set, kept in sync with Inspiro Pro so patterns + * and demo content move between the two themes unchanged. The icons are + * Heroicons (solid, 24px) by Tailwind Labs, MIT licensed. + * - "social", the social network icons from Simple Icons, CC0 licensed. + * + * Core sanitises registered SVGs with wp_kses() and strips `stroke`, so only + * fill-based artwork survives intact. + * + * Everything is behind a function_exists() guard, so on WordPress < 7.1 this + * file loads and does nothing. * * @package Inspiro * @subpackage Inspiro_Lite * @since Inspiro 2.2.4 */ -if ( ! function_exists( 'inspiro_get_icons' ) ) { +// Prevent direct access. +if ( ! defined( 'ABSPATH' ) ) { + exit; +} + +/** + * The general icon collection slug. Icons register as "inspiro/". + */ +if ( ! defined( 'INSPIRO_ICON_COLLECTION' ) ) { + define( 'INSPIRO_ICON_COLLECTION', 'inspiro' ); +} + +/** + * The social icon collection slug. Icons register as "social/". + */ +if ( ! defined( 'INSPIRO_SOCIAL_ICON_COLLECTION' ) ) { + define( 'INSPIRO_SOCIAL_ICON_COLLECTION', 'social' ); +} + +if ( ! function_exists( 'inspiro_get_registered_icons' ) ) { /** - * Returns the icons bundled with the theme. + * Returns the registered icons as a map of slug => translated label. * * The array keys match the SVG file names in assets/icons/. * * @since Inspiro 2.2.4 * - * @return array Associative array of icon slug => human-readable label. + * @return array Icon slugs mapped to their labels. */ - function inspiro_get_icons() { - return array( - 'bolt' => __( 'Lightning Bolt', 'inspiro' ), - 'briefcase' => __( 'Briefcase', 'inspiro' ), - 'chat' => __( 'Chat', 'inspiro' ), - 'clock' => __( 'Clock', 'inspiro' ), - 'code' => __( 'Code', 'inspiro' ), - 'education' => __( 'Education', 'inspiro' ), - 'film' => __( 'Film', 'inspiro' ), - 'fire' => __( 'Fire', 'inspiro' ), - 'gift' => __( 'Gift', 'inspiro' ), - 'globe' => __( 'Globe', 'inspiro' ), - 'heart' => __( 'Heart', 'inspiro' ), - 'megaphone' => __( 'Megaphone', 'inspiro' ), - 'music' => __( 'Music', 'inspiro' ), - 'office' => __( 'Office Building', 'inspiro' ), - 'paint-brush' => __( 'Paint Brush', 'inspiro' ), - 'paper-plane' => __( 'Paper Plane', 'inspiro' ), - 'phone' => __( 'Phone', 'inspiro' ), - 'play' => __( 'Play', 'inspiro' ), - 'presentation' => __( 'Presentation', 'inspiro' ), - 'puzzle-piece' => __( 'Puzzle Piece', 'inspiro' ), - 'rocket' => __( 'Rocket', 'inspiro' ), - 'shopping-bag' => __( 'Shopping Bag', 'inspiro' ), - 'sparkles' => __( 'Sparkles', 'inspiro' ), - 'support' => __( 'Support', 'inspiro' ), - 'ticket' => __( 'Ticket', 'inspiro' ), - 'tools' => __( 'Tools', 'inspiro' ), - 'trending-up' => __( 'Trending Up', 'inspiro' ), - 'trophy' => __( 'Trophy', 'inspiro' ), - 'truck' => __( 'Truck', 'inspiro' ), - 'verified' => __( 'Verified Badge', 'inspiro' ), + function inspiro_get_registered_icons() { + $icons = array( + // Navigation. + 'arrow-right' => __( 'Arrow Right', 'inspiro' ), + 'arrow-left' => __( 'Arrow Left', 'inspiro' ), + 'arrow-up-right' => __( 'Arrow Up Right', 'inspiro' ), + 'arrow-down' => __( 'Arrow Down', 'inspiro' ), + 'arrow-long-right' => __( 'Long Arrow Right', 'inspiro' ), + 'chevron-right' => __( 'Chevron Right', 'inspiro' ), + 'chevron-down' => __( 'Chevron Down', 'inspiro' ), + 'chevron-left' => __( 'Chevron Left', 'inspiro' ), + 'close' => __( 'Close', 'inspiro' ), + 'menu' => __( 'Menu', 'inspiro' ), + 'search' => __( 'Search', 'inspiro' ), + 'external-link' => __( 'External Link', 'inspiro' ), + // Feedback. + 'check' => __( 'Check', 'inspiro' ), + 'check-circle' => __( 'Check Circle', 'inspiro' ), + 'check-badge' => __( 'Verified', 'inspiro' ), + 'minus' => __( 'Minus', 'inspiro' ), + 'plus-circle' => __( 'Plus Circle', 'inspiro' ), + 'star' => __( 'Star', 'inspiro' ), + 'sparkles' => __( 'Sparkles', 'inspiro' ), + 'smile' => __( 'Smile', 'inspiro' ), + // Contact. + 'email' => __( 'Email', 'inspiro' ), + 'phone' => __( 'Phone', 'inspiro' ), + 'map-pin' => __( 'Map Pin', 'inspiro' ), + 'clock' => __( 'Clock', 'inspiro' ), + 'calendar' => __( 'Calendar', 'inspiro' ), + 'send' => __( 'Send', 'inspiro' ), + 'chat' => __( 'Chat', 'inspiro' ), + 'conversation' => __( 'Conversation', 'inspiro' ), + // People. + 'user' => __( 'User', 'inspiro' ), + 'users' => __( 'Users', 'inspiro' ), + 'user-group' => __( 'User Group', 'inspiro' ), + 'user-circle' => __( 'User Circle', 'inspiro' ), + 'hand-raised' => __( 'Hand Raised', 'inspiro' ), + // Trust. + 'shield-check' => __( 'Shield Check', 'inspiro' ), + 'lock' => __( 'Lock', 'inspiro' ), + 'info' => __( 'Info', 'inspiro' ), + 'trophy' => __( 'Trophy', 'inspiro' ), + // Business. + 'briefcase' => __( 'Briefcase', 'inspiro' ), + 'chart-bar' => __( 'Bar Chart', 'inspiro' ), + 'chart-pie' => __( 'Pie Chart', 'inspiro' ), + 'presentation' => __( 'Presentation', 'inspiro' ), + 'trending-up' => __( 'Trending Up', 'inspiro' ), + 'clipboard-list' => __( 'Clipboard List', 'inspiro' ), + 'document' => __( 'Document', 'inspiro' ), + 'document-check' => __( 'Document Check', 'inspiro' ), + 'lightbulb' => __( 'Lightbulb', 'inspiro' ), + 'bolt' => __( 'Bolt', 'inspiro' ), + // Commerce. + 'shopping-cart' => __( 'Shopping Cart', 'inspiro' ), + 'shopping-bag' => __( 'Shopping Bag', 'inspiro' ), + 'credit-card' => __( 'Credit Card', 'inspiro' ), + 'banknotes' => __( 'Banknotes', 'inspiro' ), + 'wallet' => __( 'Wallet', 'inspiro' ), + 'currency-dollar' => __( 'Currency Dollar', 'inspiro' ), + 'tag' => __( 'Tag', 'inspiro' ), + 'truck' => __( 'Truck', 'inspiro' ), + 'gift' => __( 'Gift', 'inspiro' ), + 'receipt-percent' => __( 'Receipt Percent', 'inspiro' ), + // Media. + 'camera' => __( 'Camera', 'inspiro' ), + 'photo' => __( 'Photo', 'inspiro' ), + 'video-camera' => __( 'Video Camera', 'inspiro' ), + 'music' => __( 'Music', 'inspiro' ), + 'microphone' => __( 'Microphone', 'inspiro' ), + 'paint-brush' => __( 'Paint Brush', 'inspiro' ), + 'play' => __( 'Play', 'inspiro' ), + 'megaphone' => __( 'Megaphone', 'inspiro' ), + // Places. + 'building' => __( 'Building', 'inspiro' ), + 'storefront' => __( 'Storefront', 'inspiro' ), + 'library' => __( 'Library', 'inspiro' ), + 'home' => __( 'Home', 'inspiro' ), + 'globe' => __( 'Globe', 'inspiro' ), + 'academic-cap' => __( 'Academic Cap', 'inspiro' ), + 'book-open' => __( 'Open Book', 'inspiro' ), + 'cake' => __( 'Cake', 'inspiro' ), + 'fire' => __( 'Fire', 'inspiro' ), + 'sun' => __( 'Sun', 'inspiro' ), + 'heart' => __( 'Heart', 'inspiro' ), + // Layout. + 'grid' => __( 'Grid', 'inspiro' ), + 'rectangle-group' => __( 'Rectangle Group', 'inspiro' ), + 'share' => __( 'Share', 'inspiro' ), + 'rocket' => __( 'Rocket', 'inspiro' ), ); + + /** + * Filters the icons the theme registers with the WordPress Icons API. + * + * Removing an entry unregisters nothing that is already registered; filter + * early (before init) to take effect. Added entries need a matching SVG in + * the theme's assets/icons directory. + * + * @since Inspiro 2.2.4 + * + * @param array $icons Icon slugs mapped to their labels. + */ + return apply_filters( 'inspiro_registered_icons', $icons ); } } -if ( ! function_exists( 'inspiro_get_social_icons' ) ) { +if ( ! function_exists( 'inspiro_get_registered_social_icons' ) ) { /** - * Returns the social network icons bundled with the theme. + * Returns the registered social icons as a map of slug => translated label. * * The array keys match the SVG file names in assets/icons/social/. * * @since Inspiro 2.2.4 * - * @return array Associative array of icon slug => human-readable label. + * @return array Icon slugs mapped to their labels. */ - function inspiro_get_social_icons() { - return array( + function inspiro_get_registered_social_icons() { + $icons = array( 'dribbble' => __( 'Dribbble', 'inspiro' ), 'etsy' => __( 'Etsy', 'inspiro' ), 'facebook' => __( 'Facebook', 'inspiro' ), @@ -96,6 +194,62 @@ function inspiro_get_social_icons() { 'x' => __( 'X', 'inspiro' ), 'youtube' => __( 'YouTube', 'inspiro' ), ); + + /** + * Filters the social icons the theme registers with the Icons API. + * + * Added entries need a matching SVG in the theme's assets/icons/social + * directory. + * + * @since Inspiro 2.2.4 + * + * @param array $icons Icon slugs mapped to their labels. + */ + return apply_filters( 'inspiro_registered_social_icons', $icons ); + } +} + +if ( ! function_exists( 'inspiro_register_icon_collection' ) ) { + /** + * Registers one icon collection and the icons belonging to it. + * + * @since Inspiro 2.2.4 + * + * @param string $collection Collection slug. + * @param array $args Arguments passed to wp_register_icon_collection(). + * @param string $icons_dir Absolute path to the directory holding the SVGs, + * with a trailing slash. + * @param array $icons Icon slugs mapped to their labels. + * @return void + */ + function inspiro_register_icon_collection( $collection, $args, $icons_dir, $icons ) { + // A child theme or plugin may have registered the collection already. + $collection_exists = class_exists( 'WP_Icon_Collections_Registry' ) + && WP_Icon_Collections_Registry::get_instance()->is_registered( $collection ); + + if ( ! $collection_exists && ! wp_register_icon_collection( $collection, $args ) ) { + return; + } + + $registry = class_exists( 'WP_Icons_Registry' ) ? WP_Icons_Registry::get_instance() : null; + + foreach ( $icons as $slug => $label ) { + $name = $collection . '/' . $slug; + + // Registering twice triggers a _doing_it_wrong() notice, so skip duplicates. + if ( $registry && $registry->is_registered( $name ) ) { + continue; + } + + // The file is not read here; core reads it lazily on first render. + wp_register_icon( + $name, + array( + 'label' => $label, + 'file_path' => $icons_dir . $slug . '.svg', + ) + ); + } } } @@ -103,52 +257,38 @@ function inspiro_get_social_icons() { /** * Registers the Inspiro and Social icon collections and their icons. * - * Does nothing on WordPress versions older than 7.1, where the Icons API - * is not available. + * Runs on init at the default priority, after core has registered its own + * collections on the same hook at priority 0. * * @since Inspiro 2.2.4 * * @return void */ function inspiro_register_icons() { - if ( ! function_exists( 'wp_register_icon_collection' ) || ! function_exists( 'wp_register_icon' ) ) { + // WordPress < 7.1 has no Icons API; nothing to do. + if ( ! function_exists( 'wp_register_icon' ) || ! function_exists( 'wp_register_icon_collection' ) ) { return; } - $collections = array( - 'inspiro' => array( - 'args' => array( - 'label' => __( 'Inspiro', 'inspiro' ), - 'description' => __( 'Icons bundled with the Inspiro theme.', 'inspiro' ), - ), - 'icons_dir' => INSPIRO_THEME_DIR . 'assets/icons/', - 'icons' => inspiro_get_icons(), - ), - 'social' => array( - 'args' => array( - 'label' => __( 'Social', 'inspiro' ), - 'description' => __( 'Social network icons bundled with the Inspiro theme.', 'inspiro' ), - ), - 'icons_dir' => INSPIRO_THEME_DIR . 'assets/icons/social/', - 'icons' => inspiro_get_social_icons(), + inspiro_register_icon_collection( + INSPIRO_ICON_COLLECTION, + array( + 'label' => __( 'Inspiro', 'inspiro' ), + 'description' => __( 'Icon set for Inspiro', 'inspiro' ), ), + INSPIRO_THEME_DIR . 'assets/icons/', + inspiro_get_registered_icons() ); - foreach ( $collections as $collection => $collection_data ) { - if ( ! wp_register_icon_collection( $collection, $collection_data['args'] ) ) { - continue; - } - - foreach ( $collection_data['icons'] as $slug => $label ) { - wp_register_icon( - $collection . '/' . $slug, - array( - 'label' => $label, - 'file_path' => $collection_data['icons_dir'] . $slug . '.svg', - ) - ); - } - } + inspiro_register_icon_collection( + INSPIRO_SOCIAL_ICON_COLLECTION, + array( + 'label' => __( 'Social', 'inspiro' ), + 'description' => __( 'Social network icons for Inspiro', 'inspiro' ), + ), + INSPIRO_THEME_DIR . 'assets/icons/social/', + inspiro_get_registered_social_icons() + ); } } add_action( 'init', 'inspiro_register_icons' ); From 537b13dce7f9efc88d9161705b522fac6b4afa75 Mon Sep 17 00:00:00 2001 From: Qara Yahya Date: Thu, 10 Sep 2026 15:21:52 +0100 Subject: [PATCH 4/6] v2.2.4 --- README.md | 18 +++++++++++++++++- functions.php | 2 +- readme.txt | 6 +++++- style.css | 2 +- 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9543a8f6..32a398c2 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ **Contributors:** [wpzoom](https://profiles.wordpress.org/wpzoom/) **Requires at least:** 6.4 **Tested up to:** 7.0 -**Version:** 2.2.3 +**Version:** 2.2.4 **License:** GPLv2 or later **License URI:** http://www.gnu.org/licenses/gpl-2.0.html **Tags:** one-column, right-sidebar, flexible-header, custom-colors, custom-header, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, post-formats, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready @@ -98,6 +98,18 @@ Included as part of the following classes and functions: - inspiro_get_theme_svg() - inspiro_dropdown_icon_to_menu_link() +Heroicons, Copyright (c) Tailwind Labs, Inc. +License: MIT +Source: https://github.com/tailwindlabs/heroicons +Included as the SVG files in assets/icons/, registered with the WordPress +Icons API in inc/icons.php. + +Simple Icons +License: CC0 1.0 Universal (CC0 1.0) +Source: https://github.com/simple-icons/simple-icons +Included as the SVG files in assets/icons/social/, registered with the +WordPress Icons API in inc/icons.php. + Bundled header image, Jeremy Bishop License: CC0 1.0 Universal (CC0 1.0) Source: https://stocksnap.io/photo/sea-ocean-ECZV5RZKSZ @@ -118,6 +130,10 @@ Screenshot image: generated using AI (ChatGPT) ## Changelog ## +### 2.2.4 ### +* New: Icon collections registered with the Icons API in WordPress 7.1, making 80 theme icons selectable in the Icon block +* New: "Social" icon collection with 19 social network icons, including Facebook, Instagram, X, YouTube and TikTok + ### 2.2.3 ### * New: AI Demo Generator from the free Inspiro Starter Sites plugin * Fixed: Footer widget titles using headings other than H2 were not visible diff --git a/functions.php b/functions.php index e0b78fcb..52b4f0fd 100644 --- a/functions.php +++ b/functions.php @@ -15,7 +15,7 @@ /** * Define Constants */ -define( 'INSPIRO_THEME_VERSION', '2.2.3' ); +define( 'INSPIRO_THEME_VERSION', '2.2.4' ); define( 'INSPIRO_THEME_DIR', trailingslashit( get_template_directory() ) ); define( 'INSPIRO_THEME_URI', trailingslashit( esc_url( get_template_directory_uri() ) ) ); define( 'INSPIRO_THEME_ASSETS_URI', INSPIRO_THEME_URI . 'dist' ); diff --git a/readme.txt b/readme.txt index 922f7301..a1d463ae 100644 --- a/readme.txt +++ b/readme.txt @@ -2,7 +2,7 @@ Contributors: WPZOOM Requires at least: 6.4 Tested up to: 7.0 -Version: 2.2.3 +Version: 2.2.4 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Tags: one-column, right-sidebar, flexible-header, custom-colors, custom-header, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, post-formats, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready @@ -124,6 +124,10 @@ Screenshot image: generated using AI (ChatGPT) == Changelog == += 2.2.4 = +* New: Icon collections registered with the Icons API in WordPress 7.1, making 80 theme icons selectable in the Icon block +* New: "Social" icon collection with 19 social network icons, including Facebook, Instagram, X, YouTube and TikTok + = 2.2.3 = * New: AI Demo Generator from the free Inspiro Starter Sites plugin * Fixed: Footer widget titles using headings other than H2 were not visible diff --git a/style.css b/style.css index 008a26ba..e8f00621 100644 --- a/style.css +++ b/style.css @@ -5,7 +5,7 @@ Author: WPZOOM Author URI: https://www.wpzoom.com/ Description: Inspiro is a fast, ultra-lightweight, and versatile WordPress theme for small businesses, creative professionals, photographers, and visual portfolios. Launch your website in minutes with 20+ ready-made starter sites for both Elementor and the WordPress Block Editor (Gutenberg), each designed for a specific niche — business, agency, portfolio, online store, or blog. Don't see a perfect fit? Describe your website and the new AI Demo Generator (included with the free Inspiro Starter Sites plugin) designs and builds a custom demo just for you — pages, photos, menu, and colors, ready in about two minutes and fully editable with native blocks. Inspiro is also a great Elementor theme: it fully supports the Elementor header and footer builder (Theme Builder) along with other popular page builders like Beaver Builder, so you can design every part of your site visually. Built-in WooCommerce integration makes it easy to open an online store, while unique fullscreen video backgrounds (YouTube, Vimeo, and self-hosted) are perfect for photography, video, and multimedia projects. Fully responsive, SEO-friendly, GDPR-compliant, and privacy-focused with no external Google Fonts, Inspiro loads lightning-fast and looks perfect on every device. Discover more powerful features in the Premium version: https://www.wpzoom.com/themes/inspiro/ Tags: one-column, two-columns, right-sidebar, flexible-header, custom-colors, custom-header, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready, e-commerce, wide-blocks, portfolio, blog, custom-background, featured-image-header, full-width-template, theme-options, block-styles, block-patterns -Version: 2.2.3 +Version: 2.2.4 Requires at least: 6.4 Requires PHP: 7.4 Tested up to: 7.0 From 616a61f6b314e9097ed8853d654c63312beb818e Mon Sep 17 00:00:00 2001 From: Qara Yahya Date: Fri, 18 Sep 2026 11:48:40 +0100 Subject: [PATCH 5/6] refactor: replace outermost/icon-blocks with core/icon block (patterns) --- patterns/about-2.php | 12 ++------ patterns/contact-newsletter.php | 8 ++---- patterns/list-of-posts.php | 4 +-- patterns/section-with-3-columns.php | 12 ++------ patterns/social-footer-cta.php | 44 ++++++++--------------------- 5 files changed, 20 insertions(+), 60 deletions(-) diff --git a/patterns/about-2.php b/patterns/about-2.php index c2bd9b74..5754e51c 100644 --- a/patterns/about-2.php +++ b/patterns/about-2.php @@ -59,9 +59,7 @@
-
-
- +

Service 1

@@ -77,9 +75,7 @@ -
-
- +

Service 2

@@ -95,9 +91,7 @@ -
-
- +

Service 3

diff --git a/patterns/contact-newsletter.php b/patterns/contact-newsletter.php index ede1518e..0e64a5f9 100644 --- a/patterns/contact-newsletter.php +++ b/patterns/contact-newsletter.php @@ -19,9 +19,7 @@
-
-
- +

Contact us

@@ -47,9 +45,7 @@ -
-
- +

Subscribe to our Newsletter

diff --git a/patterns/list-of-posts.php b/patterns/list-of-posts.php index fa5c44fa..52c36d5e 100644 --- a/patterns/list-of-posts.php +++ b/patterns/list-of-posts.php @@ -42,9 +42,7 @@ -
-
-
+
diff --git a/patterns/section-with-3-columns.php b/patterns/section-with-3-columns.php index 339e739d..c9bc05a3 100644 --- a/patterns/section-with-3-columns.php +++ b/patterns/section-with-3-columns.php @@ -32,9 +32,7 @@
-
-
- +

Service 1

@@ -50,9 +48,7 @@ -
-
- +

Service 2

@@ -68,9 +64,7 @@ -
-
- +

Service 3

diff --git a/patterns/social-footer-cta.php b/patterns/social-footer-cta.php index b4f1ee54..a6850571 100644 --- a/patterns/social-footer-cta.php +++ b/patterns/social-footer-cta.php @@ -28,9 +28,7 @@
-
-
-
+
@@ -40,9 +38,7 @@ -
-
-
+
@@ -54,9 +50,7 @@
-
-
-
+
@@ -66,9 +60,7 @@ -
-
-
+
@@ -80,9 +72,7 @@
-
-
-
+
@@ -92,9 +82,7 @@ -
-
-
+
@@ -108,9 +96,7 @@
-
-
-
+
@@ -120,9 +106,7 @@ -
-
-
+
@@ -142,9 +126,7 @@ -
-
-
+
@@ -152,9 +134,7 @@
-
-
-
+
@@ -164,9 +144,7 @@ -
-
-
+
From 549c2d3a22c064ac184165c4b3676a62fb9ac530 Mon Sep 17 00:00:00 2001 From: Qara Yahya Date: Fri, 18 Sep 2026 11:59:24 +0100 Subject: [PATCH 6/6] refactor: use .svg image instead of outermost/icon-block --- assets/images/logos/logo-1.svg | 1 + assets/images/logos/logo-2.svg | 1 + assets/images/logos/logo-3.svg | 1 + assets/images/logos/logo-4.svg | 1 + assets/images/logos/logo-5.svg | 1 + inc/starter-content.php | 30 +++++++++++----------- patterns/homepage-with-hero-at-the-top.php | 30 +++++++++++----------- patterns/homepage.php | 30 +++++++++++----------- 8 files changed, 50 insertions(+), 45 deletions(-) create mode 100644 assets/images/logos/logo-1.svg create mode 100644 assets/images/logos/logo-2.svg create mode 100644 assets/images/logos/logo-3.svg create mode 100644 assets/images/logos/logo-4.svg create mode 100644 assets/images/logos/logo-5.svg diff --git a/assets/images/logos/logo-1.svg b/assets/images/logos/logo-1.svg new file mode 100644 index 00000000..73871efa --- /dev/null +++ b/assets/images/logos/logo-1.svg @@ -0,0 +1 @@ + diff --git a/assets/images/logos/logo-2.svg b/assets/images/logos/logo-2.svg new file mode 100644 index 00000000..88ebcfe5 --- /dev/null +++ b/assets/images/logos/logo-2.svg @@ -0,0 +1 @@ + diff --git a/assets/images/logos/logo-3.svg b/assets/images/logos/logo-3.svg new file mode 100644 index 00000000..88e22fe4 --- /dev/null +++ b/assets/images/logos/logo-3.svg @@ -0,0 +1 @@ + diff --git a/assets/images/logos/logo-4.svg b/assets/images/logos/logo-4.svg new file mode 100644 index 00000000..b0f73714 --- /dev/null +++ b/assets/images/logos/logo-4.svg @@ -0,0 +1 @@ + diff --git a/assets/images/logos/logo-5.svg b/assets/images/logos/logo-5.svg new file mode 100644 index 00000000..4bbeb38a --- /dev/null +++ b/assets/images/logos/logo-5.svg @@ -0,0 +1 @@ + diff --git a/inc/starter-content.php b/inc/starter-content.php index ec480323..a5ae180a 100644 --- a/inc/starter-content.php +++ b/inc/starter-content.php @@ -299,33 +299,33 @@ function inspiro_get_starter_content() {
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
diff --git a/patterns/homepage-with-hero-at-the-top.php b/patterns/homepage-with-hero-at-the-top.php index 752e6b3f..6bd40d7f 100644 --- a/patterns/homepage-with-hero-at-the-top.php +++ b/patterns/homepage-with-hero-at-the-top.php @@ -259,33 +259,33 @@
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
diff --git a/patterns/homepage.php b/patterns/homepage.php index 9534e4ff..2abd5cbe 100644 --- a/patterns/homepage.php +++ b/patterns/homepage.php @@ -239,33 +239,33 @@
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+