Remove Empty Shortcodes

תיאור

Remove Empty Shortcodes helps maintain clean content by removing shortcodes that no longer work or generate output. This commonly happens when:

  • You've deactivated a plugin that provided shortcodes
  • You're trying different plugins and some left behind inactive shortcodes
  • You have shortcodes from plugins that weren't properly uninstalled

Key Features

  • Automatically removes inactive shortcodes from displayed content
  • Preserves your original content in the database
  • Works with both posts and pages
  • Handles both self-closing and wrapped shortcodes
  • Zero configuration required

How It Works

The plugin checks your content for shortcodes when pages are displayed. If it finds shortcodes that:
* Don't produce any output
* Aren't registered with WordPress
* Are empty or inactive

It removes them from the displayed content while keeping your original content intact in the database.

Use Cases

  • Clean up content after removing plugins that used shortcodes
  • Remove inactive shortcodes without editing posts manually
  • Maintain clean content for readers and search engines
  • Preserve original content in case you reinstall removed plugins

התקנה

  1. Upload remove-empty-shortcodes to your /wp-content/plugins/ directory
  2. Activate the plugin through the 'Plugins' menu in WordPress
  3. That's it! No configuration needed

שאלות נפוצות

No. The plugin only filters content when it's displayed. Your original content remains unchanged in the database.

Since your original content is preserved, the shortcodes will start working again automatically when you reinstall the plugin that handles them.

Yes, the plugin works with any WordPress shortcode, whether from themes or plugins.

No. The plugin only removes shortcodes that are either unregistered or produce no output.

No. The plugin works automatically once activated.

סקירות

27 במרץ 2025 1 reply
Would be great to have an option to delete them from the database , too Of course with a backup before. This will make an export to Markdownblog much easier
קראו את כל הסקירות

מפתחים

"Remove Empty Shortcodes" הוא תוסף קוד פתוח. האנשים הבאים תרמו ליצירת התוסף הזה.

תורמים

ניתן לתרגם את "Remove Empty Shortcodes" לשפה שלך.

מעוניינים בפיתוח?

עיינו בקוד, ראו את הקוד ב-SVN repository, או הירשמו ללוג פיתוח באמצעות RSS.

שינויים

0.6.0

  • Added support for multi-line shortcode detection
  • Added a banner and icon for the WP plugin repository
  • Improved handling of unregistered shortcodes
  • Updated shortcode pattern matching
  • Removed Composer dependencies
  • Enhanced performance and reliability

0.5.0

  • Added latest version of PHPStan
  • Fixed page content processing
  • Updated namespace structure

0.4.0

  • Added page post type support
  • Fixed subscriber content handling

0.3.0

  • Initial public release
  • Added standard post type support
  • Improved shortcode detection