WP Manifestindependent plugin directory
manifest / media / kntnt-ggpkg-shortcode-fix

Kntnt Fix for Garden Gnome Package

WordPress mu-plugin that removes empty lines from the JavaScript outputted by the shortcode of Garden Gnome Package viewer to prevent wpautop to mess with it.

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/kntnt/kntnt-ggpkg-shortcode-fix/archive/refs/heads/master.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

WordPress mu-plugin that removes empty lines from the JavaScript outputted by the shortcode of Garden Gnome Package viewer to prevent wpautop to mess with it.

Background

The WordPress plugin for publishing Garden Gnome Packages provides the shortcode ggpkg to present Pano2VR and Object2VR packages on pages and posts.

The plugin's shortcode outputs JavaScript code which might contain empty lines. These lines will be converted into <p></p> by WordPress' infamous wpautop() function. That results in a syntax error in the JavaScript.

Awaiting a bug fix from Garden Gnome Software, you can use this plugin as a fix. It merely removes the empty lines before outputting te JavaScript.

How to install

I suggest you install this plugin as a "must use plugin":

  1. In your wp-content directory, create a mu-plugins directory (if it not already exists).
  2. Download kntnt-ggpkg-shortcode-fix.php and save it within the mu-plugins directory.

That's it!