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.


  • 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=\"'$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;



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

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: