3 global $wpcom_api_key, $akismet_api_host, $akismet_api_port;
5 $wpcom_api_key = defined( 'WPCOM_API_KEY' ) ? constant( 'WPCOM_API_KEY' ) : '';
6 $akismet_api_host = Akismet::get_api_key() . '.rest.akismet.com';
7 $akismet_api_port = 80;
9 function akismet_test_mode() {
10 return Akismet::is_test_mode();
13 function akismet_http_post( $request, $host, $path, $port = 80, $ip = null ) {
14 $path = str_replace( '/1.1/', '', $path );
16 return Akismet::http_post( $request, $path, $ip );
19 function akismet_microtime() {
20 return Akismet::_get_microtime();
23 function akismet_delete_old() {
24 return Akismet::delete_old_comments();
27 function akismet_delete_old_metadata() {
28 return Akismet::delete_old_comments_meta();
31 function akismet_check_db_comment( $id, $recheck_reason = 'recheck_queue' ) {
32 return Akismet::check_db_comment( $id, $recheck_reason );
35 function akismet_rightnow() {
36 if ( !class_exists( 'Akismet_Admin' ) )
39 return Akismet_Admin::rightnow_stats();
42 function akismet_admin_init() {
43 _deprecated_function( __FUNCTION__, '3.0' );
45 function akismet_version_warning() {
46 _deprecated_function( __FUNCTION__, '3.0' );
48 function akismet_load_js_and_css() {
49 _deprecated_function( __FUNCTION__, '3.0' );
51 function akismet_nonce_field( $action = -1 ) {
52 return wp_nonce_field( $action );
54 function akismet_plugin_action_links( $links, $file ) {
55 return Akismet_Admin::plugin_action_links( $links, $file );
57 function akismet_conf() {
58 _deprecated_function( __FUNCTION__, '3.0' );
60 function akismet_stats_display() {
61 _deprecated_function( __FUNCTION__, '3.0' );
63 function akismet_stats() {
64 return Akismet_Admin::dashboard_stats();
66 function akismet_admin_warnings() {
67 _deprecated_function( __FUNCTION__, '3.0' );
69 function akismet_comment_row_action( $a, $comment ) {
70 return Akismet_Admin::comment_row_actions( $a, $comment );
72 function akismet_comment_status_meta_box( $comment ) {
73 return Akismet_Admin::comment_status_meta_box( $comment );
75 function akismet_comments_columns( $columns ) {
76 _deprecated_function( __FUNCTION__, '3.0' );
80 function akismet_comment_column_row( $column, $comment_id ) {
81 _deprecated_function( __FUNCTION__, '3.0' );
83 function akismet_text_add_link_callback( $m ) {
84 return Akismet_Admin::text_add_link_callback( $m );
86 function akismet_text_add_link_class( $comment_text ) {
87 return Akismet_Admin::text_add_link_class( $comment_text );
89 function akismet_check_for_spam_button( $comment_status ) {
90 return Akismet_Admin::check_for_spam_button( $comment_status );
92 function akismet_submit_nonspam_comment( $comment_id ) {
93 return Akismet::submit_nonspam_comment( $comment_id );
95 function akismet_submit_spam_comment( $comment_id ) {
96 return Akismet::submit_spam_comment( $comment_id );
98 function akismet_transition_comment_status( $new_status, $old_status, $comment ) {
99 return Akismet::transition_comment_status( $new_status, $old_status, $comment );
101 function akismet_spam_count( $type = false ) {
102 return Akismet_Admin::get_spam_count( $type );
104 function akismet_recheck_queue() {
105 return Akismet_Admin::recheck_queue();
107 function akismet_remove_comment_author_url() {
108 return Akismet_Admin::remove_comment_author_url();
110 function akismet_add_comment_author_url() {
111 return Akismet_Admin::add_comment_author_url();
113 function akismet_check_server_connectivity() {
114 return Akismet_Admin::check_server_connectivity();
116 function akismet_get_server_connectivity( $cache_timeout = 86400 ) {
117 return Akismet_Admin::get_server_connectivity( $cache_timeout );
119 function akismet_server_connectivity_ok() {
120 _deprecated_function( __FUNCTION__, '3.0' );
124 function akismet_admin_menu() {
125 return Akismet_Admin::admin_menu();
127 function akismet_load_menu() {
128 return Akismet_Admin::load_menu();
130 function akismet_init() {
131 _deprecated_function( __FUNCTION__, '3.0' );
133 function akismet_get_key() {
134 return Akismet::get_api_key();
136 function akismet_check_key_status( $key, $ip = null ) {
137 return Akismet::check_key_status( $key, $ip );
139 function akismet_update_alert( $response ) {
140 return Akismet::update_alert( $response );
142 function akismet_verify_key( $key, $ip = null ) {
143 return Akismet::verify_key( $key, $ip );
145 function akismet_get_user_roles( $user_id ) {
146 return Akismet::get_user_roles( $user_id );
148 function akismet_result_spam( $approved ) {
149 return Akismet::comment_is_spam( $approved );
151 function akismet_result_hold( $approved ) {
152 return Akismet::comment_needs_moderation( $approved );
154 function akismet_get_user_comments_approved( $user_id, $comment_author_email, $comment_author, $comment_author_url ) {
155 return Akismet::get_user_comments_approved( $user_id, $comment_author_email, $comment_author, $comment_author_url );
157 function akismet_update_comment_history( $comment_id, $message, $event = null ) {
158 return Akismet::update_comment_history( $comment_id, $message, $event );
160 function akismet_get_comment_history( $comment_id ) {
161 return Akismet::get_comment_history( $comment_id );
163 function akismet_cmp_time( $a, $b ) {
164 return Akismet::_cmp_time( $a, $b );
166 function akismet_auto_check_update_meta( $id, $comment ) {
167 return Akismet::auto_check_update_meta( $id, $comment );
169 function akismet_auto_check_comment( $commentdata ) {
170 return Akismet::auto_check_comment( $commentdata );
172 function akismet_get_ip_address() {
173 return Akismet::get_ip_address();
175 function akismet_cron_recheck() {
176 return Akismet::cron_recheck();
178 function akismet_add_comment_nonce() {
179 return Akismet::add_comment_nonce( $post_id );
181 function akismet_fix_scheduled_recheck() {
182 return Akismet::fix_scheduled_recheck();
184 function akismet_spam_comments() {
185 _deprecated_function( __FUNCTION__, '3.0' );
189 function akismet_spam_totals() {
190 _deprecated_function( __FUNCTION__, '3.0' );
194 function akismet_manage_page() {
195 _deprecated_function( __FUNCTION__, '3.0' );
197 function akismet_caught() {
198 _deprecated_function( __FUNCTION__, '3.0' );
200 function redirect_old_akismet_urls() {
201 _deprecated_function( __FUNCTION__, '3.0' );
203 function akismet_kill_proxy_check( $option ) {
204 _deprecated_function( __FUNCTION__, '3.0' );
208 function akismet_pingback_forwarded_for( $r, $url ) {
209 return Akismet::pingback_forwarded_for( $r, $url );
211 function akismet_pre_check_pingback( $method ) {
212 return Akismet::pre_check_pingback( $method );