Skip to content

Commit

Permalink
WordAds: prioritize header ad display when hitting 6-ad limit (Automa…
Browse files Browse the repository at this point in the history
  • Loading branch information
rclations authored and dereksmart committed Apr 30, 2018
1 parent eeb7243 commit b545424
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/wordads/wordads.php
Original file line number Diff line number Diff line change
Expand Up @@ -426,11 +426,11 @@ function get_ad_snippet( $height, $width, $location = '', $css = '' ) {
$this->ads[] = array( 'location' => $location, 'width' => $width, 'height' => $height );
$ad_number = count( $this->ads );
// Max 6 ads per page.
if ( $ad_number > 6 ) {
if ( $ad_number > 5 && 'top' !== $location ) {
return;
}
$data_tags = $this->params->cloudflare ? ' data-cfasync="false"' : '';

return <<<HTML
<div style="padding-bottom:15px;width:{$width}px;height:{$height}px;$css">
<div id="atatags-{$ad_number}">
Expand Down

0 comments on commit b545424

Please sign in to comment.