| 开发者 | husainahmedqureshi |
|---|---|
| 更新时间 | 2026年11月10日 13:30 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
<p> / <br> tags that create awkward spacing.
The problem
Empty paragraphs and stray breaks often appear after pasting content, mixing classic and block markup, or using WYSIWYG fields. They push layouts apart and are hard to spot in the visual editor.
What it does
paragraphs)wpautop on content, excerpts, and text widgetswpautop off in some places, but normal paragraphs elsewherethe_content. Empty P Tag cleans WordPress content filters (posts, excerpts, widgets, comments, terms, ACF). It does not rewrite every builder canvas.
Privacy
This plugin does not collect, store, or send personal data. There is no telemetry.
Developers
Filters include:
haq_empty_p_tag_settingshaq_empty_p_tag_should_cleanhaq_empty_p_tag_before_cleanhaq_empty_p_tag_clean_patternhaq_empty_p_tag_cleaned_contentwpautop left aloneempty-p-tag folder to /wp-content/plugins/.No by default. Front-end filters clean rendered HTML only. Permanent changes happen only if you enable clean-on-save and check that option on a specific post.
Only if those options stay enabled. Use the Recommended (safe) preset to keep wpautop on and still strip empty tags.
Yes. Cleanup runs on rendered content. Per-post skip / clean-on-save controls appear in the document sidebar when enabled.
Yes. Enable the ACF WYSIWYG (and optionally textarea) toggles under Integrations.
Not fully. Those builders often bypass the_content. Use Empty P Tag for WordPress content areas; for builder canvases, prefer the builder’s own spacing controls or CSS.
Open Settings → Empty P Tag and apply Classic Empty P Tag, or turn off only the option that conflicts with your theme. Existing installs keep previous defaults for missing keys.
Yes. See the developer filters listed in the Description.
force_balance_tags (off for new installs; existing classic behavior preserved)languages/empty-p-tag.pot) , zero-width spaces, attribute-bearing empty paragraphs)<br> tagspreg_replace cleanup for empty tags