WordPress.org

Plugin Directory

Changeset 533234


Ignore:
Timestamp:
04/19/12 02:47:15 (2 years ago)
Author:
josephscott
Message:

Use two separate fields for the code and msg, instead a JSON string

File:
1 edited

Legend:

Unmodified
Added
Removed
  • akismet/trunk/admin.php

    r533158 r533234  
    299299        || ( !empty( $_GET['page'] ) && $_GET['page'] == 'akismet-stats-display' ) 
    300300    ) { 
    301         if ( get_option( 'akismet_alert' ) ) { 
     301        if ( get_option( 'akismet_alert_code' ) ) { 
    302302            function akismet_alert() { 
    303                 $alert = json_decode( get_option( 'akismet_alert' ), true ); 
    304                 $code = (int) $alert['code']; 
     303                $alert = array( 
     304                    'code' => (int) get_option( 'akismet_alert_code' ), 
     305                    'msg' => get_option( 'akismet_alert_msg' ) 
     306                ); 
    305307            ?> 
    306308                <div class='error'> 
    307                     <p><strong>Akismet Error Code: <?php echo $code; ?></strong></p> 
    308                     <p><?php esc_html_e( $alert['message'] ); ?></p> 
    309                     <p>More information is available at <a href="https://akismet.com/errors/<?php echo $code; ?>">https://akismet.com/errors/<?php echo $code; ?></a></p> 
     309                    <p><strong>Akismet Error Code: <?php echo $alert['code']; ?></strong></p> 
     310                    <p><?php esc_html_e( $alert['msg'] ); ?></p> 
     311                    <p>More information is available at <a href="https://akismet.com/errors/<?php echo $alert['code']; ?>">https://akismet.com/errors/<?php echo $alert['code']; ?></a></p> 
    310312                </div> 
    311313            <?php 
Note: See TracChangeset for help on using the changeset viewer.