Open extra topbar

icons

If you are new here, please see some information on how to ask for support. Thank you!

icons

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #6204
    bigblue
    Participant

    Alex,

    For different points-coyns, how can I setup custom icons for each one?

    #6222
    alexg
    Keymaster

    Hello,

    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

    #7334
    bigblue
    Participant

    Alex,

    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

    #8185
    bigblue
    Participant

    Alex,

    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

    #8189
    alexg
    Keymaster

    Hello,

    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#L446

    From 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

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.