:diamond: –> ♦? possible solutions not working
-
hi,
I am trying to parse pasted text into something else, where the simplest thing is to change :spade: :club: :diamond: and :heart: to be visualized as ♠♣♦ and ♥ but my solution is not working.In the Theme files I edited functions.php by adding the following code (in the staging environment)
// Function to replace suit representations with symbols function replace_suit_symbols($hand_history) { // Replace suit representations with symbols $hand_history = str_replace(':spade:', '♠', $hand_history); $hand_history = str_replace(':heart:', '♥', $hand_history); $hand_history = str_replace(':diamond:', '♦', $hand_history); $hand_history = str_replace(':club:', '♣', $hand_history); // Return the modified hand history return $hand_history; }
But when I write “:spade”, for instance, nothing changes. What am I missing?
Hello Theme, WP 6.4.3, bbPress 2.6.9.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- You must be logged in to reply to this topic.