Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding options for custom btn icons #124

Open
nathan-schmidt-viget opened this issue Jul 18, 2024 · 0 comments
Open

Adding options for custom btn icons #124

nathan-schmidt-viget opened this issue Jul 18, 2024 · 0 comments
Assignees

Comments

@nathan-schmidt-viget
Copy link
Contributor

Add a demo file to easily add in custom icons for the button. Copy what we have in IAFFF 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;
	}
);
@nathan-schmidt-viget nathan-schmidt-viget self-assigned this Jul 18, 2024
bd-viget added a commit that referenced this issue Oct 7, 2024
* [N/A] Added a few notes, typo fixes

* [N/A] Editor Style Updates

* [N/A] Add Post Excerpt Block Support

* [N/A] Fix duplicate admin notice, formatted theme.json

* [N/A] Automated color.js

* [#147] WP Cols & Mobile Menu Breakpoints

* [N/A] Move plop templates

* [#124] Demo Icon + Insert before other icons

* [N/A] ACF BT Package updates

* [N/A] Latest version of ACF Pro

* [N/A] Package updates

* [N/A] Restore CTA & Image/Text Patterns

* [N/A] Default Post Archive Template

* [N/A] Singular Post Template

* [N/A] Move Tailwind plugins folder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant