• 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:
    Code

    The 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.

Viewing 4 replies - 1 through 4 (of 4 total)
  • I haven’t been able to get this to work…

    Thread Starter ssmathias

    (@ssmathias)

    Ghost, did you add the code as linked, as well as a line defining the shortcode (included as the first piece of code in my post)? The modifications I’ve written are not, to my knowledge, included in the plugin’s codebase, and must be added manually.

    I did, after editing the file it simply displayed the shortcode.

    Thread Starter ssmathias

    (@ssmathias)

    Interesting. It sounds like the shortcode handler is not being executed. You could try putting some print statements in that function to see if the code is being executed. If all else fails, you are welcome to send me a copy of your code as modified to steve at crowdfavorite dot com and I could take a look at it after I finish with work for the day.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Modification for valid shortcode syntax’ is closed to new replies.