comments_popup_script [ WordPress Function ]
| Parameters: |
|
| Defined at: |
|
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.
For the comment link popup to work, this function has to be called or the normal comment link will be assumed.
Source
<?php
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;
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- Function Reference/comments popup script « WordPress Codex
Description. Outputs the JavaScript code for a comments popup window. Used in tandem with comments_popup_link(), this tag can be used anywhere within a ...
codex.wordpress.org - comments_popup_script | A HitchHackers guide through WordPress
Feb 11, 2011 ... function comments_popup_script($width=400, $height=400, $file='') { global $ wpcommentspopupfile, $wpcommentsjavascript; if (empty ($file)) ...
hitchhackerguide.com - comments_popup_script (WordPress Function) - WPSeek.com
WordPress lookup for comments_popup_script, a WordPress Function. wpseek. com is a WordPress-centric search tool for developers and theme authors.
wpseek.com - Make A Modal Comment Window in Wordpress
Jun 15, 2010 ... A little-used core feature is comments_popup_link() , which in conjunction with comments_popup_script() , generates a bit of Javascript to open ...
thri.ca