Ejemplo n.º 1
0
/**
 * Creates Select Options for widget
 *
 * @since 0.2.0
 * @access public
 *
 * @param $value Value
 */
function dfp_ad_select_options($value)
{
    echo '<option value="false">Select Position</option>';
    $positions = dfp_get_ad_positions();
    foreach ($positions as $position) {
        echo '<option' . selected($value, $position->post_id) . ' value="' . $position->post_id . '">(' . $position->post_id . ') ' . $position->title . '</option>';
    }
}
Ejemplo n.º 2
0
 /**
  *
  */
 public function send_ads_to_js($dfp_ads)
 {
     // Copy the original
     $object = clone $this;
     $object->set_targeting();
     $object->positions = dfp_get_ad_positions();
     $object->script_name = null;
     $object->dir_uri = null;
     return $object;
 }