Open nathan-schmidt-viget opened 4 months ago
Add a demo file to easily add in custom icons for the button. Copy what we have in IAFFF inc/icons.php
inc/icons.php
<?php /** * Custom Button Icons. * * @package IAFFFoundation */ /** * 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/'; /* Short Arrows */ $icons['short-arrow-right'] = [ 'label' => __( 'Short Arrow Right', 'iafffoundation' ), 'icon' => file_get_contents( $icon_path . 'short-arrow-right.svg' ), 'defaultLeft' => false, ]; $icons['short-arrow-left'] = [ 'label' => __( 'Short Arrow Left', 'iafffoundation' ), 'icon' => file_get_contents( $icon_path . 'short-arrow-left.svg' ), 'defaultLeft' => true, ]; /* Box Arrows */ $icons['box-arrow-right'] = [ 'label' => __( 'Box Arrow Right', 'iafffoundation' ), 'icon' => file_get_contents( $icon_path . 'box-arrow-right.svg' ), 'defaultLeft' => false, ]; $icons['box-arrow-left'] = [ 'label' => __( 'Box Arrow Left', 'iafffoundation' ), 'icon' => file_get_contents( $icon_path . 'box-arrow-left.svg' ), 'defaultLeft' => true, ]; return $icons; } );
Add a demo file to easily add in custom icons for the button. Copy what we have in IAFFF
inc/icons.php