comments_popup_script() │ WP 0.71

Deprecated since 4.5.0. It is no longer supported and may be removed in future releases. It is recommended to replace this function with the same one.

Outputs JavaScript code for the correct operation of the comments_popup_link() comment-popup function.

This function can be used anywhere on a template page. It is usually placed in the header.php file inside the <head> block.

No Hooks.

Returns

null.

Usage

<?php comments_popup_script($width, $height, $file); ?>
$width(integer)
The popup width. The specified size is in pixels.
Default: 400
$height(integer)
The popup height. The specified size is in pixels.
Default: 400
$file(string)
Popup location.
Default: ''

Examples

#1 Set the popup dimensions

Set the commenting popup dimensions to 400 pixels wide and 500 pixels high.

<?php comments_popup_script(400, 500); ?>

Output:

<script type='text/javascript'>
function wpopen (macagna) {
	window.open(macagna, '_blank', 'width=400,height=500,scrollbars=yes,status=yes');
}
</script>

Changelog

Since 0.71 Introduced.
Deprecated since 4.5.0

comments_popup_script() code WP 7.1.2

function comments_popup_script() {
	_deprecated_function( __FUNCTION__, '4.5.0' );
}