Problem
Feedzy hooks into several global WordPress filters (post_thumbnail_html, has_post_thumbnail, wp_get_attachment_image_src, admin_footer, wp_targeted_link_rel) without scoping them to Feedzy post types. This causes interference with other plugins — e.g., Slider Hero's images get hijacked when wp_get_attachment_image_src fires on posts with $attachment_id === 0, and modals/JS intended for Feedzy admin pages load on every admin screen.
Root Cause
Functions in feedzy-rss-feeds-feed-tweaks.php and feedzy-rss-feeds-admin.php fire on ALL posts/pages, not just Feedzy-imported ones. The wp_targeted_link_rel filter in feedzy-rss-feeds-actions.php uses an anonymous closure that leaks after import jobs complete.
Solution
feed-tweaks.php — Add get_post_meta($post_id, 'feedzy', true) guard to:
feedzy_display_external_post_image() — early return if not Feedzy post
feedzy_enable_external_url_support() — early return if not Feedzy post
feedzy_get_attachment_image_src() — nest external URL logic inside Feedzy meta check
admin.php — Add get_current_screen() check to add_modals(), only fire on feedzy_categories and feedzy_imports post types.
actions.php — Capture wp_targeted_link_rel callback reference, apply filter, save HTML result, remove_filter() immediately after, then return.
Files Affected
includes/feedzy-rss-feeds-feed-tweaks.php
includes/admin/feedzy-rss-feeds-admin.php
includes/admin/feedzy-rss-feeds-actions.php
Acceptance Criteria
Priority: High — compatibility fix, prevents cross-plugin interference
Regression risk: Isolated (guards are early-return only)
Problem
Feedzy hooks into several global WordPress filters (
post_thumbnail_html,has_post_thumbnail,wp_get_attachment_image_src,admin_footer,wp_targeted_link_rel) without scoping them to Feedzy post types. This causes interference with other plugins — e.g., Slider Hero's images get hijacked whenwp_get_attachment_image_srcfires on posts with$attachment_id === 0, and modals/JS intended for Feedzy admin pages load on every admin screen.Root Cause
Functions in
feedzy-rss-feeds-feed-tweaks.phpandfeedzy-rss-feeds-admin.phpfire on ALL posts/pages, not just Feedzy-imported ones. Thewp_targeted_link_relfilter infeedzy-rss-feeds-actions.phpuses an anonymous closure that leaks after import jobs complete.Solution
feed-tweaks.php — Add
get_post_meta($post_id, 'feedzy', true)guard to:feedzy_display_external_post_image()— early return if not Feedzy postfeedzy_enable_external_url_support()— early return if not Feedzy postfeedzy_get_attachment_image_src()— nest external URL logic inside Feedzy meta checkadmin.php — Add
get_current_screen()check toadd_modals(), only fire onfeedzy_categoriesandfeedzy_importspost types.actions.php — Capture
wp_targeted_link_relcallback reference, apply filter, save HTML result,remove_filter()immediately after, then return.Files Affected
includes/feedzy-rss-feeds-feed-tweaks.phpincludes/admin/feedzy-rss-feeds-admin.phpincludes/admin/feedzy-rss-feeds-actions.phpAcceptance Criteria
$attachment_id === 0are not affected byfeedzy_get_attachment_image_srchas_post_thumbnailreturns unchanged value for non-Feedzy postswp_targeted_link_relfilter is removed after each import job HTML savePriority: High — compatibility fix, prevents cross-plugin interference
Regression risk: Isolated (guards are early-return only)