OS : Linux
PHP Version : __( 'Insert an ad unit wherever you can place a widget.', 'jetpack' ),
'customize_selective_refresh' => true,
)
);
}
public function widget( $args, $instance ) {
global $wordads;
if ( $wordads->should_bail() ) {
return false;
}
if ( ! isset( $instance['unit'] ) ) {
$instance['unit'] = 'mrec';
}
self::$num_widgets++;
$about = __( 'Advertisements', 'jetpack' );
$width = WordAds::$ad_tag_ids[ $instance['unit'] ]['width'];
$height = WordAds::$ad_tag_ids[ $instance['unit'] ]['height'];
$unit_id = 1 == self::$num_widgets ? 3 : self::$num_widgets + 3; // 2nd belowpost is '4'
$section_id = 0 === $wordads->params->blog_id ?
WORDADS_API_TEST_ID :
$wordads->params->blog_id . $unit_id;
$snippet = '';
if ( $wordads->option( 'wordads_house', true ) ) {
$unit = 'mrec';
if ( 'leaderboard' == $instance['unit'] && ! $this->params->mobile_device ) {
$unit = 'leaderboard';
} elseif ( 'wideskyscraper' == $instance['unit'] ) {
$unit = 'widesky';
}
$snippet = $wordads->get_house_ad( $unit );
} else {
$snippet = $wordads->get_ad_snippet( $section_id, $height, $width, 'widget' );
}
echo <<< HTML