예제 #1
0
function adgear_cleanup_obsolete_ad_spot_data()
{
    $adspots = adgear_ad_spots();
    foreach ($adspots as $adspot) {
        $key = 'adgear_adspot_embed_code_' . $adspot["id"];
        if ($key != "") {
            delete_option($key);
        }
    }
}
function adgear_adspot_selector_ui($args)
{
    extract($args);
    ?>
  <select class="adgear_adspot_selector" id="<?php 
    echo $id;
    ?>
" name="<?php 
    echo $name;
    ?>
" >
<?php 
    foreach (adgear_ad_spots() as $adspot) {
        ?>
      <option <?php 
        if ($selected == $adspot["id"]) {
            echo "selected";
        }
        ?>
 value="<?php 
        echo $adspot["id"];
        ?>
"><?php 
        echo $adspot["name"];
        if ($adspot["width"]) {
            ?>
&nbsp;(<?php 
            echo $adspot["width"];
            ?>
&times;<?php 
            echo $adspot["height"];
            ?>
)<?php 
        }
        ?>
</option>
<?php 
    }
    ?>
  </select>
<?php 
}