home *** CD-ROM | disk | FTP | other *** search
/ HTML Examples / WP.iso / wordpress2 / wp-content / plugins / akismet / views / config.php next >
Encoding:
PHP Script  |  2017-08-10  |  10.2 KB  |  231 lines

  1. <div id="akismet-plugin-container">
  2.     <div class="akismet-masthead">
  3.         <div class="akismet-masthead__inside-container">
  4.             <div class="akismet-masthead__logo-container">
  5.                 <img class="akismet-masthead__logo" src="<?php echo esc_url( plugins_url( '../_inc/img/logo-full-2x.png', __FILE__ ) ); ?>" alt="Akismet" />
  6.             </div>
  7.         </div>
  8.     </div>
  9.     <div class="akismet-lower">
  10.         <?php if ( Akismet::get_api_key() ) { ?>
  11.             <?php Akismet_Admin::display_status(); ?>
  12.         <?php } ?>
  13.         <?php if ( ! empty( $notices ) ) { ?>
  14.             <?php foreach ( $notices as $notice ) { ?>
  15.                 <?php Akismet::view( 'notice', $notice ); ?>
  16.             <?php } ?>
  17.         <?php } ?>
  18.         <?php if ( $stat_totals && isset( $stat_totals['all'] ) && (int) $stat_totals['all']->spam > 0 ) : ?>
  19.             <div class="akismet-card">
  20.                 <div class="akismet-section-header">
  21.                     <div class="akismet-section-header__label">
  22.                         <span><?php esc_html_e( 'Statistics' , 'akismet'); ?></span>
  23.                     </div>
  24.                     <div class="akismet-section-header__actions">
  25.                         <a href="<?php echo esc_url( Akismet_Admin::get_page_url( 'stats' ) ); ?>">
  26.                             <?php esc_html_e( 'Detailed Stats' , 'akismet');?>
  27.                         </a>
  28.                     </div>
  29.                 </div>
  30.                 
  31.                 <div class="akismet-new-snapshot">
  32.                     <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>
  33.                     <ul>
  34.                         <li>
  35.                             <h3><?php esc_html_e( 'Past six months' , 'akismet');?></h3>
  36.                             <span><?php echo number_format( $stat_totals['6-months']->spam );?></span>
  37.                             <?php echo esc_html( _n( 'Spam blocked', 'Spam blocked', $stat_totals['6-months']->spam, 'akismet' ) ); ?>
  38.                         </li>
  39.                         <li>
  40.                             <h3><?php esc_html_e( 'All time' , 'akismet');?></h3>
  41.                             <span><?php echo number_format( $stat_totals['all']->spam );?></span>
  42.                             <?php echo esc_html( _n( 'Spam blocked', 'Spam blocked', $stat_totals['all']->spam, 'akismet' ) ); ?>
  43.                         </li>
  44.                         <li>
  45.                             <h3><?php esc_html_e( 'Accuracy' , 'akismet');?></h3>
  46.                             <span><?php echo floatval( $stat_totals['all']->accuracy ); ?>%</span>
  47.                             <?php printf( _n( '%s missed spam', '%s missed spam', $stat_totals['all']->missed_spam, 'akismet' ), number_format( $stat_totals['all']->missed_spam ) ); ?>
  48.                             |
  49.                             <?php printf( _n( '%s false positive', '%s false positives', $stat_totals['all']->false_positives, 'akismet' ), number_format( $stat_totals['all']->false_positives ) ); ?>
  50.                         </li>
  51.                     </ul>
  52.                 </div>
  53.             </div>
  54.         <?php endif;?>
  55.  
  56.         <?php if ( $akismet_user ):?>
  57.             <div class="akismet-card">
  58.                 <div class="akismet-section-header">
  59.                     <div class="akismet-section-header__label">
  60.                         <span><?php esc_html_e( 'Settings' , 'akismet'); ?></span>
  61.                     </div>
  62.                 </div>
  63.  
  64.                 <div class="inside">
  65.                     <form action="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>" method="POST">
  66.                         <table cellspacing="0" class="akismet-settings">
  67.                             <tbody>
  68.                                 <?php if ( ! Akismet::predefined_api_key() ) { ?>
  69.                                 <tr>
  70.                                     <th class="akismet-api-key" width="10%" align="left" scope="row"><?php esc_html_e('API Key', 'akismet');?></th>
  71.                                     <td width="5%"/>
  72.                                     <td align="left">
  73.                                         <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>
  74.                                     </td>
  75.                                 </tr>
  76.                                 <?php } ?>
  77.                                 <?php if ( isset( $_GET['ssl_status'] ) ) { ?>
  78.                                     <tr>
  79.                                         <th align="left" scope="row"><?php esc_html_e( 'SSL Status', 'akismet' ); ?></th>
  80.                                         <td></td>
  81.                                         <td align="left">
  82.                                             <p>
  83.                                                 <?php
  84.  
  85.                                                 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'); ?>">
  110.                                                 <input
  111.                                                     name="akismet_show_user_comments_approved"
  112.                                                     id="akismet_show_user_comments_approved"
  113.                                                     value="1"
  114.                                                     type="checkbox"
  115.                                                     <?php
  116.                                                     
  117.                                                     // 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.
  118.                                                     checked( true, ( in_array( get_option( 'akismet_show_user_comments_approved' ), array( false, '1', 'true' ), true ) ) );
  119.                                                     
  120.                                                     ?>
  121.                                                     />
  122.                                                 <?php esc_html_e( 'Show the number of approved comments beside each comment author', 'akismet' ); ?>
  123.                                             </label>
  124.                                         </p>
  125.                                     </td>
  126.                                 </tr>
  127.                                 <tr>
  128.                                     <th class="strictness" align="left" scope="row"><?php esc_html_e('Strictness', 'akismet'); ?></th>
  129.                                     <td></td>
  130.                                     <td align="left">
  131.                                         <fieldset><legend class="screen-reader-text"><span><?php esc_html_e('Akismet anti-spam strictness', 'akismet'); ?></span></legend>
  132.                                         <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>
  133.                                         <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>
  134.                                         </fieldset>
  135.                                         <span class="akismet-note"><strong><?php esc_html_e('Note:', 'akismet');?></strong>
  136.                                         <?php
  137.                                     
  138.                                         $delete_interval = max( 1, intval( apply_filters( 'akismet_delete_comment_interval', 15 ) ) );
  139.                                     
  140.                                         printf(
  141.                                             _n(
  142.                                                 'Spam in the <a href="%1$s">spam folder</a> older than 1 day is deleted automatically.',
  143.                                                 'Spam in the <a href="%1$s">spam folder</a> older than %2$d days is deleted automatically.',
  144.                                                 $delete_interval,
  145.                                                 'akismet'
  146.                                             ),
  147.                                             admin_url( 'edit-comments.php?comment_status=spam' ),
  148.                                             $delete_interval
  149.                                         );
  150.                                     
  151.                                         ?>
  152.                                     </td>
  153.                                 </tr>
  154.                             </tbody>
  155.                         </table>
  156.                         <div class="akismet-card-actions">
  157.                             <?php if ( ! Akismet::predefined_api_key() ) { ?>
  158.                             <div id="delete-action">
  159.                                 <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>
  160.                             </div>
  161.                             <?php } ?>
  162.                             <?php wp_nonce_field(Akismet_Admin::NONCE) ?>
  163.                             <div id="publishing-action">
  164.                                 <input type="hidden" name="action" value="enter-key">
  165.                                 <input type="submit" name="submit" id="submit" class="akismet-button akismet-is-primary" value="<?php esc_attr_e('Save Changes', 'akismet');?>">
  166.                             </div>
  167.                             <div class="clear"></div>
  168.                         </div>
  169.                     </form>
  170.                 </div>
  171.             </div>
  172.             
  173.             <?php if ( ! Akismet::predefined_api_key() ) { ?>
  174.                 <div class="akismet-card">
  175.                     <div class="akismet-section-header">
  176.                         <div class="akismet-section-header__label">
  177.                             <span><?php esc_html_e( 'Account' , 'akismet'); ?></span>
  178.                         </div>
  179.                     </div>
  180.                 
  181.                     <div class="inside">
  182.                         <table cellspacing="0" border="0" class="akismet-settings">
  183.                             <tbody>
  184.                                 <tr>
  185.                                     <th scope="row" align="left"><?php esc_html_e( 'Subscription Type' , 'akismet');?></th>
  186.                                     <td width="5%"/>
  187.                                     <td align="left">
  188.                                         <p><?php echo esc_html( $akismet_user->account_name ); ?></p>
  189.                                     </td>
  190.                                 </tr>
  191.                                 <tr>
  192.                                     <th scope="row" align="left"><?php esc_html_e( 'Status' , 'akismet');?></th>
  193.                                     <td width="5%"/>
  194.                                     <td align="left">
  195.                                         <p><?php 
  196.                                             if ( 'cancelled' == $akismet_user->status ) :
  197.                                                 esc_html_e( 'Cancelled', 'akismet' ); 
  198.                                             elseif ( 'suspended' == $akismet_user->status ) :
  199.                                                 esc_html_e( 'Suspended', 'akismet' );
  200.                                             elseif ( 'missing' == $akismet_user->status ) :
  201.                                                 esc_html_e( 'Missing', 'akismet' ); 
  202.                                             elseif ( 'no-sub' == $akismet_user->status ) :
  203.                                                 esc_html_e( 'No Subscription Found', 'akismet' );
  204.                                             else :
  205.                                                 esc_html_e( 'Active', 'akismet' );  
  206.                                             endif; ?></p>
  207.                                     </td>
  208.                                 </tr>
  209.                                 <?php if ( $akismet_user->next_billing_date ) : ?>
  210.                                 <tr>
  211.                                     <th scope="row" align="left"><?php esc_html_e( 'Next Billing Date' , 'akismet');?></th>
  212.                                     <td width="5%"/>
  213.                                     <td align="left">
  214.                                         <p><?php echo date( 'F j, Y', $akismet_user->next_billing_date ); ?></p>
  215.                                     </td>
  216.                                 </tr>
  217.                                 <?php endif; ?>
  218.                             </tbody>
  219.                         </table>
  220.                         <div class="akismet-card-actions">
  221.                             <div id="publishing-action">
  222.                                 <?php Akismet::view( 'get', array( 'text' => ( $akismet_user->account_type == 'free-api-key' && $akismet_user->status == 'active' ? __( 'Upgrade' , 'akismet') : __( 'Change' , 'akismet') ), 'redirect' => 'upgrade' ) ); ?>
  223.                             </div>
  224.                             <div class="clear"></div>
  225.                         </div>
  226.                     </div>
  227.                 </div>
  228.             <?php } ?>
  229.         <?php endif;?>
  230.     </div>
  231. </div>