Plugin Directory

Changeset 875508


Ignore:
Timestamp:
03/14/2014 04:28:12 PM (12 years ago)
Author:
eoigal
Message:

Use admin_url to make sure have proper url

File:
1 edited

Legend:

Unmodified
Added
Removed
  • akismet/trunk/class.akismet-admin.php

    r875466 r875508  
    260260        global $submenu;
    261261       
    262         echo '<h3>' . esc_html( _x( 'Spam', 'comments' ) ) . '</h3>';       
    263        
    264         $link = isset( $submenu['edit-comments.php'] ) ? 'edit-comments.php' : 'edit.php';
     262        echo '<h3>' . esc_html( _x( 'Spam', 'comments' ) ) . '</h3>';   
    265263       
    266264        echo '<p>'.sprintf( _n(
     
    268266                '<a href="%1$s">Akismet</a> has protected your site from <a href="%2$s">%3$s spam comments</a>.',
    269267                $count
    270             ), 'http://akismet.com/?return=true', clean_url("$link?page=akismet-admin"), number_format_i18n($count) ).'</p>';
     268            ), 'http://akismet.com/?return=true', esc_url( add_query_arg( array( 'page' => 'akismet-admin' ), admin_url( isset( $submenu['edit-comments.php'] ) ? 'edit-comments.php' : 'edit.php' ) ) ), number_format_i18n($count) ).'</p>';
    271269    }
    272270   
     
    312310           
    313311        if ( function_exists('plugins_url') )
    314             $link = 'admin.php?action=akismet_recheck_queue';
     312            $link = add_query_arg( array( 'action' => 'akismet_recheck_queue' ), admin_url( 'admin.php' ) );
    315313        else
    316             $link = 'edit-comments.php?page=akismet-admin&recheckqueue=true&noheader=true';
    317            
    318         echo '</div><div class="alignleft"><a class="button-secondary checkforspam" href="' . $link . '">' . esc_html__('Check for Spam') . '</a>';
     314            $link = add_query_arg( array( 'page' => 'akismet-admin', 'recheckqueue' => 'true', 'noheader' => 'true' ), admin_url( 'edit-comments.php' ) );
     315           
     316        echo '</div><div class="alignleft"><a class="button-secondary checkforspam" href="' . esc_url( $link ) . '">' . esc_html__('Check for Spam') . '</a>';
    319317        echo '<img src="' . esc_url( admin_url( 'images/wpspin_light.gif' ) ) . '" class="checkforspam-spinner" />';
    320318    }
Note: See TracChangeset for help on using the changeset viewer.