Changeset 36997

Show
Ignore:
Timestamp:
03/31/08 04:11:56 (4 months ago)
Author:
alexkingorg
Message:

WP 2.5 compatibility

Location:
delink-comment-author/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • delink-comment-author/trunk/README.txt

    r19883 r36997  
    33Contributors: alexkingorg 
    44Requires at least: 2.2 
    5 Tested up to: 2.3 
    6 Stable tag: 1.1 
     5Tested up to: 2.5 
     6Stable tag: 1.2 
    77 
    88Delink Comment Author gives you the ability to remove the link a commenter left as their URL without removing the entire comment. 
  • delink-comment-author/trunk/delink-comment-author.php

    r19883 r36997  
    2121Author: Alex King 
    2222Author URI: http://alexking.org 
    23 Version: 1.1 
     23Version: 1.2 
    2424*/  
    2525 
     
    3939 
    4040function akdca_admin_footer() { 
    41       print(" 
     41      global $wp_version; 
     42      if (isset($wp_version) && version_compare($wp_version, '2.5', '>=')) { 
     43            print(" 
     44<script type=\"text/javascript\"> 
     45jQuery('#the-comment-list tr[@id^=comment]').each(function() { 
     46      var id = jQuery(this).attr('id').replace('comment-', ''); 
     47      jQuery(this).children('td.action-links').append(' | <a href=\"".get_bloginfo('wpurl')."/wp-admin/index.php?ak_action=delink_comment_author&comment_id=' + id + '\">Delink Comment Author</a>'); 
     48}); 
     49</script> 
     50            "); 
     51      } 
     52      else { 
     53            print(" 
    4254<script type=\"text/javascript\"> 
    4355jQuery('#the-comment-list li[@id^=comment]').each(function() { 
     
    4658}); 
    4759</script> 
    48       "); 
     60            "); 
     61      } 
    4962} 
    5063