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:
parent
0b14400644
commit
16782edd03
|
@ -71,13 +71,10 @@ setTimeout("redirect();", 600);
|
||||||
} // redirect
|
} // redirect
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
<?php if ($xfn) : ?>
|
||||||
<script language="javascript" type="text/javascript">
|
<script language="javascript" type="text/javascript">
|
||||||
//<![CDATA[
|
//<![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) {
|
function GetElementsWithClassName(elementName, className) {
|
||||||
var allElements = document.getElementsByTagName(elementName);
|
var allElements = document.getElementsByTagName(elementName);
|
||||||
var elemColl = new Array();
|
var elemColl = new Array();
|
||||||
|
@ -131,16 +128,14 @@ function blurry() {
|
||||||
window.onload = blurry;
|
window.onload = blurry;
|
||||||
//]]>
|
//]]>
|
||||||
</script>
|
</script>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php wp_admin_head(); ?>
|
<?php wp_admin_head(); ?>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1 id="wphead"><a href="http://wordpress.org" rel="external" title="<?php _e('Visit WordPress.org') ?>"><?php _e('WordPress') ?></a></h1>
|
<h1 id="wphead"><a href="http://wordpress.org" rel="external" title="<?php _e('Visit WordPress.org') ?>"><?php _e('WordPress') ?></a></h1>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ($profile==0) {
|
require('./menu.php');
|
||||||
include('menu.php');
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<?php
|
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
|
@ -59,6 +59,8 @@ for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
||||||
$link_url = stripslashes($_GET['linkurl']);
|
$link_url = stripslashes($_GET['linkurl']);
|
||||||
$link_name = htmlentities(stripslashes(urldecode($_GET['name'])));
|
$link_name = htmlentities(stripslashes(urldecode($_GET['name'])));
|
||||||
|
|
||||||
|
|
||||||
|
$xfn = true;
|
||||||
require('admin-header.php');
|
require('admin-header.php');
|
||||||
?>
|
?>
|
||||||
<ul id="adminmenu2">
|
<ul id="adminmenu2">
|
||||||
|
@ -70,6 +72,9 @@ require('admin-header.php');
|
||||||
<style type="text/css" media="screen">
|
<style type="text/css" media="screen">
|
||||||
th { text-align: right; }
|
th { text-align: right; }
|
||||||
</style>
|
</style>
|
||||||
|
<?php if ($_GET['added']) : ?>
|
||||||
|
<div class="updated"><p>Link added.</p></div>
|
||||||
|
<?php endif; ?>
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<h2><?php _e('<strong>Add</strong> a link:') ?> <?php echo gethelp_link($this_file,'add_a_link');?></h2>
|
<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">
|
<form name="addlink" method="post" action="link-manager.php">
|
||||||
|
|
|
@ -202,7 +202,7 @@ switch ($action) {
|
||||||
. addslashes($link_image) . "', '$link_target', $link_category, '"
|
. 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')");
|
. 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;
|
break;
|
||||||
} // end Add
|
} // end Add
|
||||||
|
|
||||||
|
@ -288,6 +288,7 @@ switch ($action) {
|
||||||
case 'linkedit':
|
case 'linkedit':
|
||||||
{
|
{
|
||||||
$standalone=0;
|
$standalone=0;
|
||||||
|
$xfn = true;
|
||||||
include_once ('admin-header.php');
|
include_once ('admin-header.php');
|
||||||
if ($user_level < get_settings('links_minadminlevel')) {
|
if ($user_level < get_settings('links_minadminlevel')) {
|
||||||
die(__('You do not have sufficient permissions to edit the links for this blog.'));
|
die(__('You do not have sufficient permissions to edit the links for this blog.'));
|
||||||
|
|
Loading…
Reference in New Issue