Skip to:
Content
Pages
Categories
Search
Top
Bottom

Can We Alter or Create Custom BuddyPress Tokens?


  • kairei
    Participant

    @kairei

    I have a Japanese site that uses an IDN (International Domain Name) with Unicode characters. BuddyPress works fine, except when emails go out that contain links back to the site, such as {{{activate.url}}} the URL that shows up in the email is the Punycode version of the domain, not the Unicode characters (all Unicode IDNs have an ASCII encoding called “Punycode”). This isn’t recognizable to the end user and even worse, some email clients (Outlook in my case) display a security warning about the IDN link suggesting it might be a suspicious link – not exactly the experience I want for people just signing up for my site.

    I want to try making activate.url use the Unicode characters to see if that makes the warning go away. If that doesn’t work I’d like to replace the Punycode url with an ascii domain that redirects to the Unicode one so at least the warning goes away. Is there any way to (1) modify how activate.url behaves, (2) create custom tokens, or (3) post process the whole email text after it is built so I can just find/replace the Punycode domain text?

    In my research I don’t see any way to do any of the above. I saw there are some hooks before/after the header and footer are created but not sure if I have access to the HTML or text email content. I’d think 3 should be possible but I don’t know that much about WordPress/BuddyPress or PHP to even know where to start.

  • You must be logged in to reply to this topic.
Skip to toolbar