Automattic / super-cool-ad-inserter-plugin

Insert ads, newsletter signup widgets, and calls to action in the middle of your posts!
https://wordpress.org/plugins/super-cool-ad-inserter/#description
32 stars 4 forks source link

fix: execute filter before block rendering #70

Closed miguelpeixe closed 2 years ago

miguelpeixe commented 2 years ago

65 introduced a new method for parsing blocks for ad insertion. The current content filter is applied with priority 10, which is executed after block rendering. This results in the parse_block() usage to always interpret the blocks as freeform HTML and fail to render blocks like YouTube embeds.

This PR changes priority to 5, which is prior to block rendering and allows the filter to properly read block attributes on parse_block().

matticbot commented 2 years ago

:tada: This PR is included in version 0.4.1-alpha.1 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

matticbot commented 2 years ago

:tada: This PR is included in version 0.4.1 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: