~ubuntu-branches/ubuntu/lucid/wordpress/lucid-security

« back to all changes in this revision

Viewing changes to wp-admin/admin-header.php

  • Committer: Bazaar Package Importer
  • Author(s): Michael Bienia
  • Date: 2009-08-14 13:32:33 UTC
  • mfrom: (11.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20090814133233-n1qy24xncscu6yvj
Tags: 2.8.3-2ubuntu1
* Merge from debian unstable, remaining changes:
  - debian/apache.conf:
    + Changed to use /var/www instead of /srv/www for virtual webroot.
  - debian/setup-mysql:
    + Changed to use /var/www instead of /srv/www.

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
if (!isset($_GET["page"])) require_once('admin.php');
11
11
 
12
12
get_admin_page_title();
13
 
$title = wp_specialchars( strip_tags( $title ) );
 
13
$title = esc_html( strip_tags( $title ) );
14
14
wp_user_settings();
 
15
wp_menu_unfold();
15
16
?>
16
17
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
17
18
<html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>>
18
19
<head>
19
20
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
20
 
<title><?php bloginfo('name') ?> &rsaquo; <?php echo $title; ?> &#8212; WordPress</title>
 
21
<title><?php echo $title; ?> &lsaquo; <?php bloginfo('name') ?>  &#8212; WordPress</title>
21
22
<?php
22
23
 
23
24
wp_admin_css( 'css/global' );
24
25
wp_admin_css();
25
26
wp_admin_css( 'css/colors' );
26
27
wp_admin_css( 'css/ie' );
27
 
 
28
 
?>
29
 
<script type="text/javascript">
30
 
//<![CDATA[
31
 
addLoadEvent = function(func) {if (typeof jQuery != "undefined") jQuery(document).ready(func); else if (typeof wpOnload!='function'){wpOnload=func;} else {var oldonload=wpOnload; wpOnload=function(){oldonload();func();}}};
32
 
 
33
 
function convertEntities(o) {
34
 
        var c = function(s) {
35
 
                if (/&[^;]+;/.test(s)) {
36
 
                        var e = document.createElement("div");
37
 
                        e.innerHTML = s;
38
 
                        return !e.firstChild ? s : e.firstChild.nodeValue;
39
 
                }
40
 
                return s;
41
 
        }
42
 
 
43
 
        if ( typeof o === 'string' )
44
 
                return c(o);
45
 
        else if ( typeof o === 'object' )
46
 
                for (var v in o) {
47
 
                        if ( typeof o[v] === 'string' )
48
 
                                o[v] = c(o[v]);
49
 
                }
50
 
        return o;
51
 
};
52
 
//]]>
53
 
</script>
54
 
<?php
55
 
 
56
 
if ( in_array( $pagenow, array('post.php', 'post-new.php', 'page.php', 'page-new.php') ) ) {
57
 
        add_action( 'admin_head', 'wp_tiny_mce' );
58
 
}
 
28
wp_enqueue_script('utils');
59
29
 
60
30
$hook_suffix = '';
61
31
if ( isset($page_hook) )
65
35
else if ( isset($pagenow) )
66
36
        $hook_suffix = "$pagenow";
67
37
 
 
38
$admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix);
 
39
?>
 
40
<script type="text/javascript">
 
41
//<![CDATA[
 
42
addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
 
43
var userSettings = {'url':'<?php echo SITECOOKIEPATH; ?>','uid':'<?php if ( ! isset($current_user) ) $current_user = wp_get_current_user(); echo $current_user->ID; ?>','time':'<?php echo time() ?>'};
 
44
var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>', pagenow = '<?php echo substr($pagenow, 0, -4); ?>', adminpage = '<?php echo $admin_body_class; ?>';
 
45
//]]>
 
46
</script>
 
47
<?php
 
48
 
 
49
if ( in_array( $pagenow, array('post.php', 'post-new.php', 'page.php', 'page-new.php') ) ) {
 
50
        add_action( 'admin_print_footer_scripts', 'wp_tiny_mce', 25 );
 
51
        wp_enqueue_script('quicktags');
 
52
}
 
53
 
 
54
do_action('admin_enqueue_scripts', $hook_suffix);
68
55
do_action("admin_print_styles-$hook_suffix");
69
56
do_action('admin_print_styles');
70
57
do_action("admin_print_scripts-$hook_suffix");
72
59
do_action("admin_head-$hook_suffix");
73
60
do_action('admin_head');
74
61
 
 
62
if ( get_user_setting('mfold') == 'f' ) {
 
63
        $admin_body_class .= ' folded';
 
64
}
 
65
 
75
66
if ( $is_iphone ) { ?>
76
67
<style type="text/css">.row-actions{visibility:visible;}</style>
77
68
<?php } ?>
78
69
</head>
79
 
<body class="wp-admin <?php echo apply_filters( 'admin_body_class', '' ); ?>">
 
70
<body class="wp-admin no-js <?php echo apply_filters( 'admin_body_class', '' ) . " $admin_body_class"; ?>">
 
71
<script type="text/javascript">
 
72
//<![CDATA[
 
73
(function(){
 
74
var c = document.body.className;
 
75
c = c.replace(/no-js/, 'js');
 
76
document.body.className = c;
 
77
})();
 
78
//]]>
 
79
</script>
80
80
 
81
81
<div id="wpwrap">
82
82
<div id="wpcontent">
101
101
}
102
102
?>
103
103
 
104
 
<img id="header-logo" src="../wp-includes/images/blank.gif" alt="" width="32" height="32" /> <h1 <?php echo $title_class ?>><a href="<?php echo trailingslashit( get_bloginfo('url') ); ?>" title="<?php _e('Visit site') ?>"><?php echo $blog_name ?> <span>&larr; <?php _e('Visit site') ?></span></a></h1>
 
104
<img id="header-logo" src="../wp-includes/images/blank.gif" alt="" width="32" height="32" /> <h1 id="site-heading" <?php echo $title_class ?>><a href="<?php echo trailingslashit( get_bloginfo('url') ); ?>" title="<?php _e('Visit Site') ?>"><span id="site-title"><?php echo $blog_name ?></span> <em id="site-visit-button"><?php _e('Visit Site') ?></em></a></h1>
105
105
 
106
106
<div id="wphead-info">
107
107
<div id="user_info">
110
110
<a href="<?php echo wp_logout_url() ?>" title="<?php _e('Log Out') ?>"><?php _e('Log Out'); ?></a></p>
111
111
</div>
112
112
 
113
 
<?php favorite_actions(); ?>
114
 
</div>
115
 
</div>
116
 
 
117
 
<?php if ( get_user_setting('mfold') == 'f' ) { ?>
118
 
<script type="text/javascript">jQuery('#wpcontent').addClass('folded');</script>
119
 
<?php } ?>
 
113
<?php favorite_actions($hook_suffix); ?>
 
114
</div>
 
115
</div>
120
116
 
121
117
<div id="wpbody">
122
118
<?php require(ABSPATH . 'wp-admin/menu-header.php'); ?>