Skip to content

Commit

Permalink
[#124] Adding btn icon function (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan-schmidt-viget authored Jul 26, 2024
1 parent 2b020e6 commit acc3639
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 0 deletions.
3 changes: 3 additions & 0 deletions wp-content/themes/wp-starter/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@

// Block Functions.
require_once get_stylesheet_directory() . '/inc/blocks.php';

// Custom Icons.
require_once get_stylesheet_directory() . '/inc/icons.php';
27 changes: 27 additions & 0 deletions wp-content/themes/wp-starter/inc/icons.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php
/**
* Custom Button Icons.
*
* @package WPStarter
*/

/**
* Add custom icons to the button icons array.
* */

add_filter(
'acfbt_button_icons',
function ( array $icons ): array {
$icon_path = get_stylesheet_directory() . '/src/images/icons/';

/* Custom Icons */
/*
$icons['short-arrow-right'] = [
'label' => __( 'YOUR LABEL', 'wp-starter' ),
'icon' => file_get_contents( $icon_path . 'file-name.svg' ),
'defaultLeft' => false,
];*/

return $icons;
}
);

0 comments on commit acc3639

Please sign in to comment.