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.


  • 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, '_blank', 'width=$width,height=$height,scrollbars=yes,status=yes');\n}\n</script>\n";

	echo $javascript;



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

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: