Plugin Directory

Changeset 2788833

Timestamp:
09/22/2022 05:40:48 PM (23 months ago)
Author:
kbrownkd
Message:

Add an empty state for the Statistics section on the admin page.

Location:
akismet/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • akismet/trunk/akismet.php

    r2761923 r2788833  
    77Plugin URI: https://akismet.com/
    88Description: Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from spam</strong>. It keeps your site protected even while you sleep. To get started: activate the Akismet plugin and then go to your Akismet Settings page to set up your API key.
    9 Version: 5.0
     9Version: 5.0
    1010Author: Automattic
    1111Author URI: https://automattic.com/wordpress-plugins/
     
    3838}
    3939
    40 define( 'AKISMET_VERSION', '5.0' );
     40define( 'AKISMET_VERSION', '5.0' );
    4141define( 'AKISMET__MINIMUM_WP_VERSION', '5.0' );
    4242define( 'AKISMET__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
  • akismet/trunk/readme.txt

    r2761923 r2788833  
    3030
    3131== Changelog ==
     32
     33
     34
     35
     36
     37
    3238
    3339= 5.0 =
  • akismet/trunk/views/config.php

    r2709917 r2788833  
    2222            <?php } ?>
    2323        <?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                
     24
     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
     31            <?php if ( $stat_totals && isset( $stat_totals['all'] ) && (int) $stat_totals['all']->spam > 0 ) : ?>
     32                <div class="akismet-section-header__actions">
     33                    <a href="<?php echo esc_url( Akismet_Admin::get_page_url( 'stats' ) ); ?>">
     34                        <?php esc_html_e( 'Detailed Stats', 'akismet' ); ?>
     35                    </a>
     36                </div>
     37            </div> <!-- close akismet-section-header -->
     38
    3739                <div class="akismet-new-snapshot">
    3840                    <iframe allowtransparency="true" scrolling="no" frameborder="0" style="width: 100%; height: 220px; overflow: hidden;" src="<?php echo esc_url( sprintf( 'https://tools.akismet.com/1.0/snapshot.php?blog=%s&api_key=%s&height=200&locale=%s', urlencode( get_option( 'home' ) ), Akismet::get_api_key(), get_locale() ) ); ?>"></iframe>
     
    5658                        </li>
    5759                    </ul>
    58                 </div>
     60                </div> <!-- close akismet-new-snapshot -->
     61
     62            <?php else : ?>
     63            </div> <!-- close akismet-section-header -->
     64            <div class="inside">
     65                <p>Akismet is active and ready to stop spam. Your site's spam statistics will be displayed here.</p>
    5966            </div>
    60         <?php endif;?>
     67            <?php endif; ?>
     68
     69        </div> <!-- close akismet-card -->
    6170
    6271        <?php if ( $akismet_user ) : ?>
Note: See TracChangeset for help on using the changeset viewer.