WordPress.org

Support

Support » Plugins and Hacks » Slideshow » [Resolved] [Plugin: Slideshow] Shortcode conflicts with Jetpack

[Resolved] [Plugin: Slideshow] Shortcode conflicts with Jetpack

  • Moderator cubecolour

    @numeeja

    ɹoʇɐɹǝpoɯ

    Slideshow doesn’t work at all if Jetpack is installed with the Shortcode Embeds component active. Maybe more unique variable/shortcode names should be used?

    Fatal error: Cannot redeclare slideshow_shortcode() (previously declared in /home/sites/mysite/public_html/wp-content/plugins/jetpack/modules/shortcodes/slide.php:61) in /home/sites/mysite/public_html/wp-content/plugins/slideshow/slideshow.php on line 173

    http://wordpress.org/extend/plugins/slideshow/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Justin Tadlock

    @greenshady

    WordPress God

    This is because the Jetpack plugin is not using a unique prefix for its function names.

    Please point the Jetpack plugin developer to this blog post, which explains how to properly prefix functions:
    http://andrewnacin.com/2010/05/11/in-wordpress-prefix-everything/

    The Jetpack plugin function slideshow_shortcode() should be renamed to jetpack_slideshow_shortcode().

    Moderator cubecolour

    @numeeja

    ɹoʇɐɹǝpoɯ

    Thanks Justin that’s a good post by Andrew Nacin.

    As the slideshow plugin also has a generic sounding slideshow_shortcode() function, even though the prefix is the plugin name, is there not a case for that to be named with a more unique prefix as well?

    Plugin Author Justin Tadlock

    @greenshady

    WordPress God

    I believe the slideshow_ prefix is perfectly used with the Slideshow plugin. It always makes sense to prefix function names with the name of the plugin itself. This makes it easy to avoid conflicts, assuming other plugin authors do the same.

    This is probably a case for a different function name but not a different prefix.

    Nevertheless, even with a change in function name, the function itself would be deprecated and still be lingering around for several more versions for backwards compatibility. Therefore, the fatal error would still occur.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] [Plugin: Slideshow] Shortcode conflicts with Jetpack’ is closed to new replies.
Skip to toolbar