WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/comments popup script

Description

Outputs the JavaScript code for a comments popup window. Used in single file with comments_popup_link(), this tag can be used anywhere within a template, though is typically placed within the <head> portion of a page.

Usage

 <?php comments_popup_script(widthheight'file'); ?> 

Example

Sets the popup window's width to 400 pixels, and height to 500 pixels.

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

Parameters

width
(integer) (optional) The width of the popup window.
Default: 400 (pixels)
height
(integer) (optional) The height of the popup window.
Default: 400 (pixels)
file
(string) (optional) Sets the location of the popup window.
Default: None

Changelog

  •  ? : Added the file parameter.
  • Since: 0.7

Source Code

comments_popup_script() is located in wp-includes/comment-template.php.

Related

Comments Functions

See also index of Function Reference and index of Template Tags.