comments_popup_script

The timeline below displays how wordpress function comments_popup_script has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 4.6

/**
 * Display the JS popup script to show a comment.
 *
 * @since 0.71
 * @deprecated 4.5.0
 */
function comments_popup_script()
{
    _deprecated_function(__FUNCTION__, '4.5.0');
}

WordPress Version: 4.5

/**
 * Display the JS popup script to show a comment.
 *
 * @since 0.71
 * @deprecated 4.5.0
 */
function comments_popup_script()
{
    _deprecated_function(__FUNCTION__, '4.5');
}

WordPress Version: 3.7

/**
 * Display 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.
 *
 * For the comment link popup to work, this function has to be called or the
 * normal comment link will be assumed.
 *
 * @global string $wpcommentspopupfile  The URL to use for the popup window.
 * @global int    $wpcommentsjavascript Whether to use JavaScript. Set when function is called.
 *
 * @since 0.71
 *
 * @param int $width  Optional. The width of the popup window. Default 400.
 * @param int $height Optional. The height of the popup window. Default 400.
 * @param string $file Optional. Sets the location of the popup window.
 */
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;
}