[wp-trac] [WordPress Trac] #26335: Twenty Fourteen: Ephemera Widget caches plugin filtering (and lack of plugin filtering) of the_content
WordPress Trac
noreply at wordpress.org
Wed Jan 3 15:31:26 UTC 2024
#26335: Twenty Fourteen: Ephemera Widget caches plugin filtering (and lack of
plugin filtering) of the_content
------------------------------+---------------------------
Reporter: celloexpressions | Owner: lancewillett
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 3.8
Component: Bundled Theme | Version: 3.8
Severity: normal | Resolution: fixed
Keywords: | Focuses:
------------------------------+---------------------------
Comment (by eedithotter):
The issue you're describing relates to WordPress development, particularly
with the Twenty Fourteen theme and its Ephemera Widget. The core problem
is that the Ephemera Widget doesn't account for the potential changes that
plugins can make to the content through the the_content() filter,
especially in terms of adding or modifying HTML, CSS, and JavaScript.
When plugins like QuickShare are used, they often filter the_content() to
add elements like social sharing buttons. The Ephemera Widget, however,
doesn't recognize these changes. This oversight becomes apparent when the
plugin is uninstalled. While the associated CSS/JS files are removed, the
HTML markup added by the plugin remains. This results in a poor user
experience as the remnants of the plugin are still visible even after its
files are deleted.
To replicate this issue:
Install and activate a plugin (e.g., QuickShare).
Add the Twenty Fourteen Ephemera Widget to a sidebar.
Uninstall the QuickShare plugin.
Observe that the HTML necessary for QuickShare's functionality still
persists in the widget. Removing and re-adding the widget can temporarily
fix this issue.
One potential solution is to prevent plugins' filters from applying to the
widget's the_content(). This approach would ensure that the widget's
content remains unaffected by plugins, which is generally preferable for
widget display. Another workaround, as you mentioned, is using CSS to hide
specific elements from the widget.
To address this issue more effectively, it might be necessary to modify
the Ephemera Widget's code to either exclude certain filters or to refresh
its content upon plugin deactivation. This could involve adding WordPress
hooks or filters specific to the widget's behavior. Additionally,
collaborating with plugin developers to ensure better compatibility and
cleaner deactivation processes could also be beneficial.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/26335#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list