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

Should the shortcode inserter function's decision to filter be affected by an action or filter? #25

Closed benlk closed 5 years ago

benlk commented 8 years ago

Or should it always and only be controlled by the theme-wide options and by the per-post override in the post meta?

The affected function: https://github.com/INN/super-cool-ad-inserter-plugin/blob/master/inc/scaip-shortcode-inserter.php#L12

aschweigert commented 7 years ago

should probably be filterable

aschweigert commented 7 years ago

a couple example use-cases:

1) A site has a meta field for excluding all ads on a given post. This applies to both ads added in widgets or directly in templates as well as inline ad units that would be added by this plugin. 2) A site wants to use a different html tag (or set of tags) for counting the number of elements between ads, so maybe a site wants to insert an ad before/after every <h3> in a post, for example.