function dfp_context_reaction_tags::execute in Doubleclick for Publishers (DFP) 7.2
Same name and namespace in other branches
- 7 plugins/contexts/dfp_context_reaction_tags.inc \dfp_context_reaction_tags::execute()
Disable any tags that should be disabled based on context.
File
- plugins/
contexts/ dfp_context_reaction_tags.inc, line 40 - Context reaction plugin for DFP ads.
Class
- dfp_context_reaction_tags
- Expose DFP tags as context reactions.
Code
function execute(&$tag) {
// Check each currently set context to see if the DART tag specified by
// machinename should be displayed or not.
foreach ($this
->get_contexts() as $context_name => $context) {
if (isset($context->reactions['dfp_tags']) && in_array($tag->machinename, $context->reactions['dfp_tags'], TRUE)) {
$tag->disabled = TRUE;
break;
}
}
}