Created
February 24, 2011 20:38
-
-
Save silentworks/842839 to your computer and use it in GitHub Desktop.
fix issue within Wordpress 3.1 edit panel and frontend view.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Mark entries in index to replace comments link. | |
/* Patched with version check for WP 3.1 */ | |
function dsq_comments_number($count) { | |
global $post, $wp_version; | |
$ver_check = explode('.', $wp_version); | |
if($ver_check[0] <= 3 && $ver_check[1] < 1){ | |
if ( dsq_can_replace() ) { | |
return '<span class="dsq-postid" rel="'.htmlspecialchars(dsq_identifier_for_post($post)).'">'.$count.'</span>'; | |
} else { | |
return $count; | |
} | |
} else { | |
return $count; | |
} | |
} | |
/* Patched with version check for WP 3.1 */ | |
function dsq_comments_text($comment_text) { | |
global $post, $wp_version; | |
$ver_check = explode('.', $wp_version); | |
if($ver_check[0] <= 3 && $ver_check[1] < 1){ | |
if ( dsq_can_replace() ) { | |
return '<span class="dsq-postid" rel="'.htmlspecialchars(dsq_identifier_for_post($post)).'">View Comments</span>'; | |
} else { | |
return $comment_text; | |
} | |
} else { | |
return $comment_text; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment