Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    Hi Sebastian!

    I’m sorry, I’m unable to reproduce that. For me, the plugin is stripping out shortcodes just fine (see screenshot).

    Could you please provide more details? Screenshots and your site’s URL would help.

    Thread Starter Lord_Mord

    (@lord_mord)

    I will send you an email with the link.

    Plugin Author Hector Cabrera

    (@hcabrera)

    Got your e-mail, thanks!

    The problem is that the plugin HTML 5 and Flash Video Player is implementing their own version of shortcodes instead of using WordPress’ Shortcode API, which is a bad practice as it leads to “problems” such as this one.

    Normally I’d ask you to tell the developer to update their code to use WordPress APIs instead of rolling their own to increase compatibility with other plugins and themes, but it seems that this plugin has been abandoned for a long time. So, here’s a workaround:

    1. Go to Plugins > Editor and select WordPress Popular Posts from the drowndown.
    2. Find:
      // remove WP shortcodes
      $excerpt = strip_shortcodes( $excerpt );

      … and change it to:

      // Remove HTML5 and Flash Video Player's shortcodes
      $excerpt = preg_replace("/\[flashvideo ([^]]*)\/\]/i", "", $excerpt);
      $excerpt = preg_replace("/\[videoplayer ([^]]*)\/\]/i", "", $excerpt);
      
      // remove WP shortcodes
      $excerpt = strip_shortcodes( $excerpt );

    3. Hit the Update file button to save changes.

    Note that making modifications to plugins code isn’t recommended because the next time you upgrade it all changes will be lost, so make sure to bookmark or save this mod somewhere for future reference.

    Out of curiosity, why use a video plugin when WordPress already supports video embedding since version 2.9?

    Thread Starter Lord_Mord

    (@lord_mord)

    Thank you very much. That did the job.

    We had (and still have) performance problems with the videos. The client says, the videos work better with that player. I say that’s coincidence, but what do I know? At least he stopped telling me to “make it work”.

    Plugin Author Hector Cabrera

    (@hcabrera)

    Hahah been there, done that. I had the feeling that it was something like that.

    Anyways, have a nice day! Enjoy the plugin!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Shortcodes in Excerpts’ is closed to new replies.