From acc3639666e3d7f685725321909dc5d56f5162cb Mon Sep 17 00:00:00 2001 From: Nathan Schmidt <91974372+nathan-schmidt-viget@users.noreply.github.com> Date: Fri, 26 Jul 2024 12:32:35 -0600 Subject: [PATCH] [#124] Adding btn icon function (#131) --- wp-content/themes/wp-starter/functions.php | 3 +++ wp-content/themes/wp-starter/inc/icons.php | 27 +++++++++++++++++++ .../src/images/{ => icons}/accordion-icon.svg | 0 .../src/images/{ => icons}/logo-grid-icon.svg | 0 .../images/{ => icons}/text-cards-icon.svg | 0 .../{ => icons}/text-icon-card-icon.svg | 0 .../{ => icons}/text-icon-placeholder.svg | 0 7 files changed, 30 insertions(+) create mode 100644 wp-content/themes/wp-starter/inc/icons.php rename wp-content/themes/wp-starter/src/images/{ => icons}/accordion-icon.svg (100%) rename wp-content/themes/wp-starter/src/images/{ => icons}/logo-grid-icon.svg (100%) rename wp-content/themes/wp-starter/src/images/{ => icons}/text-cards-icon.svg (100%) rename wp-content/themes/wp-starter/src/images/{ => icons}/text-icon-card-icon.svg (100%) rename wp-content/themes/wp-starter/src/images/{ => icons}/text-icon-placeholder.svg (100%) diff --git a/wp-content/themes/wp-starter/functions.php b/wp-content/themes/wp-starter/functions.php index a3cf2056..59389b86 100644 --- a/wp-content/themes/wp-starter/functions.php +++ b/wp-content/themes/wp-starter/functions.php @@ -26,3 +26,6 @@ // Block Functions. require_once get_stylesheet_directory() . '/inc/blocks.php'; + +// Custom Icons. +require_once get_stylesheet_directory() . '/inc/icons.php'; diff --git a/wp-content/themes/wp-starter/inc/icons.php b/wp-content/themes/wp-starter/inc/icons.php new file mode 100644 index 00000000..3ab2a1e6 --- /dev/null +++ b/wp-content/themes/wp-starter/inc/icons.php @@ -0,0 +1,27 @@ + __( 'YOUR LABEL', 'wp-starter' ), + 'icon' => file_get_contents( $icon_path . 'file-name.svg' ), + 'defaultLeft' => false, + ];*/ + + return $icons; + } +); diff --git a/wp-content/themes/wp-starter/src/images/accordion-icon.svg b/wp-content/themes/wp-starter/src/images/icons/accordion-icon.svg similarity index 100% rename from wp-content/themes/wp-starter/src/images/accordion-icon.svg rename to wp-content/themes/wp-starter/src/images/icons/accordion-icon.svg diff --git a/wp-content/themes/wp-starter/src/images/logo-grid-icon.svg b/wp-content/themes/wp-starter/src/images/icons/logo-grid-icon.svg similarity index 100% rename from wp-content/themes/wp-starter/src/images/logo-grid-icon.svg rename to wp-content/themes/wp-starter/src/images/icons/logo-grid-icon.svg diff --git a/wp-content/themes/wp-starter/src/images/text-cards-icon.svg b/wp-content/themes/wp-starter/src/images/icons/text-cards-icon.svg similarity index 100% rename from wp-content/themes/wp-starter/src/images/text-cards-icon.svg rename to wp-content/themes/wp-starter/src/images/icons/text-cards-icon.svg diff --git a/wp-content/themes/wp-starter/src/images/text-icon-card-icon.svg b/wp-content/themes/wp-starter/src/images/icons/text-icon-card-icon.svg similarity index 100% rename from wp-content/themes/wp-starter/src/images/text-icon-card-icon.svg rename to wp-content/themes/wp-starter/src/images/icons/text-icon-card-icon.svg diff --git a/wp-content/themes/wp-starter/src/images/text-icon-placeholder.svg b/wp-content/themes/wp-starter/src/images/icons/text-icon-placeholder.svg similarity index 100% rename from wp-content/themes/wp-starter/src/images/text-icon-placeholder.svg rename to wp-content/themes/wp-starter/src/images/icons/text-icon-placeholder.svg