Modification for valid shortcode syntax
-
I’ve locally revised the audio-player.php file to allow for valid shortcode syntax, as the current form ([audio:*]) is not recognized as a registered shortcode.
At this time I do not believe that I have authority to revise this plugin officially, so I am including the added code below. Please note that this is backward compatible, so use of the old form does not break. The syntax, however, is slightly different.
First, the code. The next line should be added to the constructor:
add_shortcode('audio', array(&$this, "shortcodeHandler"));
Following that, this function should be added to the class:
CodeThe use for this shortcode is slightly different as well. An example is included below:
[audio href="/my_sound.mp3,/my_other_sound.mp3" titles="My Sound 1, My Sound 2" authors="Me, Me" loop="yes"]
I’d like this code to formally be added in an update, but in the mean time it should work for anyone having issues with compatibility with a CMS.
- The topic ‘Modification for valid shortcode syntax’ is closed to new replies.