'); $instance['show_title'] = (boolean) strip_tags($new_instance['show_title']); $instance['show_header_report'] = (boolean) strip_tags($new_instance['show_header_report']); $instance['only_one_keyword'] = (boolean) strip_tags($new_instance['only_one_keyword']); $overflow = strip_tags($new_instance['overflow']); if (empty($overflow)) { $instance['overflow'] = 'auto'; } else { $instance['overflow'] = $overflow; } $instance['powered_by'] = (boolean) strip_tags($new_instance['powered_by']); $theme = strip_tags($new_instance['theme']); if (empty($theme)) { $instance['theme'] = 'full'; } else { $instance['theme'] = $theme; } $instance['show_title'] = (boolean) strip_tags($new_instance['show_title']); $max_height = (int) trim(strip_tags($new_instance['max_height'])); if ($max_height < 1) { $instance['max_height'] = '10000px'; } else { $instance['max_height'] = $max_height . "px"; } $instance['before_text'] = strip_tags($new_instance['before_text'], '
'); $instance['after_text'] = strip_tags($new_instance['after_text'], '
'); $instance['type'] = strip_tags($new_instance['type']); $instance['seeform'] = strip_tags($new_instance['seeform']); $instance['credits'] = min(1000000, max(1, strip_tags($new_instance['credits'] === null ? 100 : $new_instance['credits'] ))); $instance['creditscycle'] = strip_tags($new_instance['creditscycle']); $instance['captcha'] = strip_tags($new_instance['captcha'] === null ? "unauthenticated" : $new_instance['captcha']); return $instance; } /** @see WP_Widget::form -- do not rename this */ function form($instance) { $title = esc_attr(!isset($instance['title']) || $instance['title'] === null ? __("Create SEO Report") : $instance['title']); $show_title = esc_attr(!isset($instance['show_title']) || $instance['show_title'] === null ? 1 : $instance['show_title']); $headerreportshow = esc_attr(!isset($instance['show_header_report']) || $instance['show_header_report'] === null ? 1 : $instance['show_header_report']); $overflow = esc_attr(!isset($instance['overflow']) || $instance['overflow'] === null ? 'visible' : $instance['overflow']); $powered_by = esc_attr(!isset($instance['powered_by']) || $instance['powered_by'] === null ? 1 : $instance['powered_by']); $theme = esc_attr(!isset($instance['theme']) || $instance['theme'] === null ? 'lite' : $instance['theme']); $after_text = esc_attr(!isset($instance['after_text']) || $instance['after_text'] === null ? '' : $instance['after_text']); $before_text = esc_attr(!isset($instance['before_text']) || $instance['before_text'] === null ? '' : $instance['before_text']); $max_height = esc_attr(!isset($instance['max_height']) || $instance['max_height'] === null ? "10000px" : $instance['max_height']); $type = esc_attr(!isset($instance['type']) || $instance['type'] === null ? 'ranktracker' : $instance['type']); $seeform = esc_attr(!isset($instance['seeform']) || $instance['seeform'] === null ? "authenticated" : $instance['seeform']); $credits = min(1000000, max(1, esc_attr(!isset($instance['credits']) || $instance['credits'] === null ? 100 : $instance['credits'] ))); $creditscycle = esc_attr(!isset($instance['creditscycle']) || $instance['creditscycle'] === null ? 'daily' : $instance['creditscycle']); $captcha = esc_attr(!isset($instance['captcha']) || $instance['captcha'] === null ? "unauthenticated" : $instance['captcha']); $onlyonekeyword = esc_attr(!isset($instance['only_one_keyword']) || $instance['only_one_keyword'] === null ? 1 : $instance['only_one_keyword']); ?>


/>

/>

'; echo $before_widget; if (($title && $show_title)) { echo $before_title . $title . $after_title; } echo '
' . $before_text . '
'; if ($show_title || $powered_by || $before_text || $after_text) { echo '
'; } if($headerreportshow){ ?> '; } echo '
' . $after_text . '
'; if ($powered_by) { echo '
Powered by  
'; } echo $after_widget; echo '
'; $out = ob_get_contents(); ob_end_clean(); return $out; } function sat_create_report_shortcode($atts, $content = null) { $empty_data = array('after_widget' => '', 'before_widget' => $content, 'before_title' => '

', 'after_title' => '

'); return sat_create_report_generic($empty_data, $atts); } function sat_register_shortcode_create_report() { add_shortcode('create-report', 'sat_create_report_shortcode'); } // Add the widget and shortcode to WP add_action('widgets_init', create_function('', 'return register_widget("sat_create_report_widget");')); add_action('init', 'sat_register_shortcode_create_report');