dashed-slug.net › Forums › Fiat Coin Adapter extension support › icons
Tagged: filter, frontend, icons, logos, wallets_coin_icon_url_XYZ
- This topic has 4 replies, 2 voices, and was last updated 4 years, 4 months ago by
alexg.
-
AuthorPosts
-
April 17, 2019 at 8:03 pm #6204
Anonymous
InactiveAlex,
For different points-coyns, how can I setup custom icons for each one?
April 18, 2019 at 11:24 am #6222alexg
KeymasterHello,
You can always override the icon for any coin, using a filter.
To specify the URL to an icon, please see the code in the documentation under Frontend -> UIs -> Coin Icon for an example of how to use the
wallets_coin_icon_url_XYZ
filter.with regards
November 22, 2019 at 11:42 am #7334Anonymous
InactiveAlex,
Geting back to this topic, I did not ued the public function described in the documentation. But, checking a bit the images inside the files, the corresponding to custom ones is named “Custom”.
Let’s suppose I want to implement different custom ones, there would be a conflict if using the filter targetting the same overrided icon, dont you think?
It would be possible, when adding a custom from backnd, to add a feature to allow chosing an icon from the media library?
Thanks Alex
April 21, 2020 at 3:31 pm #8185Anonymous
InactiveAlex,
I do not know if it is related or not. You mention that now it is possible to add bankinfo for custom coinss, but what kind of use for it? for non supported currencies in the fixer API?
I suppose you did not had the time to check about setting different icons for the customcoins. I am not sure if the mentionned filter can be used for a custom one, because as I could test, it relyes to the icon named “Custom”. I does not know how to make it different for different custom created ones.
Thanks as usual
Regards
April 22, 2020 at 7:30 am #8189alexg
KeymasterHello,
To be perfectly honest I am not sure what use it is to have bank details associated with custom coins, but it was a user request. Some people like the flexibility, and they hack the forms to look very different, so it might not even be bank details but something else entirely.
You can always provide a custom icon for any coin, thanks to the
wallets_icon_url_XYZ
filter: https://github.com/dashed-slug/wallets/blob/5.0.1/includes/json-api.php#L446From the manual:
To override the URI for the Bitcoin icon:
`public function filter_wallets_coin_icon_url_BTC( $pattern ) {
return ‘https://upload.wikimedia.org/wikipedia/commons/thumb/4/46/Bitcoin.svg/2000px-Bitcoin.svg.png’;
}add_filter( ‘wallets_coin_icon_url_BTC’, ‘filter_wallets_coin_icon_url_BTC’ );`
with regards
-
AuthorPosts
- You must be logged in to reply to this topic.