2
Good morning! I’m using a code in WP to display musical notes. It basically takes the text from a "Chord" shortcode and displays in the line above. It also converts b (lowercase) to . Example:
The problem is that it converts everything that is in the shortcode to uppercase, and I don’t want that. I just want it to display what is typed. In his code I found the following line:
$chordPretty = (strlen($chord)>1&&substr($chord, 1,1)==='b')? strtoupper(substr($chord, 0,1)).'♭' : strtoupper($chord);
I replaced strtoupper for strtolower to see if this is really the part that made the conversion and it is. How do I call the string $Chord by substituting b for but without changing the letter box?
Thank you!
remove the 2 conditions function $chordPretty = (strlen($Chord)>1&&substr($Chord, 1,1)==='b')? substr($Chord, 0,1). ' : $Chord;
– Felipe Duarte