Only put javascript on pages that need it.

git-svn-id: http://svn.automattic.com/wordpress/trunk@1200 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2004-04-28 05:34:50 +00:00
parent 0b14400644
commit 16782edd03
3 changed files with 11 additions and 10 deletions

View File

@ -71,13 +71,10 @@ setTimeout("redirect();", 600);
} // redirect
?>
<?php if ($xfn) : ?>
<script language="javascript" type="text/javascript">
//<![CDATA[
function helpWindow(url) {
window.open(url, "Help", "width=640, height=450, location=0, menubar=0, resizable=0, scrollbars=1, status=1, titlebar=0, toolbar=0, screenX=60, left=60, screenY=60, top=60");
}
function GetElementsWithClassName(elementName, className) {
var allElements = document.getElementsByTagName(elementName);
var elemColl = new Array();
@ -131,16 +128,14 @@ function blurry() {
window.onload = blurry;
//]]>
</script>
<?php endif; ?>
<?php wp_admin_head(); ?>
</head>
<body>
<h1 id="wphead"><a href="http://wordpress.org" rel="external" title="<?php _e('Visit WordPress.org') ?>"><?php _e('WordPress') ?></a></h1>
<?php
if ($profile==0) {
include('menu.php');
}
?>
<?php
require('./menu.php');
endif;
?>

View File

@ -59,6 +59,8 @@ for ($i=0; $i<count($wpvarstoreset); $i += 1) {
$link_url = stripslashes($_GET['linkurl']);
$link_name = htmlentities(stripslashes(urldecode($_GET['name'])));
$xfn = true;
require('admin-header.php');
?>
<ul id="adminmenu2">
@ -70,6 +72,9 @@ require('admin-header.php');
<style type="text/css" media="screen">
th { text-align: right; }
</style>
<?php if ($_GET['added']) : ?>
<div class="updated"><p>Link added.</p></div>
<?php endif; ?>
<div class="wrap">
<h2><?php _e('<strong>Add</strong> a link:') ?> <?php echo gethelp_link($this_file,'add_a_link');?></h2>
<form name="addlink" method="post" action="link-manager.php">

View File

@ -202,7 +202,7 @@ switch ($action) {
. addslashes($link_image) . "', '$link_target', $link_category, '"
. addslashes($link_description) . "', '$link_visible', $user_ID, $link_rating, '" . addslashes($link_rel) . "', '" . addslashes($link_notes) . "', '$link_rss_uri')");
header('Location: ' . $_SERVER['HTTP_REFERER']);
header('Location: ' . $_SERVER['HTTP_REFERER'] . '?added=true');
break;
} // end Add
@ -288,6 +288,7 @@ switch ($action) {
case 'linkedit':
{
$standalone=0;
$xfn = true;
include_once ('admin-header.php');
if ($user_level < get_settings('links_minadminlevel')) {
die(__('You do not have sufficient permissions to edit the links for this blog.'));