angelovcom.net

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

config.php (12071B)


      1 <?php
      2 
      3 //phpcs:disable VariableAnalysis
      4 // There are "undefined" variables here because they're defined in the code that includes this file as a template.
      5 
      6 ?>
      7 <div id="akismet-plugin-container">
      8 	<div class="akismet-masthead">
      9 		<div class="akismet-masthead__inside-container">
     10 			<div class="akismet-masthead__logo-container">
     11 				<img class="akismet-masthead__logo" src="<?php echo esc_url( plugins_url( '../_inc/img/logo-full-2x.png', __FILE__ ) ); ?>" alt="Akismet" />
     12 			</div>
     13 		</div>
     14 	</div>
     15 	<div class="akismet-lower">
     16 		<?php if ( Akismet::get_api_key() ) { ?>
     17 			<?php Akismet_Admin::display_status(); ?>
     18 		<?php } ?>
     19 		<?php if ( ! empty( $notices ) ) { ?>
     20 			<?php foreach ( $notices as $notice ) { ?>
     21 				<?php Akismet::view( 'notice', $notice ); ?>
     22 			<?php } ?>
     23 		<?php } ?>
     24 		<?php if ( $stat_totals && isset( $stat_totals['all'] ) && (int) $stat_totals['all']->spam > 0 ) : ?>
     25 			<div class="akismet-card">
     26 				<div class="akismet-section-header">
     27 					<div class="akismet-section-header__label">
     28 						<span><?php esc_html_e( 'Statistics' , 'akismet'); ?></span>
     29 					</div>
     30 					<div class="akismet-section-header__actions">
     31 						<a href="<?php echo esc_url( Akismet_Admin::get_page_url( 'stats' ) ); ?>">
     32 							<?php esc_html_e( 'Detailed Stats' , 'akismet');?>
     33 						</a>
     34 					</div>
     35 				</div>
     36 				
     37 				<div class="akismet-new-snapshot">
     38 					<iframe allowtransparency="true" scrolling="no" frameborder="0" style="width: 100%; height: 220px; overflow: hidden;" src="<?php printf( '//akismet.com/web/1.0/snapshot.php?blog=%s&api_key=%s&height=200&locale=%s', urlencode( get_option( 'home' ) ), Akismet::get_api_key(), get_locale() );?>"></iframe>
     39 					<ul>
     40 						<li>
     41 							<h3><?php esc_html_e( 'Past six months' , 'akismet');?></h3>
     42 							<span><?php echo number_format( $stat_totals['6-months']->spam );?></span>
     43 							<?php echo esc_html( _n( 'Spam blocked', 'Spam blocked', $stat_totals['6-months']->spam, 'akismet' ) ); ?>
     44 						</li>
     45 						<li>
     46 							<h3><?php esc_html_e( 'All time' , 'akismet');?></h3>
     47 							<span><?php echo number_format( $stat_totals['all']->spam );?></span>
     48 							<?php echo esc_html( _n( 'Spam blocked', 'Spam blocked', $stat_totals['all']->spam, 'akismet' ) ); ?>
     49 						</li>
     50 						<li>
     51 							<h3><?php esc_html_e( 'Accuracy' , 'akismet');?></h3>
     52 							<span><?php echo floatval( $stat_totals['all']->accuracy ); ?>%</span>
     53 							<?php printf( _n( '%s missed spam', '%s missed spam', $stat_totals['all']->missed_spam, 'akismet' ), number_format( $stat_totals['all']->missed_spam ) ); ?>
     54 							|
     55 							<?php printf( _n( '%s false positive', '%s false positives', $stat_totals['all']->false_positives, 'akismet' ), number_format( $stat_totals['all']->false_positives ) ); ?>
     56 						</li>
     57 					</ul>
     58 				</div>
     59 			</div>
     60 		<?php endif;?>
     61 
     62 		<?php if ( $akismet_user ) : ?>
     63 			<div class="akismet-card">
     64 				<div class="akismet-section-header">
     65 					<div class="akismet-section-header__label">
     66 						<span><?php esc_html_e( 'Settings' , 'akismet'); ?></span>
     67 					</div>
     68 				</div>
     69 
     70 				<div class="inside">
     71 					<form action="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>" method="POST">
     72 						<table cellspacing="0" class="akismet-settings">
     73 							<tbody>
     74 								<?php if ( ! Akismet::predefined_api_key() ) { ?>
     75 								<tr>
     76 									<th class="akismet-api-key" width="10%" align="left" scope="row"><?php esc_html_e('API Key', 'akismet');?></th>
     77 									<td width="5%"/>
     78 									<td align="left">
     79 										<span class="api-key"><input id="key" name="key" type="text" size="15" value="<?php echo esc_attr( get_option('wordpress_api_key') ); ?>" class="<?php echo esc_attr( 'regular-text code ' . $akismet_user->status ); ?>"></span>
     80 									</td>
     81 								</tr>
     82 								<?php } ?>
     83 								<?php if ( isset( $_GET['ssl_status'] ) ) { ?>
     84 									<tr>
     85 										<th align="left" scope="row"><?php esc_html_e( 'SSL Status', 'akismet' ); ?></th>
     86 										<td></td>
     87 										<td align="left">
     88 											<p>
     89 												<?php
     90 
     91 												if ( ! wp_http_supports( array( 'ssl' ) ) ) {
     92 													?><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
     93 												}
     94 												else {
     95 													$ssl_disabled = get_option( 'akismet_ssl_disabled' );
     96 
     97 													if ( $ssl_disabled ) {
     98 														?><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
     99 													}
    100 													else {
    101 														?><b><?php esc_html_e( 'Enabled.', 'akismet' ); ?></b> <?php esc_html_e( 'All systems functional.', 'akismet' ); ?><?php
    102 													}
    103 												}
    104 
    105 												?>
    106 											</p>
    107 										</td>
    108 									</tr>
    109 								<?php } ?>
    110 								<tr>
    111 									<th align="left" scope="row"><?php esc_html_e('Comments', 'akismet');?></th>
    112 									<td></td>
    113 									<td align="left">
    114 										<p>
    115 											<label for="akismet_show_user_comments_approved" title="<?php esc_attr_e( 'Show approved comments' , 'akismet'); ?>">
    116 												<input
    117 													name="akismet_show_user_comments_approved"
    118 													id="akismet_show_user_comments_approved"
    119 													value="1"
    120 													type="checkbox"
    121 													<?php
    122 													
    123 													// If the option isn't set, or if it's enabled ('1'), or if it was enabled a long time ago ('true'), check the checkbox.
    124 													checked( true, ( in_array( get_option( 'akismet_show_user_comments_approved' ), array( false, '1', 'true' ), true ) ) );
    125 													
    126 													?>
    127 													/>
    128 												<?php esc_html_e( 'Show the number of approved comments beside each comment author', 'akismet' ); ?>
    129 											</label>
    130 										</p>
    131 									</td>
    132 								</tr>
    133 								<tr>
    134 									<th class="strictness" align="left" scope="row"><?php esc_html_e('Strictness', 'akismet'); ?></th>
    135 									<td></td>
    136 									<td align="left">
    137 										<fieldset><legend class="screen-reader-text"><span><?php esc_html_e('Akismet anti-spam strictness', 'akismet'); ?></span></legend>
    138 										<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>
    139 										<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>
    140 										</fieldset>
    141 										<span class="akismet-note"><strong><?php esc_html_e('Note:', 'akismet');?></strong>
    142 										<?php
    143 									
    144 										$delete_interval = max( 1, intval( apply_filters( 'akismet_delete_comment_interval', 15 ) ) );
    145 									
    146 										printf(
    147 											_n(
    148 												'Spam in the <a href="%1$s">spam folder</a> older than 1 day is deleted automatically.',
    149 												'Spam in the <a href="%1$s">spam folder</a> older than %2$d days is deleted automatically.',
    150 												$delete_interval,
    151 												'akismet'
    152 											),
    153 											admin_url( 'edit-comments.php?comment_status=spam' ),
    154 											$delete_interval
    155 										);
    156 									
    157 										?>
    158 									</td>
    159 								</tr>
    160 								<tr>
    161 									<th class="comment-form-privacy-notice" align="left" scope="row"><?php esc_html_e('Privacy', 'akismet'); ?></th>
    162 									<td></td>
    163 									<td align="left">
    164 										<fieldset><legend class="screen-reader-text"><span><?php esc_html_e('Akismet privacy notice', 'akismet'); ?></span></legend>
    165 										<p><label for="akismet_comment_form_privacy_notice_display"><input type="radio" name="akismet_comment_form_privacy_notice" id="akismet_comment_form_privacy_notice_display" value="display" <?php checked('display', get_option('akismet_comment_form_privacy_notice')); ?> /> <?php esc_html_e('Display a privacy notice under your comment forms.', 'akismet'); ?></label></p>
    166 										<p><label for="akismet_comment_form_privacy_notice_hide"><input type="radio" name="akismet_comment_form_privacy_notice" id="akismet_comment_form_privacy_notice_hide" value="hide" <?php echo in_array( get_option('akismet_comment_form_privacy_notice'), array('display', 'hide') ) ? checked('hide', get_option('akismet_comment_form_privacy_notice'), false) : 'checked="checked"'; ?> /> <?php esc_html_e('Do not display privacy notice.', 'akismet'); ?></label></p>
    167 										</fieldset>
    168 										<span class="akismet-note"><?php esc_html_e( 'To help your site with transparency under privacy laws like the GDPR, Akismet can display a notice to your users under your comment forms. This feature is disabled by default, however, you can turn it on above.', 'akismet' );?></span>
    169 									</td>
    170 								</tr>
    171 							</tbody>
    172 						</table>
    173 						<div class="akismet-card-actions">
    174 							<?php if ( ! Akismet::predefined_api_key() ) { ?>
    175 							<div id="delete-action">
    176 								<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>
    177 							</div>
    178 							<?php } ?>
    179 							<?php wp_nonce_field(Akismet_Admin::NONCE) ?>
    180 							<div id="publishing-action">
    181 								<input type="hidden" name="action" value="enter-key">
    182 								<input type="submit" name="submit" id="submit" class="akismet-button akismet-could-be-primary" value="<?php esc_attr_e('Save Changes', 'akismet');?>">
    183 							</div>
    184 							<div class="clear"></div>
    185 						</div>
    186 					</form>
    187 				</div>
    188 			</div>
    189 			
    190 			<?php if ( ! Akismet::predefined_api_key() ) { ?>
    191 				<div class="akismet-card">
    192 					<div class="akismet-section-header">
    193 						<div class="akismet-section-header__label">
    194 							<span><?php esc_html_e( 'Account' , 'akismet'); ?></span>
    195 						</div>
    196 					</div>
    197 				
    198 					<div class="inside">
    199 						<table cellspacing="0" border="0" class="akismet-settings">
    200 							<tbody>
    201 								<tr>
    202 									<th scope="row" align="left"><?php esc_html_e( 'Subscription Type' , 'akismet');?></th>
    203 									<td width="5%"/>
    204 									<td align="left">
    205 										<p><?php echo esc_html( $akismet_user->account_name ); ?></p>
    206 									</td>
    207 								</tr>
    208 								<tr>
    209 									<th scope="row" align="left"><?php esc_html_e( 'Status' , 'akismet');?></th>
    210 									<td width="5%"/>
    211 									<td align="left">
    212 										<p><?php 
    213 											if ( 'cancelled' == $akismet_user->status ) :
    214 												esc_html_e( 'Cancelled', 'akismet' ); 
    215 											elseif ( 'suspended' == $akismet_user->status ) :
    216 												esc_html_e( 'Suspended', 'akismet' );
    217 											elseif ( 'missing' == $akismet_user->status ) :
    218 												esc_html_e( 'Missing', 'akismet' ); 
    219 											elseif ( 'no-sub' == $akismet_user->status ) :
    220 												esc_html_e( 'No Subscription Found', 'akismet' );
    221 											else :
    222 												esc_html_e( 'Active', 'akismet' );  
    223 											endif; ?></p>
    224 									</td>
    225 								</tr>
    226 								<?php if ( $akismet_user->next_billing_date ) : ?>
    227 								<tr>
    228 									<th scope="row" align="left"><?php esc_html_e( 'Next Billing Date' , 'akismet');?></th>
    229 									<td width="5%"/>
    230 									<td align="left">
    231 										<p><?php echo date( 'F j, Y', $akismet_user->next_billing_date ); ?></p>
    232 									</td>
    233 								</tr>
    234 								<?php endif; ?>
    235 							</tbody>
    236 						</table>
    237 						<div class="akismet-card-actions">
    238 							<div id="publishing-action">
    239 								<?php Akismet::view( 'get', array( 'text' => ( $akismet_user->account_type == 'free-api-key' && $akismet_user->status == 'active' ? __( 'Upgrade' , 'akismet') : __( 'Change' , 'akismet') ), 'redirect' => 'upgrade' ) ); ?>
    240 							</div>
    241 							<div class="clear"></div>
    242 						</div>
    243 					</div>
    244 				</div>
    245 			<?php } ?>
    246 		<?php endif;?>
    247 	</div>
    248 </div>