5
|
1 |
<div class="wrap"> |
|
2 |
|
|
3 |
<h2><?php esc_html_e( 'Akismet' , 'akismet');?></h2> |
|
4 |
|
|
5 |
<div class="have-key"> |
|
6 |
|
|
7 |
<?php if ( $stat_totals && isset( $stat_totals['all'] ) && (int) $stat_totals['all']->spam > 0 ) : ?> |
|
8 |
|
|
9 |
<div class="new-snapshot stats"> |
|
10 |
|
|
11 |
<span style="float:right;margin:10px 15px -5px 0px"> |
|
12 |
<a href="<?php echo esc_url( Akismet_Admin::get_page_url( 'stats' ) ); ?>" class=""><?php esc_html_e( 'Summaries' , 'akismet');?></a> |
|
13 |
</span> |
|
14 |
|
|
15 |
<iframe allowtransparency="true" scrolling="no" frameborder="0" style="width: 100%; height: 215px; overflow: hidden;" src="<?php printf( '//akismet.com/web/1.0/snapshot.php?blog=%s&api_key=%s&height=180&locale=%s', urlencode( get_bloginfo('url') ), Akismet::get_api_key(), get_locale() );?>"></iframe> |
|
16 |
<ul> |
|
17 |
<li> |
|
18 |
<h3><?php esc_html_e( 'Past six months' , 'akismet');?></h3> |
|
19 |
<span><?php echo number_format( $stat_totals['6-months']->spam );?></span> |
|
20 |
<?php esc_html_e( 'Spam blocked' , 'akismet');?> |
|
21 |
</li> |
|
22 |
<li> |
|
23 |
<h3><?php esc_html_e( 'All time' , 'akismet');?></h3> |
|
24 |
<span><?php echo number_format( $stat_totals['all']->spam );?></span> |
|
25 |
<?php esc_html_e( 'Spam blocked' , 'akismet');?> |
|
26 |
</li> |
|
27 |
<li> |
|
28 |
<h3><?php esc_html_e( 'Accuracy' , 'akismet');?></h3> |
|
29 |
<span><?php echo $stat_totals['all']->accuracy; ?>%</span> |
|
30 |
<?php printf( |
|
31 |
esc_html( |
|
32 |
_n( '%s missed spam, %s false positive', '%s missed spam, %s false positives', $stat_totals['all']->false_positives , 'akismet') |
|
33 |
), |
|
34 |
number_format( $stat_totals['all']->missed_spam ), |
|
35 |
number_format( $stat_totals['all']->false_positives ) |
|
36 |
); ?> |
|
37 |
</li> |
|
38 |
</ul> |
|
39 |
<div class="clearfix"></div> |
|
40 |
</div> |
|
41 |
<?php endif;?> |
|
42 |
|
|
43 |
<?php if ( $akismet_user ):?> |
|
44 |
|
|
45 |
<div id="wpcom-stats-meta-box-container" class="metabox-holder"><?php |
|
46 |
wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); |
|
47 |
wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); |
|
48 |
?> |
|
49 |
<script type="text/javascript"> |
|
50 |
jQuery(document).ready( function($) { |
|
51 |
jQuery('.if-js-closed').removeClass('if-js-closed').addClass('closed'); |
|
52 |
if(typeof postboxes !== 'undefined') |
|
53 |
postboxes.add_postbox_toggles( 'plugins_page_akismet-key-config' ); |
|
54 |
}); |
|
55 |
</script> |
|
56 |
<div class="postbox-container" style="width: 55%;margin-right: 10px;"> |
|
57 |
<div id="normal-sortables" class="meta-box-sortables ui-sortable"> |
|
58 |
<div id="referrers" class="postbox "> |
|
59 |
<div class="handlediv" title="Click to toggle"><br></div> |
|
60 |
<h3 class="hndle"><span><?php esc_html_e( 'Settings' , 'akismet');?></span></h3> |
|
61 |
<form name="akismet_conf" id="akismet-conf" action="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>" method="POST"> |
|
62 |
<div class="inside"> |
|
63 |
<table cellspacing="0" class="akismet-settings"> |
|
64 |
<tbody> |
|
65 |
<?php if ( !defined( 'WPCOM_API_KEY' ) ):?> |
|
66 |
<tr> |
|
67 |
<th class="akismet-api-key" width="10%" align="left" scope="row"><?php esc_html_e('API Key', 'akismet');?></th> |
|
68 |
<td width="5%"/> |
|
69 |
<td align="left"> |
|
70 |
<span class="api-key"><input id="key" name="key" type="text" size="15" value="<?php echo esc_attr( get_option('wordpress_api_key') ); ?>" class="regular-text code <?php echo $akismet_user->status;?>"></span> |
|
71 |
</td> |
|
72 |
</tr> |
|
73 |
<?php endif; ?> |
|
74 |
<?php if ( isset( $_GET['ssl_status'] ) ) { ?> |
|
75 |
<tr> |
|
76 |
<th align="left" scope="row"><?php esc_html_e( 'SSL Status', 'akismet' ); ?></th> |
|
77 |
<td></td> |
|
78 |
<td align="left"> |
|
79 |
<p> |
|
80 |
<?php |
|
81 |
|
|
82 |
if ( ! function_exists( 'wp_http_supports' ) ) { |
|
83 |
?><b><?php esc_html_e( 'Disabled.', 'akismet' ); ?></b> <?php printf( esc_html( 'Your WordPress installation does not include the function %s; upgrade to the latest version of WordPress.', 'akismet' ), '<code>wp_http_supports</code>' ); ?><?php |
|
84 |
} |
|
85 |
else if ( ! wp_http_supports( array( 'ssl' ) ) ) { |
|
86 |
?><b><?php esc_html_e( 'Disabled.', 'akismet' ); ?></b> <?php esc_html_e( 'Your Web server cannot make SSL requests; contact your Web host and ask them to add support for SSL requests.', 'akismet' ); ?><?php |
|
87 |
} |
|
88 |
else { |
|
89 |
$ssl_disabled = get_option( 'akismet_ssl_disabled' ); |
|
90 |
|
|
91 |
if ( $ssl_disabled ) { |
|
92 |
?><b><?php esc_html_e( 'Temporarily disabled.', 'akismet' ); ?></b> <?php esc_html_e( 'Akismet encountered a problem with a previous SSL request and disabled it temporarily. It will begin using SSL for requests again shortly.', 'akismet' ); ?><?php |
|
93 |
} |
|
94 |
else { |
|
95 |
?><b><?php esc_html_e( 'Enabled.', 'akismet' ); ?></b> <?php esc_html_e( 'All systems functional.', 'akismet' ); ?><?php |
|
96 |
} |
|
97 |
} |
|
98 |
|
|
99 |
?> |
|
100 |
</p> |
|
101 |
</td> |
|
102 |
</tr> |
|
103 |
<?php } ?> |
|
104 |
<tr> |
|
105 |
<th align="left" scope="row"><?php esc_html_e('Comments', 'akismet');?></th> |
|
106 |
<td></td> |
|
107 |
<td align="left"> |
|
108 |
<p> |
|
109 |
<label for="akismet_show_user_comments_approved" title="<?php esc_attr_e( 'Show approved comments' , 'akismet'); ?>"><input name="akismet_show_user_comments_approved" id="akismet_show_user_comments_approved" value="1" type="checkbox" <?php checked('1', get_option('akismet_show_user_comments_approved')); ?>> <?php esc_html_e('Show the number of approved comments beside each comment author', 'akismet'); ?></label> |
|
110 |
</p> |
|
111 |
</td> |
|
112 |
</tr> |
|
113 |
<tr> |
|
114 |
<th class="strictness" align="left" scope="row"><?php esc_html_e('Strictness', 'akismet'); ?></th> |
|
115 |
<td></td> |
|
116 |
<td align="left"> |
|
117 |
<fieldset><legend class="screen-reader-text"><span><?php esc_html_e('Akismet anti-spam strictness', 'akismet'); ?></span></legend> |
|
118 |
<p><label for="akismet_strictness_1"><input type="radio" name="akismet_strictness" id="akismet_strictness_1" value="1" <?php checked('1', get_option('akismet_strictness')); ?> /> <?php esc_html_e('Silently discard the worst and most pervasive spam so I never see it.', 'akismet'); ?></label></p> |
|
119 |
<p><label for="akismet_strictness_0"><input type="radio" name="akismet_strictness" id="akismet_strictness_0" value="0" <?php checked('0', get_option('akismet_strictness')); ?> /> <?php esc_html_e('Always put spam in the Spam folder for review.', 'akismet'); ?></label></p> |
|
120 |
</fieldset> |
|
121 |
<span class="note"><strong><?php esc_html_e('Note:', 'akismet');?></strong> |
|
122 |
<?php |
|
123 |
|
|
124 |
$delete_interval = max( 1, intval( apply_filters( 'akismet_delete_comment_interval', 15 ) ) ); |
|
125 |
|
|
126 |
printf( |
|
127 |
_n( |
|
128 |
'Spam in the <a href="%1$s">spam folder</a> older than 1 day is deleted automatically.', |
|
129 |
'Spam in the <a href="%1$s">spam folder</a> older than %2$d days is deleted automatically.', |
|
130 |
$delete_interval, |
|
131 |
'akismet' |
|
132 |
), |
|
133 |
admin_url( 'edit-comments.php?comment_status=spam' ), |
|
134 |
$delete_interval |
|
135 |
); |
|
136 |
|
|
137 |
?> |
|
138 |
</td> |
|
139 |
</tr> |
|
140 |
</tbody> |
|
141 |
</table> |
|
142 |
</div> |
|
143 |
<div id="major-publishing-actions"> |
|
144 |
<?php if ( !defined( 'WPCOM_API_KEY' ) ):?> |
|
145 |
<div id="delete-action"> |
|
146 |
<a class="submitdelete deletion" href="<?php echo esc_url( Akismet_Admin::get_page_url( 'delete_key' ) ); ?>"><?php esc_html_e('Disconnect this account', 'akismet'); ?></a> |
|
147 |
</div> |
|
148 |
<?php endif; ?> |
|
149 |
<?php wp_nonce_field(Akismet_Admin::NONCE) ?> |
|
150 |
<div id="publishing-action"> |
|
151 |
<input type="hidden" name="action" value="enter-key"> |
|
152 |
<input type="submit" name="submit" id="submit" class="button button-primary" value="<?php esc_attr_e('Save Changes', 'akismet');?>"> |
|
153 |
|
|
154 |
</div> |
|
155 |
<div class="clear"></div> |
|
156 |
</div> |
|
157 |
</form> |
|
158 |
</div> |
|
159 |
</div> |
|
160 |
</div> |
|
161 |
<div class="postbox-container" style="width:44%;"> |
|
162 |
<div id="normal-sortables" class="meta-box-sortables ui-sortable"> |
|
163 |
<div id="referrers" class="postbox "> |
|
164 |
<div class="handlediv" title="Click to toggle"><br></div> |
|
165 |
<h3 class="hndle"><span><?php esc_html_e( 'Account' , 'akismet');?></span></h3> |
|
166 |
<div class="inside"> |
|
167 |
<table cellspacing="0"> |
|
168 |
<tbody> |
|
169 |
<tr> |
|
170 |
<th scope="row" align="left"><?php esc_html_e( 'Subscription Type' , 'akismet');?></th> |
|
171 |
<td width="5%"/> |
|
172 |
<td align="left"> |
|
173 |
<span><?php echo $akismet_user->account_name; ?></span> |
|
174 |
</td> |
|
175 |
</tr> |
|
176 |
<tr> |
|
177 |
<th scope="row" align="left"><?php esc_html_e( 'Status' , 'akismet');?></th> |
|
178 |
<td width="5%"/> |
|
179 |
<td align="left"> |
|
180 |
<span><?php |
|
181 |
if ( 'cancelled' == $akismet_user->status ) : |
|
182 |
esc_html_e( 'Cancelled', 'akismet' ); |
|
183 |
elseif ( 'suspended' == $akismet_user->status ) : |
|
184 |
esc_html_e( 'Suspended', 'akismet' ); |
|
185 |
elseif ( 'missing' == $akismet_user->status ) : |
|
186 |
esc_html_e( 'Missing', 'akismet' ); |
|
187 |
elseif ( 'no-sub' == $akismet_user->status ) : |
|
188 |
esc_html_e( 'No Subscription Found', 'akismet' ); |
|
189 |
else : |
|
190 |
esc_html_e( 'Active', 'akismet' ); |
|
191 |
endif; ?></span> |
|
192 |
</td> |
|
193 |
</tr> |
|
194 |
<?php if ( $akismet_user->next_billing_date ) : ?> |
|
195 |
<tr> |
|
196 |
<th scope="row" align="left"><?php esc_html_e( 'Next Billing Date' , 'akismet');?></th> |
|
197 |
<td width="5%"/> |
|
198 |
<td align="left"> |
|
199 |
<span><?php echo date( 'F j, Y', $akismet_user->next_billing_date ); ?></span> |
|
200 |
</td> |
|
201 |
</tr> |
|
202 |
<?php endif; ?> |
|
203 |
</tbody> |
|
204 |
</table> |
|
205 |
</div> |
|
206 |
<div id="major-publishing-actions"> |
|
207 |
<div id="publishing-action"> |
|
208 |
<?php Akismet::view( 'get', array( 'text' => ( $akismet_user->account_type == 'free-api-key' && $akismet_user->status == 'active' ? __( 'Upgrade' , 'akismet') : __( 'Change' , 'akismet') ), 'redirect' => 'upgrade' ) ); ?> |
|
209 |
</div> |
|
210 |
<div class="clear"></div> |
|
211 |
</div> |
|
212 |
</div> |
|
213 |
</div> |
|
214 |
</div> |
|
215 |
</div> |
|
216 |
|
|
217 |
<?php endif;?> |
|
218 |
|
|
219 |
</div> |
|
220 |
</div> |