芝麻web文件管理V1.00
编辑当前文件:/www/wwwroot/shphe-en.com/wp-content/plugins/contact-form-7/modules/akismet.php
$value ) { if ( ! in_array( $key, (array) $ignore ) ) $c["$key"] = $value; } return wpcf7_akismet_comment_check( $c ); } function wpcf7_akismet_submitted_params() { $params = array( 'author' => '', 'author_email' => '', 'author_url' => '' ); $content = ''; $fes = wpcf7_scan_shortcode(); foreach ( $fes as $fe ) { if ( ! isset( $fe['name'] ) || ! isset( $_POST[$fe['name']] ) ) continue; $value = $_POST[$fe['name']]; if ( is_array( $value ) ) $value = implode( ', ', wpcf7_array_flatten( $value ) ); $value = trim( $value ); $options = (array) $fe['options']; if ( preg_grep( '%^akismet:author$%', $options ) ) { $params['author'] = trim( $params['author'] . ' ' . $value ); } elseif ( preg_grep( '%^akismet:author_email$%', $options ) ) { if ( '' == $params['author_email'] ) $params['author_email'] = $value; } elseif ( preg_grep( '%^akismet:author_url$%', $options ) ) { if ( '' == $params['author_url'] ) $params['author_url'] = $value; } $content = trim( $content . "\n\n" . $value ); } $params = array_filter( $params ); if ( ! $params ) return false; $params['content'] = $content; return $params; } function wpcf7_akismet_comment_check( $comment ) { global $akismet_api_host, $akismet_api_port; $spam = false; $query_string = ''; foreach ( $comment as $key => $data ) $query_string .= $key . '=' . urlencode( stripslashes( (string) $data ) ) . '&'; $response = akismet_http_post( $query_string, $akismet_api_host, '/1.1/comment-check', $akismet_api_port ); if ( 'true' == $response[1] ) $spam = true; if ( $contact_form = wpcf7_get_current_contact_form() ) $contact_form->akismet = array( 'comment' => $comment, 'spam' => $spam ); return apply_filters( 'wpcf7_akismet_comment_check', $spam, $comment ); } ?>