public function enable() { global $shortcode_tags; if (isset($shortcode_tags['gallery'])) { $this->original_shortcode = $shortcode_tags['gallery']; } add_shortcode('gallery', array($this, 'gallery_shortcode')); }