EyeReturn (/eyereturn/eyereturn.html) * > Unicast (/unicast/unicastIFD.html) * > Yahoo - AdInterax (/adinterax/adx-iframe-v2.html) * * @since Adbusters (1.0) */ function wpcom_vip_maybe_load_ad_busters() { $ad_busters = array( '/atlas/atlas_rm.htm', // Atlas '/doubleclick/DARTIframe.html', // Google - DoubleClick '/eyeblaster/addineyeV2.html', // MediaMind - EyeBlaster '/pointroll/PointRollAds.htm', // PointRoll ); // To ignore an ad network, use this filter and return an array containing the values of $ad_busters to not load $block_ads = apply_filters( 'wpcom_vip_maybe_load_ad_busters', array() ); $ad_busters = array_diff( $ad_busters, $block_ads ); // Do we have a request for a supported network? $request = parse_url( $_SERVER['REQUEST_URI'], PHP_URL_PATH ); $index = array_search( $request, $ad_busters ); if ( false === $index ) return; $file = plugin_dir_path( __FILE__ ) . 'templates/' . $ad_busters[$index]; // Spit out the template header( 'Content-type: text/html' ); readfile( $file ); exit; } add_action( 'init', 'wpcom_vip_maybe_load_ad_busters', -1 );