Definition:
function comments_popup_script($width=400, $height=400, $file='') {}
Displays the JS popup script to show a comment.
If the $file parameter is empty, then the home page is assumed. The defaults for the window are 400px by 400px.
Parameters
- int $width: Optional. The width of the popup window
- int $height: Optional. The height of the popup window
- string $file: Optional. Sets the location of the popup window
Source code
function comments_popup_script($width=400, $height=400, $file='') {
global $wpcommentspopupfile, $wpcommentsjavascript;
if (empty ($file)) {
$wpcommentspopupfile = ''; // Use the index.
} else {
$wpcommentspopupfile = $file;
}
$wpcommentsjavascript = 1;
$javascript = "<script type='text/javascript'>\nfunction wpopen (macagna) {\n window.open(macagna, '_blank', 'width=$width,height=$height,scrollbars=yes,status=yes');\n}\n</script>\n";
echo $javascript;
}
653

February 11, 2011 


No comments yet... Be the first to leave a reply!