Skip to content

Instantly share code, notes, and snippets.

@rinatkhaziev
Created June 22, 2012 22:08
Show Gist options
  • Save rinatkhaziev/2975478 to your computer and use it in GitHub Desktop.
Save rinatkhaziev/2975478 to your computer and use it in GitHub Desktop.
Ad Code Manager DFP Iframes example
<?php
add_filter( 'acm_output_html', 'my_acm_output_html', 10, 2 );
function my_acm_output_html( $output_html, $tag_id ) {
switch ( $tag_id ) {
case 'my_leaderboard':
$output_html = '<a href="%url%"><img src="%image_url%" /></a>';
break;
case 'rich_media_leaderboard':
$output_html = '<script> // omitted </script>';
break;
default:
$outpit_html = '<iframe src="%url%" height="%height%" width="%width%></iframe>';
break;
}
return $output_html;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment