Support » Plugin: Self Hosted Plugins » [Plugin: Self Hosted Plugins] What to do if your README has shortcodes.

  • ResolvedPlugin Author topquarky


    I came across this one on my own site and thought I’d share the fix.

    I’m hosting plugins on my site using Self Hosted Plugins. That same site has a couple of those plugins activated (for demos etc.). When Self Hosted Plugins rendered the plugin description page, it filtered the content through do_shortcode. It tried to expand all of my example shortcodes.

    To fix this, I added the following to my theme’s functions.php file. The code simply removes the do_shortcode filter on the_content:

    add_action( 'pre_get_posts', 'topquark_massage_spoof',99 );
    function topquark_massage_spoof(){
    	// I don't want shortcodes to get expanded on this page (so I can put shortcodes in the readme on a site)
    	// that has the plugins activated
    	if (defined('SHP_SPOOFED_PLUGIN_PAGE')){

    [sig moderated as per the Forum Rules]

  • The topic ‘[Plugin: Self Hosted Plugins] What to do if your README has shortcodes.’ is closed to new replies.