Skip to content

Commit

Permalink
Hide non-active ad spots from users
Browse files Browse the repository at this point in the history
  • Loading branch information
francois committed Jul 6, 2010
1 parent 067bf8d commit 2cc230d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions adgear-ad-manager/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,10 @@ function adgear_update_site_embed_code($old_value, $new_value) {
$rows = array();

foreach($ad_spots["ad_spots"] as $ad_spot) {
$rows[] = implode( ",", array( $ad_spot['name'], $ad_spot['id'], $ad_spot['format_id'] ) );
update_option( 'adgear_adspot_embed_code_'.$ad_spot['id'], $ad_spot['embed_code'] );
if ( $ad_spot["state"] == "active" ) {
$rows[] = implode( ",", array( $ad_spot['name'], $ad_spot['id'], $ad_spot['format_id'] ) );
update_option( 'adgear_adspot_embed_code_'.$ad_spot['id'], $ad_spot['embed_code'] );
}
}

natcasesort( $rows );
Expand Down

0 comments on commit 2cc230d

Please sign in to comment.