Definition:
function links_popup_script($text = 'Links', $width=400, $height=400, $file='links.all.php', $count = true) {}
Show the link to the links popup and the number of links.
Parameters
- string $text: the text of the link
- int $width: the width of the popup window
- int $height: the height of the popup window
- string $file: the page to open in the popup window
- bool $count: the number of links in the db
Source code
function links_popup_script($text = 'Links', $width=400, $height=400, $file='links.all.php', $count = true) {
_deprecated_function( __FUNCTION__, '2.1' );
if ( $count )
$counts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->links");
$javascript = "<a href=\"#\" onclick=\"javascript:window.open('$file?popup=1', '_blank', 'width=$width,height=$height,scrollbars=yes,status=no'); return false\">";
$javascript .= $text;
if ( $count )
$javascript .= " ($counts)";
$javascript .= "</a>\n\n";
echo $javascript;
}
2249

February 12, 2011 


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