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 _deprecated_function( __FUNCTION__, '3.0', 'Akismet::is_test_mode()' );
12 return Akismet::is_test_mode();
15 function akismet_http_post( $request, $host, $path, $port = 80, $ip = null ) {
16 _deprecated_function( __FUNCTION__, '3.0', 'Akismet::http_post()' );
18 $path = str_replace( '/1.1/', '', $path );
20 return Akismet::http_post( $request, $path, $ip );
23 function akismet_microtime() {
24 _deprecated_function( __FUNCTION__, '3.0', 'Akismet::_get_microtime()' );
26 return Akismet::_get_microtime();
29 function akismet_delete_old() {
30 _deprecated_function( __FUNCTION__, '3.0', 'Akismet::delete_old_comments()' );
32 return Akismet::delete_old_comments();
35 function akismet_delete_old_metadata() {
36 _deprecated_function( __FUNCTION__, '3.0', 'Akismet::delete_old_comments_meta()' );
38 return Akismet::delete_old_comments_meta();
41 function akismet_check_db_comment( $id, $recheck_reason = 'recheck_queue' ) {
42 _deprecated_function( __FUNCTION__, '3.0', 'Akismet::check_db_comment()' );
44 return Akismet::check_db_comment( $id, $recheck_reason );
47 function akismet_rightnow() {
48 _deprecated_function( __FUNCTION__, '3.0', 'Akismet_Admin::rightnow_stats()' );
50 if ( !class_exists( 'Akismet_Admin' ) )
53 return Akismet_Admin::rightnow_stats();
56 function akismet_admin_init() {
57 _deprecated_function( __FUNCTION__, '3.0' );
59 function akismet_version_warning() {
60 _deprecated_function( __FUNCTION__, '3.0' );
62 function akismet_load_js_and_css() {
63 _deprecated_function( __FUNCTION__, '3.0' );
65 function akismet_nonce_field( $action = -1 ) {
66 _deprecated_function( __FUNCTION__, '3.0', 'wp_nonce_field' );
68 return wp_nonce_field( $action );
70 function akismet_plugin_action_links( $links, $file ) {
71 _deprecated_function( __FUNCTION__, '3.0', 'Akismet_Admin::plugin_action_links()' );
73 return Akismet_Admin::plugin_action_links( $links, $file );
75 function akismet_conf() {
76 _deprecated_function( __FUNCTION__, '3.0' );
78 function akismet_stats_display() {
79 _deprecated_function( __FUNCTION__, '3.0' );
81 function akismet_stats() {
82 _deprecated_function( __FUNCTION__, '3.0', 'Akismet_Admin::dashboard_stats()' );
84 return Akismet_Admin::dashboard_stats();
86 function akismet_admin_warnings() {
87 _deprecated_function( __FUNCTION__, '3.0' );
89 function akismet_comment_row_action( $a, $comment ) {
90 _deprecated_function( __FUNCTION__, '3.0', 'Akismet_Admin::comment_row_action()' );
92 return Akismet_Admin::comment_row_actions( $a, $comment );
94 function akismet_comment_status_meta_box( $comment ) {
95 _deprecated_function( __FUNCTION__, '3.0', 'Akismet_Admin::comment_status_meta_box()' );
97 return Akismet_Admin::comment_status_meta_box( $comment );
99 function akismet_comments_columns( $columns ) {
100 _deprecated_function( __FUNCTION__, '3.0' );
104 function akismet_comment_column_row( $column, $comment_id ) {
105 _deprecated_function( __FUNCTION__, '3.0' );
107 function akismet_text_add_link_callback( $m ) {
108 _deprecated_function( __FUNCTION__, '3.0', 'Akismet_Admin::text_add_link_callback()' );
110 return Akismet_Admin::text_add_link_callback( $m );
112 function akismet_text_add_link_class( $comment_text ) {
113 _deprecated_function( __FUNCTION__, '3.0', 'Akismet_Admin::text_add_link_class()' );
115 return Akismet_Admin::text_add_link_class( $comment_text );
117 function akismet_check_for_spam_button( $comment_status ) {
118 _deprecated_function( __FUNCTION__, '3.0', 'Akismet_Admin::check_for_spam_button()' );
120 return Akismet_Admin::check_for_spam_button( $comment_status );
122 function akismet_submit_nonspam_comment( $comment_id ) {
123 _deprecated_function( __FUNCTION__, '3.0', 'Akismet::submit_nonspam_comment()' );
125 return Akismet::submit_nonspam_comment( $comment_id );
127 function akismet_submit_spam_comment( $comment_id ) {
128 _deprecated_function( __FUNCTION__, '3.0', 'Akismet::submit_spam_comment()' );
130 return Akismet::submit_spam_comment( $comment_id );
132 function akismet_transition_comment_status( $new_status, $old_status, $comment ) {
133 _deprecated_function( __FUNCTION__, '3.0', 'Akismet::transition_comment_status()' );
135 return Akismet::transition_comment_status( $new_status, $old_status, $comment );
137 function akismet_spam_count( $type = false ) {
138 _deprecated_function( __FUNCTION__, '3.0', 'Akismet_Admin::get_spam_count()' );
140 return Akismet_Admin::get_spam_count( $type );
142 function akismet_recheck_queue() {
143 _deprecated_function( __FUNCTION__, '3.0', 'Akismet_Admin::recheck_queue()' );
145 return Akismet_Admin::recheck_queue();
147 function akismet_remove_comment_author_url() {
148 _deprecated_function( __FUNCTION__, '3.0', 'Akismet_Admin::remove_comment_author_url()' );
150 return Akismet_Admin::remove_comment_author_url();
152 function akismet_add_comment_author_url() {
153 _deprecated_function( __FUNCTION__, '3.0', 'Akismet_Admin::add_comment_author_url()' );
155 return Akismet_Admin::add_comment_author_url();
157 function akismet_check_server_connectivity() {
158 _deprecated_function( __FUNCTION__, '3.0', 'Akismet_Admin::check_server_connectivity()' );
160 return Akismet_Admin::check_server_connectivity();
162 function akismet_get_server_connectivity( $cache_timeout = 86400 ) {
163 _deprecated_function( __FUNCTION__, '3.0', 'Akismet_Admin::()' );
165 return Akismet_Admin::get_server_connectivity( $cache_timeout );
167 function akismet_server_connectivity_ok() {
168 _deprecated_function( __FUNCTION__, '3.0' );
172 function akismet_admin_menu() {
173 _deprecated_function( __FUNCTION__, '3.0', 'Akismet_Admin::admin_menu()' );
175 return Akismet_Admin::admin_menu();
177 function akismet_load_menu() {
178 _deprecated_function( __FUNCTION__, '3.0', 'Akismet_Admin::load_menu()' );
180 return Akismet_Admin::load_menu();
182 function akismet_init() {
183 _deprecated_function( __FUNCTION__, '3.0' );
185 function akismet_get_key() {
186 _deprecated_function( __FUNCTION__, '3.0', 'Akismet::get_api_key()' );
188 return Akismet::get_api_key();
190 function akismet_check_key_status( $key, $ip = null ) {
191 _deprecated_function( __FUNCTION__, '3.0', 'Akismet::check_key_status()' );
193 return Akismet::check_key_status( $key, $ip );
195 function akismet_update_alert( $response ) {
196 _deprecated_function( __FUNCTION__, '3.0', 'Akismet::update_alert()' );
198 return Akismet::update_alert( $response );
200 function akismet_verify_key( $key, $ip = null ) {
201 _deprecated_function( __FUNCTION__, '3.0', 'Akismet::verify_key()' );
203 return Akismet::verify_key( $key, $ip );
205 function akismet_get_user_roles( $user_id ) {
206 _deprecated_function( __FUNCTION__, '3.0', 'Akismet::get_user_roles()' );
208 return Akismet::get_user_roles( $user_id );
210 function akismet_result_spam( $approved ) {
211 _deprecated_function( __FUNCTION__, '3.0', 'Akismet::comment_is_spam()' );
213 return Akismet::comment_is_spam( $approved );
215 function akismet_result_hold( $approved ) {
216 _deprecated_function( __FUNCTION__, '3.0', 'Akismet::comment_needs_moderation()' );
218 return Akismet::comment_needs_moderation( $approved );
220 function akismet_get_user_comments_approved( $user_id, $comment_author_email, $comment_author, $comment_author_url ) {
221 _deprecated_function( __FUNCTION__, '3.0', 'Akismet::get_user_comments_approved()' );
223 return Akismet::get_user_comments_approved( $user_id, $comment_author_email, $comment_author, $comment_author_url );
225 function akismet_update_comment_history( $comment_id, $message, $event = null ) {
226 _deprecated_function( __FUNCTION__, '3.0', 'Akismet::update_comment_history()' );
228 return Akismet::update_comment_history( $comment_id, $message, $event );
230 function akismet_get_comment_history( $comment_id ) {
231 _deprecated_function( __FUNCTION__, '3.0', 'Akismet::get_comment_history()' );
233 return Akismet::get_comment_history( $comment_id );
235 function akismet_cmp_time( $a, $b ) {
236 _deprecated_function( __FUNCTION__, '3.0', 'Akismet::_cmp_time()' );
238 return Akismet::_cmp_time( $a, $b );
240 function akismet_auto_check_update_meta( $id, $comment ) {
241 _deprecated_function( __FUNCTION__, '3.0', 'Akismet::auto_check_update_meta()' );
243 return Akismet::auto_check_update_meta( $id, $comment );
245 function akismet_auto_check_comment( $commentdata ) {
246 _deprecated_function( __FUNCTION__, '3.0', 'Akismet::auto_check_comment()' );
248 return Akismet::auto_check_comment( $commentdata );
250 function akismet_get_ip_address() {
251 _deprecated_function( __FUNCTION__, '3.0', 'Akismet::get_ip_address()' );
253 return Akismet::get_ip_address();
255 function akismet_cron_recheck() {
256 _deprecated_function( __FUNCTION__, '3.0', 'Akismet::cron_recheck()' );
258 return Akismet::cron_recheck();
260 function akismet_add_comment_nonce() {
261 _deprecated_function( __FUNCTION__, '3.0', 'Akismet::add_comment_nonce()' );
263 return Akismet::add_comment_nonce( $post_id );
265 function akismet_fix_scheduled_recheck() {
266 _deprecated_function( __FUNCTION__, '3.0', 'Akismet::fix_scheduled_recheck()' );
268 return Akismet::fix_scheduled_recheck();
270 function akismet_spam_comments() {
271 _deprecated_function( __FUNCTION__, '3.0' );
275 function akismet_spam_totals() {
276 _deprecated_function( __FUNCTION__, '3.0' );
280 function akismet_manage_page() {
281 _deprecated_function( __FUNCTION__, '3.0' );
283 function akismet_caught() {
284 _deprecated_function( __FUNCTION__, '3.0' );
286 function redirect_old_akismet_urls() {
287 _deprecated_function( __FUNCTION__, '3.0' );
289 function akismet_kill_proxy_check( $option ) {
290 _deprecated_function( __FUNCTION__, '3.0' );