'agentrank_form', 'description' => __('A Widget for Realty Baron Agent Contact Form ', 'agentrank_form') ); $control_ops = array( 'width' => 200, 'height' => 350, 'id_base' => 'agentrank_form' ); $this->WP_Widget( 'agentrank_form', __('AgentRank Contact Form', 'agentrank_form'), $widget_ops, $control_ops ); } function widget( $args, $instance ) { extract( $args ); $title = apply_filters('widget_title', $instance['title'] ); echo $before_widget; if ( $title ) echo $before_title . $title . $after_title; //check options API Key $check_key = get_option('agent_apikey'); $ag_fullname = get_option('agent_fullname'); //if api key not empty, proceed to do api call //else display error message if(!empty($check_key)&&!empty($ag_fullname)){ //start of mini form $action_url_raw = get_bloginfo('url')."/agentrank/contact"; $action_url = esc_url($action_url_raw); $html .= "
"; $html .= '