d84e21a8d9dabfc9f0946827abdee533f5dab93f
[autoinstalls/wordpress.git] / wp-content / plugins / akismet / views / config.php
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 echo esc_html( _n( 'Spam blocked', 'Spam blocked', $stat_totals['6-months']->spam, '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 echo esc_html( _n( 'Spam blocked', 'Spam blocked', $stat_totals['all']->spam, '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( _n( '%s missed spam', '%s missed spam', $stat_totals['all']->missed_spam, 'akismet' ), number_format( $stat_totals['all']->missed_spam ) ); ?>
31                                                 |
32                                                 <?php printf( _n( '%s false positive', '%s false positives', $stat_totals['all']->false_positives, 'akismet' ), number_format( $stat_totals['all']->false_positives ) ); ?>
33                                         </li>
34                                 </ul>
35                                 <div class="clearfix"></div>
36                         </div>
37                 <?php endif;?>
38
39                 <?php if ( $akismet_user ):?>
40
41                         <div id="wpcom-stats-meta-box-container" class="metabox-holder"><?php
42                                 wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
43                                 wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
44                                 ?>
45                                 <script type="text/javascript">
46                                 jQuery(document).ready( function($) {
47                                         jQuery('.if-js-closed').removeClass('if-js-closed').addClass('closed');
48                                         if(typeof postboxes !== 'undefined')
49                                                 postboxes.add_postbox_toggles( 'plugins_page_akismet-key-config' );
50                                 });
51                                 </script>
52                                 <div class="postbox-container" style="width: 55%;margin-right: 10px;">
53                                         <div id="normal-sortables" class="meta-box-sortables ui-sortable">
54                                                 <div id="referrers" class="postbox ">
55                                                         <div class="handlediv" title="Click to toggle"><br></div>
56                                                         <h3 class="hndle"><span><?php esc_html_e( 'Settings' , 'akismet');?></span></h3>
57                                                         <form name="akismet_conf" id="akismet-conf" action="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>" method="POST">
58                                                                 <div class="inside">
59                                                                         <table cellspacing="0" class="akismet-settings">
60                                                                                 <tbody>
61                                                                                         <?php if ( !defined( 'WPCOM_API_KEY' ) ):?>
62                                                                                         <tr>
63                                                                                                 <th class="akismet-api-key" width="10%" align="left" scope="row"><?php esc_html_e('API Key', 'akismet');?></th>
64                                                                                                 <td width="5%"/>
65                                                                                                 <td align="left">
66                                                                                                         <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>
67                                                                                                 </td>
68                                                                                         </tr>
69                                                                                         <?php endif; ?>
70                                                                                         <?php if ( isset( $_GET['ssl_status'] ) ) { ?>
71                                                                                                 <tr>
72                                                                                                         <th align="left" scope="row"><?php esc_html_e( 'SSL Status', 'akismet' ); ?></th>
73                                                                                                         <td></td>
74                                                                                                         <td align="left">
75                                                                                                                 <p>
76                                                                                                                         <?php
77
78                                                                                                                         if ( ! function_exists( 'wp_http_supports' ) ) {
79                                                                                                                                 ?><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
80                                                                                                                         }
81                                                                                                                         else if ( ! wp_http_supports( array( 'ssl' ) ) ) {
82                                                                                                                                 ?><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
83                                                                                                                         }
84                                                                                                                         else {
85                                                                                                                                 $ssl_disabled = get_option( 'akismet_ssl_disabled' );
86
87                                                                                                                                 if ( $ssl_disabled ) {
88                                                                                                                                         ?><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
89                                                                                                                                 }
90                                                                                                                                 else {
91                                                                                                                                         ?><b><?php esc_html_e( 'Enabled.', 'akismet' ); ?></b> <?php esc_html_e( 'All systems functional.', 'akismet' ); ?><?php
92                                                                                                                                 }
93                                                                                                                         }
94
95                                                                                                                         ?>
96                                                                                                                 </p>
97                                                                                                         </td>
98                                                                                                 </tr>
99                                                                                         <?php } ?>
100                                                                                         <tr>
101                                                                                                 <th align="left" scope="row"><?php esc_html_e('Comments', 'akismet');?></th>
102                                                                                                 <td></td>
103                                                                                                 <td align="left">
104                                                                                                         <p>
105                                                                                                                 <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>
106                                                                                                         </p>
107                                                                                                 </td>
108                                                                                         </tr>
109                                                                                         <tr>
110                                                                                                 <th class="strictness" align="left" scope="row"><?php esc_html_e('Strictness', 'akismet'); ?></th>
111                                                                                                 <td></td>
112                                                                                                 <td align="left">
113                                                                                                         <fieldset><legend class="screen-reader-text"><span><?php esc_html_e('Akismet anti-spam strictness', 'akismet'); ?></span></legend>
114                                                                                                         <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>
115                                                                                                         <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>
116                                                                                                         </fieldset>
117                                                                                                         <span class="note"><strong><?php esc_html_e('Note:', 'akismet');?></strong>
118                                                                                                         <?php
119                                                                                                         
120                                                                                                         $delete_interval = max( 1, intval( apply_filters( 'akismet_delete_comment_interval', 15 ) ) );
121                                                                                                         
122                                                                                                         printf(
123                                                                                                                 _n(
124                                                                                                                         'Spam in the <a href="%1$s">spam folder</a> older than 1 day is deleted automatically.',
125                                                                                                                         'Spam in the <a href="%1$s">spam folder</a> older than %2$d days is deleted automatically.',
126                                                                                                                         $delete_interval,
127                                                                                                                         'akismet'
128                                                                                                                 ),
129                                                                                                                 admin_url( 'edit-comments.php?comment_status=spam' ),
130                                                                                                                 $delete_interval
131                                                                                                         );
132                                                                                                         
133                                                                                                         ?>
134                                                                                                 </td>
135                                                                                         </tr>
136                                                                                 </tbody>
137                                                                         </table>
138                                                                 </div>
139                                                                 <div id="major-publishing-actions">
140                                                                         <?php if ( !defined( 'WPCOM_API_KEY' ) ):?>
141                                                                         <div id="delete-action">
142                                                                                 <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>
143                                                                         </div>
144                                                                         <?php endif; ?>
145                                                                         <?php wp_nonce_field(Akismet_Admin::NONCE) ?>
146                                                                         <div id="publishing-action">
147                                                                                         <input type="hidden" name="action" value="enter-key">
148                                                                                         <input type="submit" name="submit" id="submit" class="button button-primary" value="<?php esc_attr_e('Save Changes', 'akismet');?>">
149
150                                                                         </div>
151                                                                         <div class="clear"></div>
152                                                                 </div>
153                                                         </form>
154                                                 </div>
155                                         </div>
156                                 </div>
157                                 <div class="postbox-container" style="width:44%;">
158                                         <div id="normal-sortables" class="meta-box-sortables ui-sortable">
159                                                 <div id="referrers" class="postbox ">
160                                                         <div class="handlediv" title="Click to toggle"><br></div>
161                                                         <h3 class="hndle"><span><?php esc_html_e( 'Account' , 'akismet');?></span></h3>
162                                                         <div class="inside">
163                                                                 <table cellspacing="0">
164                                                                         <tbody>
165                                                                                 <tr>
166                                                                                         <th scope="row" align="left"><?php esc_html_e( 'Subscription Type' , 'akismet');?></th>
167                                                                                         <td width="5%"/>
168                                                                                         <td align="left">
169                                                                                                 <span><?php echo $akismet_user->account_name; ?></span>
170                                                                                         </td>
171                                                                                 </tr>
172                                                                                 <tr>
173                                                                                         <th scope="row" align="left"><?php esc_html_e( 'Status' , 'akismet');?></th>
174                                                                                         <td width="5%"/>
175                                                                                         <td align="left">
176                                                                                                 <span><?php 
177                                                                                                         if ( 'cancelled' == $akismet_user->status ) :
178                                                                                                                 esc_html_e( 'Cancelled', 'akismet' ); 
179                                                                                                         elseif ( 'suspended' == $akismet_user->status ) :
180                                                                                                                 esc_html_e( 'Suspended', 'akismet' );
181                                                                                                         elseif ( 'missing' == $akismet_user->status ) :
182                                                                                                                 esc_html_e( 'Missing', 'akismet' ); 
183                                                                                                         elseif ( 'no-sub' == $akismet_user->status ) :
184                                                                                                                 esc_html_e( 'No Subscription Found', 'akismet' );
185                                                                                                         else :
186                                                                                                                 esc_html_e( 'Active', 'akismet' );  
187                                                                                                         endif; ?></span>
188                                                                                         </td>
189                                                                                 </tr>
190                                                                                 <?php if ( $akismet_user->next_billing_date ) : ?>
191                                                                                 <tr>
192                                                                                         <th scope="row" align="left"><?php esc_html_e( 'Next Billing Date' , 'akismet');?></th>
193                                                                                         <td width="5%"/>
194                                                                                         <td align="left">
195                                                                                                 <span><?php echo date( 'F j, Y', $akismet_user->next_billing_date ); ?></span>
196                                                                                         </td>
197                                                                                 </tr>
198                                                                                 <?php endif; ?>
199                                                                         </tbody>
200                                                                 </table>
201                                                         </div>
202                                                         <div id="major-publishing-actions">
203                                                                 <div id="publishing-action">
204                                                                         <?php Akismet::view( 'get', array( 'text' => ( $akismet_user->account_type == 'free-api-key' && $akismet_user->status == 'active' ? __( 'Upgrade' , 'akismet') : __( 'Change' , 'akismet') ), 'redirect' => 'upgrade' ) ); ?>
205                                                                 </div>
206                                                                 <div class="clear"></div>
207                                                         </div>
208                                                 </div>
209                                         </div>
210                                 </div>
211                         </div>
212
213                 <?php endif;?>
214
215         </div>
216 </div>