'Astronomy Picture of the Day.', 'name' => 'APOD' ); parent::__construct('apod', '', $options); } public function form($instance) { $defaults = array( 'title' => 'APOD', 'img_title'=>'on', 'feed' => 'http://apod.nasa.gov/apod.rss', 'img_per_page' => '1' ); $instance = wp_parse_args((array)$instance, $defaults); $title = ! empty($instance['title']) ? $instance['title'] : ''; $img_title = ! empty($instance['img_title']) ? $instance['img_title'] : ''; $feed = ! empty($instance['feed']) ? $instance['feed'] : ''; $img_per_page = ! empty($instance['img_per_page']) ? $instance['img_per_page'] : ''; ?>

id="get_field_id('img_title'); ?>" name="get_field_name('img_title'); ?>" />

get_item_quantity($perpage); $rss_items = $rss->get_items(0, 1); //print_r($rss_items); foreach($rss_items as $item) {?>

get_title();?>

<?=$item->get_title(); ?> loadHTML(file_get_contents($url)); $tags = $doc->getElementsByTagName('img'); foreach($tags as $tag) { return $tag->getAttribute('src'); } } } ?>