Fix comments popup template load. Bug 545.

git-svn-id: http://svn.automattic.com/wordpress/trunk@1960 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
rboren 2004-12-15 02:03:08 +00:00
parent ea392f4b13
commit 914be4bf02
1 changed files with 3 additions and 4 deletions

View File

@ -75,14 +75,13 @@ function comments_link($file='', $echo=true) {
else echo get_permalink() . '#comments';
}
function comments_popup_script($width=400, $height=400, $file='wp-comments-popup.php') {
function comments_popup_script($width=400, $height=400, $file='') {
global $wpcommentspopupfile, $wptrackbackpopupfile, $wppingbackpopupfile, $wpcommentsjavascript;
if (empty ($file)) {
$template = get_template_directory();
$template .= '/comments-popup.php';
$template = TEMPLATEPATH . '/comments-popup.php';
if (file_exists($template)) {
$wpcommentspopupfile = $template;
$wpcommentspopupfile = str_replace(ABSPATH, '', $template);
} else {
$wpcommentspopupfile = 'wp-comments-popup.php';
}