'widget astropress_widget', 'description' => 'AstroPress Widget to embed horoscopes' ); $this->__construct('astropress','AstroPress Widget', $widget_ops); } function widget($args, $instance) { // prints the widget extract($args, EXTR_SKIP); $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']); $w = empty($instance['w']) ? '600' : apply_filters('widget_w', intval($instance['w'])); $h = empty($instance['h']) ? '600' : apply_filters('widget_h', intval($instance['h'])); if(!$w){$w=600;} if(!$h){$h=600;} echo $before_widget; if($title){ echo $before_title.$title.$after_title; } echo astropress_iframe_code($w,$h); echo $after_widget; } function update($new_instance, $old_instance) { //save the widget $instance = $new_instance; return $instance; } function form($instance) { //widgetform in backend $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'w' => '600', 'h' => '600') ); $title = strip_tags($instance['title']); $w = strip_tags($instance['w']); $h = ($instance['h']); ?>

'; //$url = "http://localhost/arpit/ask-oracle-app-new/"; $url = "https://www.ask-oracle.com/embed/"; if($arg){ foreach($arg as $key=>$val) { $arg1[] = $key.'='.urlencode($val); } $url.= '?'.implode('&',$arg1); } return ''; }