'agentrank_client', 'description' => __('A Widget to get Agent Client Reviews from RealtyBaron\'s AgentRank API ', 'agentrank_client') ); $control_ops = array( 'width' => 200, 'height' => 350, 'id_base' => 'agentrank_client' ); $this->WP_Widget( 'agentrank_client', __('AgentRank Client Reviews', 'agentrank_client'), $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'); //if api key not empty, proceed to do api call //else display error message if(!empty($check_key)){ //use agentrank rest api class to request xml response global $agapi; $xml = $agapi->sidebar_client_reviews(0); if(!empty($xml)){ //start display widget $html = "