Quantcast
Channel: Function Inside Conditional Tag - Stack Overflow
Browsing index pages (3 articles)

Function Inside Conditional Tag

Say I have a function like this:add_filter("post_gallery", "fix_my_gallery_wpse43558",10,2);function fix_my_gallery_wpse43558($output, $attr) { // blah, blah, blah}Basically, the function above allows...

View Article


Answer by feeela for Function Inside Conditional Tag

I would go with your first solution, as the filter-function only needs to get executed when you are inside your feed.But there is no "right way" as both solutions should work…

View Article


Answer by Mark for Function Inside Conditional Tag

I would use the first one. It'll be faster as the filter will be ignored when not required.Also, in the second example, you would also need to throw back out the $output, which again, is a bit wasteful...

View Article
Browsing index pages (3 articles)


Latest Images