WebPurify and logging in to your account.' ), 'http://www.webpurify.com/' ); ?>

__( 'WebPurify License Key' ), 'attributes' => array( 'maxlength' => 35 ), 'after' => $after, 'note' => sprintf( __( 'If you don\'t have a WebPurify License Key, you can get one at webpurify.com' ), 'http://www.webpurify.com/' ) ) ); ?>
Settings saved.' ) ); } if ( !empty( $_GET['invalid-webpurify'] ) ) { bb_admin_notice( __( 'The key you attempted to enter is invalid. Reverting to previous setting.' ), 'error' ); } global $bb_admin_body_class; $bb_admin_body_class = ' bb-admin-settings'; } add_action( 'bb_wp_configuration_page_pre_head', 'bb_wp_configuration_page_process' ); // Bail here if no key is set if ( !bb_get_option( 'webpurify_key' ) ) { return; } function bb_wp_check_post( $post_text ) { global $bb_current_user; global $bb_wp_pre_post_status; $API_KEY = bb_get_option( 'webpurify_key' ); $params = array( 'api_key' => $API_KEY, 'method' => 'webpurify.live.replace', 'text' => $post_text, 'replacesymbol' => '*', 'cdata' => '1' ); $encoded_params = array(); foreach ($params as $k => $v){ $encoded_params[] = urlencode($k).'='.urlencode($v); } # # call the API and decode the response # $url = "http://api1.webpurify.com/services/rest/?".implode('&', $encoded_params); $response = simplexml_load_file($url,'SimpleXMLElement', LIBXML_NOCDATA); $post_text2 = $response->text; if ($post_text2 == '') { $post_text2 = $post_text; } return $post_text2; } add_action( 'pre_post', 'bb_wp_check_post', 1 ); function bb_wp_check_title( $topic_title ) { global $bb_current_user; global $bb_wp_pre_topic_title_status; $API_KEY = bb_get_option( 'webpurify_key' ); $params = array( 'api_key' => $API_KEY, 'method' => 'webpurify.live.replace', 'text' => $topic_title, 'replacesymbol' => '*', 'cdata' => '1' ); $encoded_params = array(); foreach ($params as $k => $v){ $encoded_params[] = urlencode($k).'='.urlencode($v); } # # call the API and decode the response # $url = "http://api1.webpurify.com/services/rest/?".implode('&', $encoded_params); $response = simplexml_load_file($url,'SimpleXMLElement', LIBXML_NOCDATA); $topic_title2 = $response->text; if ($topic_title2 == '') { $topic_title2 = $topic_title; } return $topic_title2; } add_action( 'pre_topic_title', 'bb_wp_check_title', 1 ); ?>