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

2 issues when #6

Open
cdvatx opened this issue Dec 19, 2023 · 2 comments
Open

2 issues when #6

cdvatx opened this issue Dec 19, 2023 · 2 comments

Comments

@cdvatx
Copy link

cdvatx commented Dec 19, 2023

I encountered two problems.

I am running code that replaces the "Private: " in titles that are not public.

  1. When I replace it with other text such as "Secret :" all is ok.
    When I replace it with an emoji then it shows well in the code there as well as the output page, but as soon as I reload the form to enter the snippet, the emoji disappears (presumably filtered out).
  2. I tried to only run this conditionally on the shop page, and on the product page of that item, but somehow it was not replaced. It was replaced when I ran it sitewide.

Site and server are using UTF-8.
For reference, here's the code I've been using.

function change_private_title_prefix() {
    return "EMOJI %s";
}
add_filter('private_title_format', 'change_private_title_prefix');

Apart from that it looks great and I look forward to putting it to good use.
Thanks!

@techjewel
Copy link
Contributor

Tried this snippet and it's working. Would you please paste the imoji you used that is not working so I can run a test

image

@cdvatx
Copy link
Author

cdvatx commented Dec 19, 2023 via email

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

2 participants