| 1 | Index: wp-includes/admin-bar.php |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- wp-includes/admin-bar.php (revision 16029) |
|---|
| 4 | +++ wp-includes/admin-bar.php (working copy) |
|---|
| 5 | @@ -6,45 +6,31 @@ |
|---|
| 6 | */ |
|---|
| 7 | |
|---|
| 8 | /** |
|---|
| 9 | - * Instantiate the admin bar class and set it up as a global for access elsewhere. |
|---|
| 10 | + * Instantiate the admin bar object and set it up as a global for access elsewhere. |
|---|
| 11 | + * |
|---|
| 12 | + * @since 3.1.0 |
|---|
| 13 | + * @return bool Whether the admin bar was successfully initialized. |
|---|
| 14 | */ |
|---|
| 15 | function wp_admin_bar_init() { |
|---|
| 16 | - global $current_user, $pagenow, $wp_admin_bar; |
|---|
| 17 | + global $wp_admin_bar; |
|---|
| 18 | |
|---|
| 19 | - if ( ! show_admin_bar() ) |
|---|
| 20 | + if ( ! is_admin_bar_showing() ) |
|---|
| 21 | return false; |
|---|
| 22 | |
|---|
| 23 | - /* Set the protocol constant used throughout this code */ |
|---|
| 24 | - if ( !defined( 'PROTO' ) ) |
|---|
| 25 | - if ( is_ssl() ) define( 'PROTO', 'https://' ); else define( 'PROTO', 'http://' ); |
|---|
| 26 | - |
|---|
| 27 | - /* Don't load the admin bar if the user is not logged in */ |
|---|
| 28 | - if ( !is_user_logged_in() ) |
|---|
| 29 | - return false; |
|---|
| 30 | - |
|---|
| 31 | - /* Set up the settings we need to render menu items */ |
|---|
| 32 | - if ( !is_object( $current_user ) ) |
|---|
| 33 | - $current_user = wp_get_current_user(); |
|---|
| 34 | - |
|---|
| 35 | - /* Enqueue the JS files for the admin bar. */ |
|---|
| 36 | - wp_enqueue_script( 'jquery', false, false, false, true ); |
|---|
| 37 | - |
|---|
| 38 | /* Load the admin bar class code ready for instantiation */ |
|---|
| 39 | require( ABSPATH . WPINC . '/admin-bar/admin-bar-class.php' ); |
|---|
| 40 | |
|---|
| 41 | - /* Only load super admin menu code if the logged in user is a super admin */ |
|---|
| 42 | - if ( is_super_admin() ) { |
|---|
| 43 | - require( ABSPATH . WPINC . '/admin-bar/admin-bar-debug.php' ); |
|---|
| 44 | - require( ABSPATH . WPINC . '/admin-bar/admin-bar-superadmin.php' ); |
|---|
| 45 | - } |
|---|
| 46 | + /* Instantiate the admin bar */ |
|---|
| 47 | + $admin_bar_class = apply_filters( 'wp_admin_bar_class', 'WP_Admin_Bar' ); |
|---|
| 48 | + if ( class_exists( $admin_bar_class ) ) |
|---|
| 49 | + $wp_admin_bar = new $admin_bar_class; |
|---|
| 50 | + else |
|---|
| 51 | + return false; |
|---|
| 52 | + |
|---|
| 53 | + $wp_admin_bar->initialize(); |
|---|
| 54 | + $wp_admin_bar->add_menus(); |
|---|
| 55 | |
|---|
| 56 | - /* Initialize the admin bar */ |
|---|
| 57 | - $wp_admin_bar = new wp_admin_bar(); |
|---|
| 58 | - |
|---|
| 59 | - add_action( 'wp_head', 'wp_admin_bar_css' ); |
|---|
| 60 | - add_action( 'admin_head', 'wp_admin_bar_css' ); |
|---|
| 61 | - |
|---|
| 62 | - do_action('admin_bar_init'); |
|---|
| 63 | + return true; |
|---|
| 64 | } |
|---|
| 65 | add_action( 'init', 'wp_admin_bar_init' ); |
|---|
| 66 | |
|---|
| 67 | @@ -56,11 +42,13 @@ |
|---|
| 68 | * It includes the action "wp_before_admin_bar_render" which should be used to hook in and |
|---|
| 69 | * add new menus to the admin bar. That way you can be sure that you are adding at most optimal point, |
|---|
| 70 | * right before the admin bar is rendered. This also gives you access to the $post global, among others. |
|---|
| 71 | + * |
|---|
| 72 | + * @since 3.1.0 |
|---|
| 73 | */ |
|---|
| 74 | function wp_admin_bar_render() { |
|---|
| 75 | global $wp_admin_bar; |
|---|
| 76 | |
|---|
| 77 | - if ( !is_object( $wp_admin_bar ) ) |
|---|
| 78 | + if ( ! is_object( $wp_admin_bar ) ) |
|---|
| 79 | return false; |
|---|
| 80 | |
|---|
| 81 | $wp_admin_bar->load_user_locale_translations(); |
|---|
| 82 | @@ -78,57 +66,77 @@ |
|---|
| 83 | |
|---|
| 84 | /** |
|---|
| 85 | * Show the logged in user's gravatar as a separator. |
|---|
| 86 | + * |
|---|
| 87 | + * @since 3.1.0 |
|---|
| 88 | */ |
|---|
| 89 | function wp_admin_bar_me_separator() { |
|---|
| 90 | - global $wp_admin_bar, $current_user; |
|---|
| 91 | + global $wp_admin_bar; |
|---|
| 92 | |
|---|
| 93 | - if ( !is_object( $wp_admin_bar ) ) |
|---|
| 94 | - return false; |
|---|
| 95 | - |
|---|
| 96 | - $wp_admin_bar->add_menu( array( 'id' => 'me', 'title' => get_avatar( $current_user->ID, 16 ), 'href' => $wp_admin_bar->user->account_domain . 'wp-admin/profile.php' ) ); |
|---|
| 97 | + $wp_admin_bar->add_menu( array( |
|---|
| 98 | + 'id' => 'me', |
|---|
| 99 | + 'title' => get_avatar( get_current_user_id(), 16 ), |
|---|
| 100 | + 'href' => admin_url('profile.php'), |
|---|
| 101 | + ) ); |
|---|
| 102 | } |
|---|
| 103 | -add_action( 'wp_before_admin_bar_render', 'wp_admin_bar_me_separator', 10 ); |
|---|
| 104 | |
|---|
| 105 | /** |
|---|
| 106 | - * Use the $wp_admin_bar global to add the "My Account" menu and all submenus. |
|---|
| 107 | + * Add the "My Account" menu and all submenus. |
|---|
| 108 | + * |
|---|
| 109 | + * @since 3.1.0 |
|---|
| 110 | */ |
|---|
| 111 | function wp_admin_bar_my_account_menu() { |
|---|
| 112 | - global $wp_admin_bar, $current_user; |
|---|
| 113 | + global $wp_admin_bar; |
|---|
| 114 | |
|---|
| 115 | - if ( !is_object( $wp_admin_bar ) ) |
|---|
| 116 | - return false; |
|---|
| 117 | - |
|---|
| 118 | /* Add the 'My Account' menu */ |
|---|
| 119 | - $wp_admin_bar->add_menu( array( 'id' => 'my-account', 'title' => __( 'My Account' ), 'href' => admin_url('profile.php') ) ); |
|---|
| 120 | + $wp_admin_bar->add_menu( array( |
|---|
| 121 | + 'id' => 'my-account', |
|---|
| 122 | + 'title' => __( 'My Account' ), |
|---|
| 123 | + 'href' => admin_url('profile.php'), |
|---|
| 124 | + ) ); |
|---|
| 125 | |
|---|
| 126 | /* Add the "My Account" sub menus */ |
|---|
| 127 | - $wp_admin_bar->add_menu( array( 'parent' => 'my-account', 'title' => __( 'Edit My Profile' ), 'href' => admin_url('profile.php') ) ); |
|---|
| 128 | - $wp_admin_bar->add_menu( array( 'parent' => 'my-account', 'title' => __( 'Global Dashboard' ), 'href' => admin_url() ) ); |
|---|
| 129 | - $wp_admin_bar->add_menu( array( 'parent' => 'my-account', 'title' => __( 'Log Out' ), 'href' => wp_logout_url() ) ); |
|---|
| 130 | + $wp_admin_bar->add_menu( array( |
|---|
| 131 | + 'parent' => 'my-account', |
|---|
| 132 | + 'title' => __( 'Edit My Profile' ), |
|---|
| 133 | + 'href' => admin_url('profile.php'), |
|---|
| 134 | + ) ); |
|---|
| 135 | + |
|---|
| 136 | + $wp_admin_bar->add_menu( array( |
|---|
| 137 | + 'parent' => 'my-account', |
|---|
| 138 | + 'title' => __( 'Global Dashboard' ), |
|---|
| 139 | + 'href' => admin_url(), |
|---|
| 140 | + ) ); |
|---|
| 141 | + |
|---|
| 142 | + $wp_admin_bar->add_menu( array( |
|---|
| 143 | + 'parent' => 'my-account', |
|---|
| 144 | + 'title' => __( 'Log Out' ), |
|---|
| 145 | + 'href' => wp_logout_url(), |
|---|
| 146 | + ) ); |
|---|
| 147 | } |
|---|
| 148 | -add_action( 'wp_before_admin_bar_render', 'wp_admin_bar_my_account_menu', 20 ); |
|---|
| 149 | |
|---|
| 150 | /** |
|---|
| 151 | - * Use the $wp_admin_bar global to add the "My Sites/[Site Name]" menu and all submenus. |
|---|
| 152 | + * Add the "My Sites/[Site Name]" menu and all submenus. |
|---|
| 153 | + * |
|---|
| 154 | + * @since 3.1.0 |
|---|
| 155 | */ |
|---|
| 156 | function wp_admin_bar_my_blogs_menu() { |
|---|
| 157 | global $wpdb, $wp_admin_bar; |
|---|
| 158 | |
|---|
| 159 | - if ( !is_object( $wp_admin_bar ) ) |
|---|
| 160 | - return false; |
|---|
| 161 | - |
|---|
| 162 | /* Add the 'My Dashboards' menu if the user has more than one site. */ |
|---|
| 163 | if ( count( $wp_admin_bar->user->blogs ) > 1 ) { |
|---|
| 164 | - $wp_admin_bar->add_menu( array( 'id' => 'my-blogs', 'title' => __( 'My Sites' ), 'href' => $wp_admin_bar->user->account_domain ) ); |
|---|
| 165 | + $wp_admin_bar->add_menu( array( |
|---|
| 166 | + 'id' => 'my-blogs', |
|---|
| 167 | + 'title' => __( 'My Sites' ), |
|---|
| 168 | + 'href' => $wp_admin_bar->user->account_domain, |
|---|
| 169 | + ) ); |
|---|
| 170 | |
|---|
| 171 | $default = includes_url('images/wpmini-blue.png'); |
|---|
| 172 | |
|---|
| 173 | - $counter = 2; |
|---|
| 174 | foreach ( (array) $wp_admin_bar->user->blogs as $blog ) { |
|---|
| 175 | $blogdomain = preg_replace( '!^https?://!', '', $blog->siteurl ); |
|---|
| 176 | // @todo Replace with some favicon lookup. |
|---|
| 177 | //$blavatar = '<img src="' . esc_url( blavatar_url( blavatar_domain( $blog->siteurl ), 'img', 16, $default ) ) . '" alt="Blavatar" width="16" height="16" />'; |
|---|
| 178 | - $blavatar = '<img src="' . esc_url($default) . '" alt="Blavatar" width="16" height="16" />';; |
|---|
| 179 | + $blavatar = '<img src="' . esc_url($default) . '" alt="' . esc_attr__( 'Blavatar' ) . '" width="16" height="16" />'; |
|---|
| 180 | |
|---|
| 181 | $marker = ''; |
|---|
| 182 | if ( strlen($blog->blogname) > 35 ) |
|---|
| 183 | @@ -139,205 +147,274 @@ |
|---|
| 184 | else |
|---|
| 185 | $blogname = substr( $blog->blogname, 0, 35 ) . $marker; |
|---|
| 186 | |
|---|
| 187 | - if ( !isset( $blog->visible ) || $blog->visible === true ) { |
|---|
| 188 | - $wp_admin_bar->add_menu( array( 'parent' => 'my-blogs', 'id' => 'blog-' . $blog->userblog_id, 'title' => $blavatar . $blogname, 'href' => constant( 'PROTO' ) . $blogdomain . '/wp-admin/' ) ); |
|---|
| 189 | - $wp_admin_bar->add_menu( array( 'parent' => 'blog-' . $blog->userblog_id, 'id' => 'blog-' . $blog->userblog_id . '-d', 'title' => __( 'Dashboard' ), 'href' => constant( 'PROTO' ) . $blogdomain . '/wp-admin/' ) ); |
|---|
| 190 | - $wp_admin_bar->add_menu( array( 'parent' => 'blog-' . $blog->userblog_id, 'id' => 'blog-' . $blog->userblog_id . '-n', 'title' => __( 'New Post' ), 'href' => constant( 'PROTO' ) . $blogdomain . '/wp-admin/post-new.php' ) ); |
|---|
| 191 | + if ( ! isset( $blog->visible ) || $blog->visible === true ) { |
|---|
| 192 | + $wp_admin_bar->add_menu( array( |
|---|
| 193 | + 'parent' => 'my-blogs', |
|---|
| 194 | + 'id' => 'blog-' . $blog->userblog_id, |
|---|
| 195 | + 'title' => $blavatar . $blogname, |
|---|
| 196 | + 'href' => $wp_admin_bar->proto . $blogdomain . '/wp-admin/', |
|---|
| 197 | + ) ); |
|---|
| 198 | + |
|---|
| 199 | + $wp_admin_bar->add_menu( array( |
|---|
| 200 | + 'parent' => 'blog-' . $blog->userblog_id, |
|---|
| 201 | + 'id' => 'blog-' . $blog->userblog_id . '-d', |
|---|
| 202 | + 'title' => __( 'Dashboard' ), |
|---|
| 203 | + 'href' => $wp_admin_bar->proto . $blogdomain . '/wp-admin/', |
|---|
| 204 | + ) ); |
|---|
| 205 | + |
|---|
| 206 | + $wp_admin_bar->add_menu( array( |
|---|
| 207 | + 'parent' => 'blog-' . $blog->userblog_id, |
|---|
| 208 | + 'id' => 'blog-' . $blog->userblog_id . '-n', |
|---|
| 209 | + 'title' => __( 'New Post' ), |
|---|
| 210 | + 'href' => $wp_admin_bar->proto . $blogdomain . '/wp-admin/post-new.php', |
|---|
| 211 | + ) ); |
|---|
| 212 | + |
|---|
| 213 | // @todo, stats plugins should add this: |
|---|
| 214 | - //$wp_admin_bar->add_menu( array( 'parent' => 'blog-' . $blog->userblog_id, 'id' => 'blog-' . $blog->userblog_id . '-s', 'title' => __( 'Site Stats' ), 'href' => constant( 'PROTO' ) . $blogdomain . '/wp-admin/index.php?page=stats' ) ); |
|---|
| 215 | - $wp_admin_bar->add_menu( array( 'parent' => 'blog-' . $blog->userblog_id, 'id' => 'blog-' . $blog->userblog_id . '-c', 'title' => __( 'Manage Comments' ), 'href' => constant( 'PROTO' ) . $blogdomain . '/wp-admin/edit-comments.php' ) ); |
|---|
| 216 | - $wp_admin_bar->add_menu( array( 'parent' => 'blog-' . $blog->userblog_id, 'id' => 'blog-' . $blog->userblog_id . '-v', 'title' => __( 'Read Site' ), 'href' => constant( 'PROTO' ) . $blogdomain ) ); |
|---|
| 217 | + //$wp_admin_bar->add_menu( array( 'parent' => 'blog-' . $blog->userblog_id, 'id' => 'blog-' . $blog->userblog_id . '-s', 'title' => __( 'Site Stats' ), 'href' => $wp_admin_bar->proto . $blogdomain . '/wp-admin/index.php?page=stats' ) ); |
|---|
| 218 | + |
|---|
| 219 | + $wp_admin_bar->add_menu( array( |
|---|
| 220 | + 'parent' => 'blog-' . $blog->userblog_id, |
|---|
| 221 | + 'id' => 'blog-' . $blog->userblog_id . '-c', |
|---|
| 222 | + 'title' => __( 'Manage Comments' ), |
|---|
| 223 | + 'href' => $wp_admin_bar->proto . $blogdomain . '/wp-admin/edit-comments.php', |
|---|
| 224 | + ) ); |
|---|
| 225 | + |
|---|
| 226 | + $wp_admin_bar->add_menu( array( |
|---|
| 227 | + 'parent' => 'blog-' . $blog->userblog_id, |
|---|
| 228 | + 'id' => 'blog-' . $blog->userblog_id . '-v', |
|---|
| 229 | + 'title' => __( 'Read Site' ), |
|---|
| 230 | + 'href' => $wp_admin_bar->proto . $blogdomain, |
|---|
| 231 | + ) ); |
|---|
| 232 | } |
|---|
| 233 | - $counter++; |
|---|
| 234 | } |
|---|
| 235 | |
|---|
| 236 | /* Add the "Manage Sites" menu item */ |
|---|
| 237 | // @todo, use dashboard site. |
|---|
| 238 | - $wp_admin_bar->add_menu( array( 'parent' => 'my-blogs', 'id' => 'manage-blogs', 'title' => __( 'Manage Sites' ), admin_url('my-sites.php') ) ); |
|---|
| 239 | + $wp_admin_bar->add_menu( array( |
|---|
| 240 | + 'parent' => 'my-blogs', |
|---|
| 241 | + 'id' => 'manage-blogs', |
|---|
| 242 | + 'title' => __( 'Manage Sites' ), |
|---|
| 243 | + admin_url('my-sites.php'), |
|---|
| 244 | + ) ); |
|---|
| 245 | |
|---|
| 246 | /* Add the 'My Dashboard' menu if the user only has one site. */ |
|---|
| 247 | } else { |
|---|
| 248 | - $wp_admin_bar->add_menu( array( 'id' => 'my-blogs', 'title' => __( 'My Site' ), 'href' => $wp_admin_bar->user->account_domain ) ); |
|---|
| 249 | + $wp_admin_bar->add_menu( array( |
|---|
| 250 | + 'id' => 'my-blogs', |
|---|
| 251 | + 'title' => __( 'My Site' ), |
|---|
| 252 | + 'href' => $wp_admin_bar->user->account_domain, |
|---|
| 253 | + ) ); |
|---|
| 254 | |
|---|
| 255 | - $wp_admin_bar->add_menu( array( 'parent' => 'my-blogs', 'id' => 'blog-1-d', 'title' => __( 'Dashboard' ), 'href' => admin_url() ) ); |
|---|
| 256 | - $wp_admin_bar->add_menu( array( 'parent' => 'my-blogs', 'id' => 'blog-1-n', 'title' => __( 'New Post' ), 'href' => admin_url('post-new.php') ) ); |
|---|
| 257 | + $wp_admin_bar->add_menu( array( |
|---|
| 258 | + 'parent' => 'my-blogs', |
|---|
| 259 | + 'id' => 'blog-1-d', |
|---|
| 260 | + 'title' => __( 'Dashboard' ), |
|---|
| 261 | + 'href' => admin_url(), |
|---|
| 262 | + ) ); |
|---|
| 263 | + |
|---|
| 264 | + $wp_admin_bar->add_menu( array( |
|---|
| 265 | + 'parent' => 'my-blogs', |
|---|
| 266 | + 'id' => 'blog-1-n', |
|---|
| 267 | + 'title' => __( 'New Post' ), |
|---|
| 268 | + 'href' => admin_url('post-new.php'), |
|---|
| 269 | + ) ); |
|---|
| 270 | + |
|---|
| 271 | // @todo Stats plugins should add this. |
|---|
| 272 | //$wp_admin_bar->add_menu( array( 'parent' => 'my-blogs', 'id' => 'blog-1-s', 'title' => __( 'Site Stats' ), 'href' => admin_ur;('index.php?page=stats') ) ); |
|---|
| 273 | - $wp_admin_bar->add_menu( array( 'parent' => 'my-blogs', 'id' => 'blog-1-c', 'title' => __( 'Manage Comments' ), 'href' => admin_url('edit-comments.php') ) ); |
|---|
| 274 | - $wp_admin_bar->add_menu( array( 'parent' => 'my-blogs', 'id' => 'blog-1-v', 'title' => __( 'Read Site' ), 'href' => home_url() ) ); |
|---|
| 275 | + |
|---|
| 276 | + $wp_admin_bar->add_menu( array( |
|---|
| 277 | + 'parent' => 'my-blogs', |
|---|
| 278 | + 'id' => 'blog-1-c', |
|---|
| 279 | + 'title' => __( 'Manage Comments' ), |
|---|
| 280 | + 'href' => admin_url('edit-comments.php'), |
|---|
| 281 | + ) ); |
|---|
| 282 | + |
|---|
| 283 | + $wp_admin_bar->add_menu( array( |
|---|
| 284 | + 'parent' => 'my-blogs', |
|---|
| 285 | + 'id' => 'blog-1-v', |
|---|
| 286 | + 'title' => __( 'Read Site' ), |
|---|
| 287 | + 'href' => home_url(), |
|---|
| 288 | + ) ); |
|---|
| 289 | } |
|---|
| 290 | } |
|---|
| 291 | -add_action( 'wp_before_admin_bar_render', 'wp_admin_bar_my_blogs_menu', 30 ); |
|---|
| 292 | |
|---|
| 293 | /** |
|---|
| 294 | * Show the blavatar of the current site as a separator. |
|---|
| 295 | + * |
|---|
| 296 | + * @since 3.1.0 |
|---|
| 297 | */ |
|---|
| 298 | function wp_admin_bar_blog_separator() { |
|---|
| 299 | - global $wp_admin_bar, $current_user, $current_blog; |
|---|
| 300 | + global $wp_admin_bar, $current_blog; |
|---|
| 301 | |
|---|
| 302 | - if ( !is_object( $wp_admin_bar ) ) |
|---|
| 303 | - return false; |
|---|
| 304 | - |
|---|
| 305 | $default = includes_url('images/wpmini-blue.png'); |
|---|
| 306 | |
|---|
| 307 | - $wp_admin_bar->add_menu( array( 'id' => 'blog', 'title' => '<img class="avatar" src="' . $default . '" alt="' . __( 'Current site avatar' ) . '" width="16" height="16" />', 'href' => home_url() ) ); |
|---|
| 308 | + $wp_admin_bar->add_menu( array( |
|---|
| 309 | + 'id' => 'blog', |
|---|
| 310 | + 'title' => '<img class="avatar" src="' . $default . '" alt="' . esc_attr__( 'Current site avatar' ) . '" width="16" height="16" />', |
|---|
| 311 | + 'href' => home_url(), |
|---|
| 312 | + ) ); |
|---|
| 313 | } |
|---|
| 314 | -add_action( 'wp_before_admin_bar_render', 'wp_admin_bar_blog_separator', 40 ); |
|---|
| 315 | |
|---|
| 316 | /** |
|---|
| 317 | - * Use the $wp_admin_bar global to add a menu for site info, accessable to all users. |
|---|
| 318 | + * Site info menu |
|---|
| 319 | + * |
|---|
| 320 | + * @since 3.1.0 |
|---|
| 321 | */ |
|---|
| 322 | function wp_admin_bar_bloginfo_menu() { |
|---|
| 323 | global $wp_admin_bar; |
|---|
| 324 | |
|---|
| 325 | - if ( !is_object( $wp_admin_bar ) ) |
|---|
| 326 | - return false; |
|---|
| 327 | - |
|---|
| 328 | /* Add the Site Info menu */ |
|---|
| 329 | - $wp_admin_bar->add_menu( array( 'id' => 'bloginfo', 'title' => __( 'Site Info' ), 'href' => '' ) ); |
|---|
| 330 | + $wp_admin_bar->add_menu( array( |
|---|
| 331 | + 'id' => 'bloginfo', |
|---|
| 332 | + 'title' => __( 'Site Info' ), |
|---|
| 333 | + 'href' => '', |
|---|
| 334 | + ) ); |
|---|
| 335 | |
|---|
| 336 | - $wp_admin_bar->add_menu( array( 'parent' => 'bloginfo', 'title' => __( 'Get Shortlink' ), 'href' => '', 'meta' => array( 'onclick' => 'javascript:function wpcomshort() { var url=document.location;var links=document.getElementsByTagName('link');var found=0;for(var i = 0, l; l = links[i]; i++){if(l.getAttribute('rel')=='shortlink') {found=l.getAttribute('href');break;}}if (!found) {for (var i = 0; l = document.links[i]; i++) {if (l.getAttribute('rel') == 'shortlink') {found = l.getAttribute('href');break;}}}if (found) {prompt('URL:', found);} else {alert('No shortlink available for this page'); } } wpcomshort(); return false;' ) ) ); |
|---|
| 337 | + $wp_admin_bar->add_menu( array( |
|---|
| 338 | + 'parent' => 'bloginfo', |
|---|
| 339 | + 'title' => __( 'Get Shortlink' ), |
|---|
| 340 | + 'href' => '', |
|---|
| 341 | + 'meta' => array( |
|---|
| 342 | + 'onclick' => 'javascript:function wpcomshort() { var url=document.location;var links=document.getElementsByTagName('link');var found=0;for(var i = 0, l; l = links[i]; i++){if(l.getAttribute('rel')=='shortlink') {found=l.getAttribute('href');break;}}if (!found) {for (var i = 0; l = document.links[i]; i++) {if (l.getAttribute('rel') == 'shortlink') {found = l.getAttribute('href');break;}}}if (found) {prompt('' . esc_js( __( 'URL:' ) ) . '', found);} else {alert('' . esc_js( __( 'No shortlink available for this page.' ) ) . ''); } } wpcomshort(); return false;' ) ) ); |
|---|
| 343 | } |
|---|
| 344 | -add_action( 'wp_before_admin_bar_render', 'wp_admin_bar_bloginfo_menu', 50 ); |
|---|
| 345 | |
|---|
| 346 | /** |
|---|
| 347 | - * Use the $wp_admin_bar global to add the "Edit Post" menu when viewing a single post. |
|---|
| 348 | + * Provide an edit link for posts and terms. |
|---|
| 349 | + * |
|---|
| 350 | + * @since 3.1.0 |
|---|
| 351 | */ |
|---|
| 352 | function wp_admin_bar_edit_menu() { |
|---|
| 353 | - global $post, $wp_admin_bar; |
|---|
| 354 | + global $wp_admin_bar, $wp_query; |
|---|
| 355 | |
|---|
| 356 | - if ( !is_object( $wp_admin_bar ) ) |
|---|
| 357 | - return false; |
|---|
| 358 | + $current_object = $wp_query->get_queried_object(); |
|---|
| 359 | |
|---|
| 360 | - if ( !is_single() && !is_page() ) |
|---|
| 361 | + if ( empty( $current_object ) ) |
|---|
| 362 | return false; |
|---|
| 363 | |
|---|
| 364 | - if ( !$post_type_object = get_post_type_object( $post->post_type ) ) |
|---|
| 365 | - return false; |
|---|
| 366 | + if ( |
|---|
| 367 | + ! empty( $current_object->post_type ) && |
|---|
| 368 | + ( $post_type_object = get_post_type_object( $current_object->post_type ) ) && |
|---|
| 369 | + current_user_can( $post_type_object->cap->edit_post, $current_object->ID ) |
|---|
| 370 | + ) { |
|---|
| 371 | |
|---|
| 372 | - if ( !current_user_can( $post_type_object->cap->edit_post, $post->ID ) ) |
|---|
| 373 | - return false; |
|---|
| 374 | + $wp_admin_bar->add_menu( array( |
|---|
| 375 | + 'id' => 'edit', |
|---|
| 376 | + 'title' => __( 'Edit' ), |
|---|
| 377 | + 'href' => get_edit_post_link( $current_object->ID ), |
|---|
| 378 | + ) ); |
|---|
| 379 | |
|---|
| 380 | - $wp_admin_bar->add_menu( array( 'id' => 'edit', 'title' => __( 'Edit' ), 'href' => get_edit_post_link( $post->ID ) ) ); |
|---|
| 381 | -} |
|---|
| 382 | -add_action( 'wp_before_admin_bar_render', 'wp_admin_bar_edit_menu', 100 ); |
|---|
| 383 | + } elseif ( |
|---|
| 384 | + ! empty( $current_object->taxonomy ) && |
|---|
| 385 | + ( $tax = get_taxonomy( $current_object->taxonomy ) ) && |
|---|
| 386 | + current_user_can( $tax->cap->edit_terms ) |
|---|
| 387 | + ) { |
|---|
| 388 | |
|---|
| 389 | -/** |
|---|
| 390 | - * Load up the CSS needed to render the admin bar nice and pretty. |
|---|
| 391 | - */ |
|---|
| 392 | -function wp_admin_bar_css() { |
|---|
| 393 | - global $pagenow, $wp_locale, $wp_admin_bar; |
|---|
| 394 | + $wp_admin_bar->add_menu( array( |
|---|
| 395 | + 'id' => 'edit', |
|---|
| 396 | + 'title' => __( 'Edit' ), |
|---|
| 397 | + 'href' => get_edit_term_link( $current_object->term_id, $current_object->taxonomy ), |
|---|
| 398 | + ) ); |
|---|
| 399 | |
|---|
| 400 | - if ( !is_object( $wp_admin_bar ) ) |
|---|
| 401 | - return false; |
|---|
| 402 | - |
|---|
| 403 | - if ( !is_user_logged_in() ) |
|---|
| 404 | - return; |
|---|
| 405 | - |
|---|
| 406 | - $nobump = false; |
|---|
| 407 | - |
|---|
| 408 | - /* Wish we could use wp_enqueue_style() here, but it will not let us pass GET params to the stylesheet correctly. */ |
|---|
| 409 | - ?> |
|---|
| 410 | - <link rel="stylesheet" href="<?php echo includes_url('admin-bar/admin-bar-css.php') . '?t=' . get_current_theme() . '&a=' . is_admin() . '&p=' . is_ssl() . '&sa=' . is_super_admin() . '&td=' . $wp_locale->text_direction . '&inc=' . includes_url() . '&nobump=' . $nobump; ?>" type="text/css" /> |
|---|
| 411 | - <!--[if IE 6]><style type="text/css">#wpadminbar, #wpadminbar .menupop a span, #wpadminbar .menupop ul li a:hover, #wpadminbar .myaccount a, .quicklinks a:hover,#wpadminbar .menupop:hover { background-image: none !important; } #wpadminbar .myaccount a { margin-left:0 !important; padding-left:12px !important;}</style><![endif]--> |
|---|
| 412 | - <style type="text/css" media="print">#wpadminbar { display:none; }</style><?php |
|---|
| 413 | + } |
|---|
| 414 | } |
|---|
| 415 | |
|---|
| 416 | /** |
|---|
| 417 | - * Load up the JS needed to allow the admin bar to function correctly. |
|---|
| 418 | + * Style and scripts for the admin bar. |
|---|
| 419 | + * |
|---|
| 420 | + * @since 3.1.0 |
|---|
| 421 | + * |
|---|
| 422 | */ |
|---|
| 423 | -function wp_admin_bar_js() { |
|---|
| 424 | - global $wp_admin_bar; |
|---|
| 425 | - |
|---|
| 426 | - if ( !is_object( $wp_admin_bar ) ) |
|---|
| 427 | - return false; |
|---|
| 428 | - |
|---|
| 429 | +function wp_admin_bar_header() { |
|---|
| 430 | ?> |
|---|
| 431 | + <style type="text/css" media="print">#wpadminbar { display:none; }</style> |
|---|
| 432 | <script type="text/javascript"> |
|---|
| 433 | -/* <![CDATA[ */ |
|---|
| 434 | - function pressthis(step) {if (step == 1) {if(navigator.userAgent.indexOf('Safari') >= 0) {Q=getSelection();}else {if(window.getSelection)Q=window.getSelection().toString();else if(document.selection)Q=document.selection.createRange().text;else Q=document.getSelection().toString();}} else {location.href='<?php echo $wp_admin_bar->user->account_domain; ?>wp-admin/post-new.php?text='+encodeURIComponent(Q.toString())+'&popupurl='+encodeURIComponent(location.href)+'&popuptitle='+encodeURIComponent(document.title);}} |
|---|
| 435 | - function toggle_query_list() { var querylist = document.getElementById( 'querylist' );if( querylist.style.display == 'block' ) {querylist.style.display='none';} else {querylist.style.display='block';}} |
|---|
| 436 | + /* <![CDATA[ */ |
|---|
| 437 | + (function(d, w) { |
|---|
| 438 | + var init = function() { |
|---|
| 439 | + var b = d.getElementsByTagName('body')[0], |
|---|
| 440 | + aB = d.getElementById('wpadminbar'), |
|---|
| 441 | + s = d.getElementById('adminbar-search'); |
|---|
| 442 | |
|---|
| 443 | - jQuery( function() { |
|---|
| 444 | - (function(jq){jq.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=jq.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){jq(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev]);}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev]);};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode;}catch(e){p=this;}}if(p==this){return false;}var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;jq(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}}else{jq(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob);},cfg.timeout);}}};return this.mouseover(handleHover).mouseout(handleHover);};})(jQuery); |
|---|
| 445 | - ;(function(jq){jq.fn.superfish=function(op){var sf=jq.fn.superfish,c=sf.c,jqarrow=jq([''].join('')),over=function(){var jqjq=jq(this),menu=getMenu(jqjq);clearTimeout(menu.sfTimer);jqjq.showSuperfishUl().siblings().hideSuperfishUl();},out=function(){var jqjq=jq(this),menu=getMenu(jqjq),o=sf.op;clearTimeout(menu.sfTimer);menu.sfTimer=setTimeout(function(){o.retainPath=(jq.inArray(jqjq[0],o.jqpath)>-1);jqjq.hideSuperfishUl();if(o.jqpath.length&&jqjq.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.jqpath);}},o.delay);},getMenu=function(jqmenu){var menu=jqmenu.parents(['ul.',c.menuClass,':first'].join(''))[0];sf.op=sf.o[menu.serial];return menu;},addArrow=function(jqa){jqa.addClass(c.anchorClass).append(jqarrow.clone());};return this.each(function(){var s=this.serial=sf.o.length;var o=jq.extend({},sf.defaults,op);o.jqpath=jq('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){jq(this).addClass([o.hoverClass,c.bcClass].join(' ')).filter('li:has(ul)').removeClass(o.pathClass);});sf.o[s]=sf.op=o;jq('li:has(ul)',this)[(jq.fn.hoverIntent&&!o.disableHI)?'hoverIntent':'hover'](over,out).each(function(){if(o.autoArrows)addArrow(jq('>a:first-child',this));}).not('.'+c.bcClass).hideSuperfishUl();var jqa=jq('a',this);jqa.each(function(i){var jqli=jqa.eq(i).parents('li');jqa.eq(i).focus(function(){over.call(jqli);}).blur(function(){out.call(jqli);});});o.onInit.call(this);}).each(function(){var menuClasses=[c.menuClass];if(sf.op.dropShadows&&!(jq.browser.msie&&jq.browser.version<7))menuClasses.push(c.shadowClass);jq(this).addClass(menuClasses.join(' '));});};var sf=jq.fn.superfish;sf.o=[];sf.op={};sf.IE7fix=function(){var o=sf.op;if(jq.browser.msie&&jq.browser.version>6&&o.dropShadows&&o.animation.opacity!=undefined) this.toggleClass(sf.c.shadowClass+'-off');};sf.c={bcClass:'sf-breadcrumb',menuClass:'sf-js-enabled',anchorClass:'sf-with-ul',arrowClass:'sf-sub-indicator',shadowClass:'sf-shadow'};sf.defaults={hoverClass:'sfHover',pathClass:'overideThisToUse',pathLevels:1,delay:600,animation:{opacity:'show'},speed:100,autoArrows:false,dropShadows:false,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};jq.fn.extend({hideSuperfishUl:function(){var o=sf.op,not=(o.retainPath===true)?o.jqpath:'';o.retainPath=false;var jqul=jq(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass).find('>ul').hide().css('visibility','hidden');o.onHide.call(jqul);return this;},showSuperfishUl:function(){var o=sf.op,sh=sf.c.shadowClass+'-off',jqul=this.addClass(o.hoverClass).find('>ul:hidden').css('visibility','visible');sf.IE7fix.call(jqul);o.onBeforeShow.call(jqul);jqul.animate(o.animation,o.speed,function(){sf.IE7fix.call(jqul);o.onShow.call(jqul);});return this;}});})(jQuery); |
|---|
| 446 | + if ( b && aB ) |
|---|
| 447 | + b.appendChild( aB ); |
|---|
| 448 | |
|---|
| 449 | - <?php if ( is_single() ) : ?> |
|---|
| 450 | - if ( jQuery(this).width() < 1100 ) jQuery("#adminbarsearch").hide(); |
|---|
| 451 | - <?php endif; ?> |
|---|
| 452 | - |
|---|
| 453 | - jQuery( '#wpadminbar li.ab-my-account, #wpadminbar li.ab-bloginfo' ).mouseover( function() { |
|---|
| 454 | - if ( jQuery(this).hasClass( 'ab-my-account' ) ) jQuery('#wpadminbar li.ab-me > a').addClass('hover'); |
|---|
| 455 | - if ( jQuery(this).hasClass( 'ab-bloginfo' ) ) jQuery('#wpadminbar li.ab-blog > a').addClass('hover'); |
|---|
| 456 | - }); |
|---|
| 457 | + if ( s ) { |
|---|
| 458 | + if ( '' == s.value ) |
|---|
| 459 | + s.value = s.getAttribute('title'); |
|---|
| 460 | + |
|---|
| 461 | + s.onblur = function() { |
|---|
| 462 | + this.value = '' == this.value ? this.getAttribute('title') : this.value; |
|---|
| 463 | + } |
|---|
| 464 | + s.onfocus = function() { |
|---|
| 465 | + this.value = this.getAttribute('title') == this.value ? '' : this.value; |
|---|
| 466 | + } |
|---|
| 467 | + } |
|---|
| 468 | |
|---|
| 469 | - jQuery( '#wpadminbar li.ab-my-account, #wpadminbar li.ab-bloginfo' ).mouseout( function() { |
|---|
| 470 | - if ( jQuery(this).hasClass( 'ab-my-account' ) ) jQuery('#wpadminbar li.ab-me > a').removeClass('hover'); |
|---|
| 471 | - if ( jQuery(this).hasClass( 'ab-bloginfo' ) ) jQuery('#wpadminbar li.ab-blog > a').removeClass('hover'); |
|---|
| 472 | - }); |
|---|
| 473 | + if ( w.location.hash ) |
|---|
| 474 | + w.scrollBy(0,-32); |
|---|
| 475 | + } |
|---|
| 476 | |
|---|
| 477 | - <?php if ( is_single() ) : ?> |
|---|
| 478 | - jQuery(window).resize( function() { |
|---|
| 479 | - if ( jQuery(this).width() < 1100 ) |
|---|
| 480 | - jQuery("#adminbarsearch").hide(); |
|---|
| 481 | - |
|---|
| 482 | - if ( jQuery(this).width() > 1100 ) |
|---|
| 483 | - jQuery("#adminbarsearch").show(); |
|---|
| 484 | - }); |
|---|
| 485 | - <?php endif; ?> |
|---|
| 486 | - |
|---|
| 487 | - jQuery( '#wpadminbar ul ul li a' ).mouseover( function() { |
|---|
| 488 | - var root = jQuery(this).parents('div.quicklinks ul > li'); |
|---|
| 489 | - var par = jQuery(this).parent(); |
|---|
| 490 | - var children = par.children('ul'); |
|---|
| 491 | - if ( root.hasClass('ab-sadmin') ) |
|---|
| 492 | - jQuery(children[0]).css('<?php echo( is_rtl() ? 'left' : 'right' ); ?>',par.parents('ul').width() - 1 +'px' ); |
|---|
| 493 | - else |
|---|
| 494 | - jQuery(children[0]).css('<?php echo( is_rtl() ? 'right' : 'left' ); ?>',par.parents('ul').width() +'px' ); |
|---|
| 495 | - |
|---|
| 496 | - jQuery(children[0]).css('top', '0' ); |
|---|
| 497 | - }); |
|---|
| 498 | - |
|---|
| 499 | - <?php if ( is_user_logged_in() ) : // Hash links scroll 32px back so admin bar doesn't cover. ?> |
|---|
| 500 | - if ( window.location.hash ) window.scrollBy(0,-32); |
|---|
| 501 | - <?php endif; ?> |
|---|
| 502 | + if ( w.addEventListener ) |
|---|
| 503 | + w.addEventListener('load', init, false); |
|---|
| 504 | + else if ( w.attachEvent ) |
|---|
| 505 | + w.attachEvent('onload', init); |
|---|
| 506 | + |
|---|
| 507 | + })(document, window); |
|---|
| 508 | + /* ]]> */ |
|---|
| 509 | + </script> |
|---|
| 510 | + <?php |
|---|
| 511 | +} |
|---|
| 512 | + |
|---|
| 513 | +function wp_admin_body_style() { |
|---|
| 514 | + ?> |
|---|
| 515 | + <style type="text/css"> |
|---|
| 516 | + <?php |
|---|
| 517 | |
|---|
| 518 | - }); |
|---|
| 519 | + if ( |
|---|
| 520 | + ( empty( $_GET['nobump'] ) || is_admin() ) && |
|---|
| 521 | + ! strpos( $_SERVER['REQUEST_URI'], 'media-upload.php' ) |
|---|
| 522 | + ) : |
|---|
| 523 | + ?> |
|---|
| 524 | + body { padding-top: 28px !important; } |
|---|
| 525 | + <?php |
|---|
| 526 | + endif; |
|---|
| 527 | |
|---|
| 528 | - jQuery( function() { |
|---|
| 529 | - jQuery('#wpadminbar').appendTo('body'); |
|---|
| 530 | - jQuery("#wpadminbar ul").superfish(); |
|---|
| 531 | - }); |
|---|
| 532 | + if ( in_array( get_current_theme(), array('H3', 'H4', 'The Journalist v1.9') ) ) : |
|---|
| 533 | + ?> |
|---|
| 534 | + body { padding-top: 28px; background-position: 0px 28px; } |
|---|
| 535 | + <?php |
|---|
| 536 | + endif; |
|---|
| 537 | |
|---|
| 538 | - /* ]]> */ |
|---|
| 539 | - </script><?php |
|---|
| 540 | + ?> |
|---|
| 541 | + </style> |
|---|
| 542 | + <?php |
|---|
| 543 | } |
|---|
| 544 | -add_action( 'wp_footer', 'wp_admin_bar_js' ); |
|---|
| 545 | -add_action( 'admin_footer', 'wp_admin_bar_js' ); |
|---|
| 546 | |
|---|
| 547 | +add_action('wp_head', 'wp_admin_body_style'); |
|---|
| 548 | +add_action('admin_head', 'wp_admin_body_style'); |
|---|
| 549 | + |
|---|
| 550 | /** |
|---|
| 551 | - * Return a rendered admin bar via AJAX for use on pages that do not run inside the |
|---|
| 552 | - * WP environment. Used on bbPress forum pages to show the admin bar. |
|---|
| 553 | + * Determine whether the admin bar should be showing. |
|---|
| 554 | + * |
|---|
| 555 | + * @since 3.1.0 |
|---|
| 556 | + * |
|---|
| 557 | + * @return bool Whether the admin bar should be showing. |
|---|
| 558 | */ |
|---|
| 559 | -function wp_admin_bar_ajax_render() { |
|---|
| 560 | - global $wp_admin_bar; |
|---|
| 561 | +function is_admin_bar_showing() { |
|---|
| 562 | + global $show_admin_bar; |
|---|
| 563 | |
|---|
| 564 | - wp_admin_bar_js(); |
|---|
| 565 | - wp_admin_bar_css(); |
|---|
| 566 | - wp_admin_bar_render(); |
|---|
| 567 | - die; |
|---|
| 568 | -} |
|---|
| 569 | -add_action( 'wp_ajax_admin_bar_render', 'wp_admin_bar_ajax_render' ); |
|---|
| 570 | + if ( ! isset( $show_admin_bar ) || null === $show_admin_bar ) { |
|---|
| 571 | + $show_admin_bar = true; |
|---|
| 572 | |
|---|
| 573 | -function is_admin_bar() { |
|---|
| 574 | - return ( 0 === strpos($_SERVER['REQUEST_URI'], '/js/admin-bar') ); |
|---|
| 575 | -} |
|---|
| 576 | + if ( defined('WP_SHOW_ADMIN_BAR') ) |
|---|
| 577 | + $show_admin_bar = (bool) WP_SHOW_ADMIN_BAR; |
|---|
| 578 | |
|---|
| 579 | -function wp_admin_bar_lang($locale) { |
|---|
| 580 | - if ( is_admin_bar() ) |
|---|
| 581 | - $locale = get_locale(); |
|---|
| 582 | - return $locale; |
|---|
| 583 | + if ( ! is_user_logged_in() ) |
|---|
| 584 | + $show_admin_bar = false; |
|---|
| 585 | + } |
|---|
| 586 | + |
|---|
| 587 | + $show_admin_bar = apply_filters( 'show_admin_bar', $show_admin_bar ); |
|---|
| 588 | + |
|---|
| 589 | + return $show_admin_bar; |
|---|
| 590 | } |
|---|
| 591 | -add_filter('locale', 'wp_admin_bar_lang'); |
|---|
| 592 | - |
|---|
| 593 | -?> |
|---|
| 594 | \ No newline at end of file |
|---|
| 595 | +?> |
|---|
| 596 | Index: wp-includes/functions.php |
|---|
| 597 | =================================================================== |
|---|
| 598 | --- wp-includes/functions.php (revision 16029) |
|---|
| 599 | +++ wp-includes/functions.php (working copy) |
|---|
| 600 | @@ -4405,37 +4405,17 @@ |
|---|
| 601 | } |
|---|
| 602 | |
|---|
| 603 | /** |
|---|
| 604 | - * Retrieve or set the admin bar display state. |
|---|
| 605 | + * Set the display status of the admin bar |
|---|
| 606 | * |
|---|
| 607 | * This can be called immediately upon plugin load. It does not need to be called from a function hooked to the init action. |
|---|
| 608 | * |
|---|
| 609 | - * @param bool $show Optional. True to show the admin bar, false to hide it. If not provided the current display state is returned. |
|---|
| 610 | - * @return bool The current display state if $show is not provided, the previous disply state if $show is provided. |
|---|
| 611 | - * |
|---|
| 612 | * @since 3.1.0 |
|---|
| 613 | + * |
|---|
| 614 | + * @param bool $show Whether to allow the admin bar to show. |
|---|
| 615 | + * @return void |
|---|
| 616 | */ |
|---|
| 617 | -function show_admin_bar( $show = null ) { |
|---|
| 618 | - static $show_admin_bar = null; |
|---|
| 619 | - |
|---|
| 620 | - if ( !isset($show_admin_bar) ) { |
|---|
| 621 | - if ( null !== $show ) |
|---|
| 622 | - $show_admin_bar = $show; |
|---|
| 623 | - elseif ( defined('WP_SHOW_ADMIN_BAR') ) |
|---|
| 624 | - $show_admin_bar = WP_SHOW_ADMIN_BAR; |
|---|
| 625 | - else |
|---|
| 626 | - $show_admin_bar = true; |
|---|
| 627 | - } |
|---|
| 628 | - |
|---|
| 629 | - if ( null === $show ) { |
|---|
| 630 | - return $show_admin_bar; |
|---|
| 631 | - } else { |
|---|
| 632 | - $old_value = $show_admin_bar; |
|---|
| 633 | - $show_admin_bar = $show; |
|---|
| 634 | - |
|---|
| 635 | - // Prevent rendering if already initiated. |
|---|
| 636 | - if ( ! $show_admin_bar && isset( $GLOBALS['wp_admin_bar'] ) ) |
|---|
| 637 | - $GLOBALS['wp_admin_bar'] = null; |
|---|
| 638 | - |
|---|
| 639 | - return $old_value; |
|---|
| 640 | - } |
|---|
| 641 | +function show_admin_bar( $show ) { |
|---|
| 642 | + global $show_admin_bar; |
|---|
| 643 | + $show_admin_bar = (bool) $show; |
|---|
| 644 | } |
|---|
| 645 | + |
|---|
| 646 | Index: wp-includes/admin-bar/admin-bar-class.php |
|---|
| 647 | =================================================================== |
|---|
| 648 | --- wp-includes/admin-bar/admin-bar-class.php (revision 16029) |
|---|
| 649 | +++ wp-includes/admin-bar/admin-bar-class.php (working copy) |
|---|
| 650 | @@ -1,20 +1,31 @@ |
|---|
| 651 | <?php |
|---|
| 652 | class WP_Admin_Bar { |
|---|
| 653 | - var $user; |
|---|
| 654 | + var $changed_locale = false; |
|---|
| 655 | var $menu; |
|---|
| 656 | var $need_to_change_locale = false; |
|---|
| 657 | - var $changed_locale = false; |
|---|
| 658 | + var $proto = 'http://'; |
|---|
| 659 | + var $user; |
|---|
| 660 | |
|---|
| 661 | - function WP_Admin_Bar() { |
|---|
| 662 | - global $current_user, $blog_id; |
|---|
| 663 | + function initialize() { |
|---|
| 664 | + global $blog_id; |
|---|
| 665 | |
|---|
| 666 | + /* Only load super admin menu code if the logged in user is a super admin */ |
|---|
| 667 | + if ( is_super_admin() ) { |
|---|
| 668 | + require( ABSPATH . WPINC . '/admin-bar/admin-bar-debug.php' ); |
|---|
| 669 | + require( ABSPATH . WPINC . '/admin-bar/admin-bar-superadmin.php' ); |
|---|
| 670 | + } |
|---|
| 671 | + |
|---|
| 672 | + /* Set the protocol used throughout this code */ |
|---|
| 673 | + if ( is_ssl() ) |
|---|
| 674 | + $this->proto = 'https://'; |
|---|
| 675 | + |
|---|
| 676 | $this->user = new stdClass; |
|---|
| 677 | $this->menu = new stdClass; |
|---|
| 678 | |
|---|
| 679 | /* Populate settings we need for the menu based on the current user. */ |
|---|
| 680 | - $this->user->blogs = get_blogs_of_user( $current_user->id ); |
|---|
| 681 | + $this->user->blogs = get_blogs_of_user( get_current_user_id() ); |
|---|
| 682 | if ( is_multisite() ) { |
|---|
| 683 | - $this->user->active_blog = get_active_blog_for_user( $current_user->id ); |
|---|
| 684 | + $this->user->active_blog = get_active_blog_for_user( get_current_user_id() ); |
|---|
| 685 | $this->user->domain = empty( $this->user->active_blog ) ? user_admin_url() : trailingslashit( get_home_url( $this->user->active_blog->blog_id ) ); |
|---|
| 686 | $this->user->account_domain = $this->user->domain; |
|---|
| 687 | } else { |
|---|
| 688 | @@ -23,6 +34,17 @@ |
|---|
| 689 | $this->user->account_domain = $this->user->domain; |
|---|
| 690 | } |
|---|
| 691 | $this->user->locale = get_locale(); |
|---|
| 692 | + |
|---|
| 693 | + add_action( 'wp_head', 'wp_admin_bar_header' ); |
|---|
| 694 | + add_action( 'admin_head', 'wp_admin_bar_header' ); |
|---|
| 695 | + |
|---|
| 696 | + wp_enqueue_style( 'admin-bar' ); |
|---|
| 697 | + |
|---|
| 698 | + if ( is_super_admin() ) { |
|---|
| 699 | + wp_enqueue_style( 'super-admin-bar' ); |
|---|
| 700 | + } |
|---|
| 701 | + |
|---|
| 702 | + do_action( 'admin_bar_init' ); |
|---|
| 703 | } |
|---|
| 704 | |
|---|
| 705 | function add_menu( $args = array() ) { |
|---|
| 706 | @@ -44,7 +66,7 @@ |
|---|
| 707 | if ( empty( $id ) ) |
|---|
| 708 | $id = esc_attr( sanitize_title( trim( $title ) ) ); |
|---|
| 709 | |
|---|
| 710 | - if ( !empty( $parent ) ) { |
|---|
| 711 | + if ( ! empty( $parent ) ) { |
|---|
| 712 | /* Add the menu to the parent item */ |
|---|
| 713 | $child = array( |
|---|
| 714 | 'id' => $id, |
|---|
| 715 | @@ -52,7 +74,7 @@ |
|---|
| 716 | 'href' => $href |
|---|
| 717 | ); |
|---|
| 718 | |
|---|
| 719 | - if ( !empty( $meta ) ) |
|---|
| 720 | + if ( ! empty( $meta ) ) |
|---|
| 721 | $child['meta'] = $meta; |
|---|
| 722 | |
|---|
| 723 | $this->add_node( $parent, $this->menu, $child ); |
|---|
| 724 | @@ -63,7 +85,7 @@ |
|---|
| 725 | 'href' => $href |
|---|
| 726 | ); |
|---|
| 727 | |
|---|
| 728 | - if ( !empty( $meta ) ) |
|---|
| 729 | + if ( ! empty( $meta ) ) |
|---|
| 730 | $this->menu->{$id}['meta'] = $meta; |
|---|
| 731 | } |
|---|
| 732 | } |
|---|
| 733 | @@ -73,7 +95,7 @@ |
|---|
| 734 | } |
|---|
| 735 | |
|---|
| 736 | function render() { |
|---|
| 737 | - ?> |
|---|
| 738 | + ?> |
|---|
| 739 | <div id="wpadminbar" class="snap_nopreview no-grav"> |
|---|
| 740 | <div class="quicklinks"> |
|---|
| 741 | <ul> |
|---|
| 742 | @@ -85,7 +107,8 @@ |
|---|
| 743 | |
|---|
| 744 | <div id="adminbarsearch-wrap"> |
|---|
| 745 | <form action="<?php echo home_url(); ?>" method="get" id="adminbarsearch"> |
|---|
| 746 | - <input class="adminbar-input" name="s" id="s" type="text" value="<?php esc_attr_e( 'Search' ); ?>" maxlength="150" onfocus="this.value=(this.value=='<?php esc_attr_e( 'Search' ); ?>') ? '' : this.value;" onblur="this.value=(this.value=='') ? '<?php esc_attr_e( 'Search' ); ?>' : this.value;" /> <button type="submit" class="adminbar-button"><span><?php _e('Search'); ?></span></button> |
|---|
| 747 | + <input class="adminbar-input" name="s" id="adminbar-search" type="text" title="<?php esc_attr_e( 'Search' ); ?>" value="" maxlength="150" /> |
|---|
| 748 | + <button type="submit" class="adminbar-button"><span><?php _e('Search'); ?></span></button> |
|---|
| 749 | </form> |
|---|
| 750 | </div> |
|---|
| 751 | </div> |
|---|
| 752 | @@ -97,12 +120,36 @@ |
|---|
| 753 | |
|---|
| 754 | /* Helpers */ |
|---|
| 755 | function recursive_render( $id, &$menu_item ) { ?> |
|---|
| 756 | - <?php $menuclass = ( !empty( $menu_item['children'] ) ) ? 'menupop ' : ''; ?> |
|---|
| 757 | + <?php $menuclass = ( ! empty( $menu_item['children'] ) ) ? 'menupop ' : ''; ?> |
|---|
| 758 | |
|---|
| 759 | - <li class="<?php echo $menuclass . "ab-$id" ?><?php if ( !empty( $menu_item['meta']['class'] ) ) : ?><?php echo ' ' . $menu_item['meta']['class'] ?><?php endif; ?>"> |
|---|
| 760 | - <a href="<?php echo strip_tags( $menu_item['href'] ) ?>"<?php if ( !empty( $menu_item['meta']['onclick'] ) ) :?> onclick="<?php echo $menu_item['meta']['onclick'] ?>"<?php endif; ?><?php if ( !empty( $menu_item['meta']['target'] ) ) :?> target="<?php echo $menu_item['meta']['target'] ?>"<?php endif; ?>><?php if ( !empty( $menuclass ) ) : ?><span><?php endif; ?><?php echo $menu_item['title'] ?><?php if ( !empty( $menuclass ) ) : ?></span><?php endif; ?></a> |
|---|
| 761 | + <li class="<?php echo $menuclass . "ab-$id" ?><?php |
|---|
| 762 | + if ( ! empty( $menu_item['meta']['class'] ) ) : |
|---|
| 763 | + echo ' ' . $menu_item['meta']['class']; |
|---|
| 764 | + endif; |
|---|
| 765 | + ?>"> |
|---|
| 766 | + <a href="<?php echo strip_tags( $menu_item['href'] ) ?>"<?php |
|---|
| 767 | + if ( ! empty( $menu_item['meta']['onclick'] ) ) : |
|---|
| 768 | + ?> onclick="<?php echo $menu_item['meta']['onclick']; ?>"<?php |
|---|
| 769 | + endif; |
|---|
| 770 | + if ( ! empty( $menu_item['meta']['target'] ) ) : |
|---|
| 771 | + ?> target="<?php echo $menu_item['meta']['target']; ?>"<?php |
|---|
| 772 | + endif; |
|---|
| 773 | + |
|---|
| 774 | + ?>><?php |
|---|
| 775 | + |
|---|
| 776 | + if ( ! empty( $menuclass ) ) : |
|---|
| 777 | + ?><span><?php |
|---|
| 778 | + endif; |
|---|
| 779 | + |
|---|
| 780 | + echo $menu_item['title']; |
|---|
| 781 | + |
|---|
| 782 | + if ( ! empty( $menuclass ) ) : |
|---|
| 783 | + ?></span><?php |
|---|
| 784 | + endif; |
|---|
| 785 | + |
|---|
| 786 | + ?></a> |
|---|
| 787 | |
|---|
| 788 | - <?php if ( !empty( $menu_item['children'] ) ) : ?> |
|---|
| 789 | + <?php if ( ! empty( $menu_item['children'] ) ) : ?> |
|---|
| 790 | <ul> |
|---|
| 791 | <?php foreach ( $menu_item['children'] as $child_id => $child_menu_item ) : ?> |
|---|
| 792 | <?php $this->recursive_render( $child_id, $child_menu_item ); ?> |
|---|
| 793 | @@ -110,7 +157,7 @@ |
|---|
| 794 | </ul> |
|---|
| 795 | <?php endif; ?> |
|---|
| 796 | |
|---|
| 797 | - <?php if ( !empty( $menu_item['meta']['html'] ) ) : ?> |
|---|
| 798 | + <?php if ( ! empty( $menu_item['meta']['html'] ) ) : ?> |
|---|
| 799 | <?php echo $menu_item['meta']['html']; ?> |
|---|
| 800 | <?php endif; ?> |
|---|
| 801 | </li><?php |
|---|
| 802 | @@ -124,14 +171,29 @@ |
|---|
| 803 | return true; |
|---|
| 804 | } |
|---|
| 805 | |
|---|
| 806 | - if ( !empty( $menu->{$id}['children'] ) ) |
|---|
| 807 | + if ( ! empty( $menu->{$id}['children'] ) ) |
|---|
| 808 | $this->add_node( $parent_id, $menu->{$id}['children'], $child ); |
|---|
| 809 | } |
|---|
| 810 | + |
|---|
| 811 | $child = null; |
|---|
| 812 | |
|---|
| 813 | return false; |
|---|
| 814 | } |
|---|
| 815 | |
|---|
| 816 | + function add_menus() { |
|---|
| 817 | + add_action( 'wp_before_admin_bar_render', 'wp_admin_bar_me_separator', 10 ); |
|---|
| 818 | + add_action( 'wp_before_admin_bar_render', 'wp_admin_bar_my_account_menu', 20 ); |
|---|
| 819 | + add_action( 'wp_before_admin_bar_render', 'wp_admin_bar_my_blogs_menu', 30 ); |
|---|
| 820 | + add_action( 'wp_before_admin_bar_render', 'wp_admin_bar_blog_separator', 40 ); |
|---|
| 821 | + add_action( 'wp_before_admin_bar_render', 'wp_admin_bar_bloginfo_menu', 50 ); |
|---|
| 822 | + add_action( 'wp_before_admin_bar_render', 'wp_admin_bar_edit_menu', 100 ); |
|---|
| 823 | + |
|---|
| 824 | + if ( is_multisite() && is_super_admin() && function_exists('wp_admin_bar_superadmin_settings_menu') ) |
|---|
| 825 | + add_action( 'wp_before_admin_bar_render', 'wp_admin_bar_superadmin_settings_menu', 1000 ); |
|---|
| 826 | + |
|---|
| 827 | + do_action('add_admin_bar_menus'); |
|---|
| 828 | + } |
|---|
| 829 | + |
|---|
| 830 | function remove_node( $id, &$menu ) { |
|---|
| 831 | foreach( $menu as $menu_item_id => &$menu_item ) { |
|---|
| 832 | if ( $menu_item_id == $id ) { |
|---|
| 833 | @@ -139,7 +201,7 @@ |
|---|
| 834 | return true; |
|---|
| 835 | } |
|---|
| 836 | |
|---|
| 837 | - if ( !empty( $menu->{$menu_item_id}['children'] ) ) |
|---|
| 838 | + if ( ! empty( $menu->{$menu_item_id}['children'] ) ) |
|---|
| 839 | $this->remove_node( $id, $menu->{$menu_item_id}['children'] ); |
|---|
| 840 | } |
|---|
| 841 | |
|---|
| 842 | @@ -148,7 +210,8 @@ |
|---|
| 843 | |
|---|
| 844 | function load_user_locale_translations() { |
|---|
| 845 | $this->need_to_change_locale = ( get_locale() != $this->user->locale ); |
|---|
| 846 | - if ( !$this->need_to_change_locale ) return; |
|---|
| 847 | + if ( ! $this->need_to_change_locale ) |
|---|
| 848 | + return; |
|---|
| 849 | $this->previous_translations = get_translations_for_domain( 'default' ); |
|---|
| 850 | $this->adminbar_locale_filter = lambda( '$_', '$GLOBALS["wp_admin_bar"]->user->locale;' ); |
|---|
| 851 | unload_textdomain( 'default' ); |
|---|
| 852 | @@ -159,10 +222,10 @@ |
|---|
| 853 | |
|---|
| 854 | function unload_user_locale_translations() { |
|---|
| 855 | global $l10n; |
|---|
| 856 | - if ( !$this->changed_locale ) return; |
|---|
| 857 | + if ( ! $this->changed_locale ) |
|---|
| 858 | + return; |
|---|
| 859 | remove_filter( 'locale', $this->adminbar_locale_filter ); |
|---|
| 860 | $l10n['default'] = &$this->previous_translations; |
|---|
| 861 | - |
|---|
| 862 | } |
|---|
| 863 | } |
|---|
| 864 | ?> |
|---|
| 865 | Index: wp-includes/admin-bar/admin-bar-debug.php |
|---|
| 866 | =================================================================== |
|---|
| 867 | --- wp-includes/admin-bar/admin-bar-debug.php (revision 16029) |
|---|
| 868 | +++ wp-includes/admin-bar/admin-bar-debug.php (working copy) |
|---|
| 869 | @@ -11,7 +11,7 @@ |
|---|
| 870 | function wp_admin_bar_debug_menu() { |
|---|
| 871 | global $wp_admin_bar, $wpdb; |
|---|
| 872 | |
|---|
| 873 | - if ( !is_super_admin() || !apply_filters('wp_admin_bar_enable_debug_menu', false) ) |
|---|
| 874 | + if ( ! is_super_admin() || ! apply_filters('wp_admin_bar_enable_debug_menu', false ) ) |
|---|
| 875 | return; |
|---|
| 876 | |
|---|
| 877 | $queries = $wpdb->num_queries; |
|---|
| 878 | @@ -44,6 +44,15 @@ |
|---|
| 879 | ?> |
|---|
| 880 | <script type="text/javascript"> |
|---|
| 881 | /* <![CDATA[ */ |
|---|
| 882 | + var toggle_query_list = function() { |
|---|
| 883 | + var querylist = document.getElementById( 'querylist' ); |
|---|
| 884 | + if( querylist && querylist.style.display == 'block' ) { |
|---|
| 885 | + querylist.style.display='none'; |
|---|
| 886 | + } else { |
|---|
| 887 | + querylist.style.display='block'; |
|---|
| 888 | + } |
|---|
| 889 | + } |
|---|
| 890 | + |
|---|
| 891 | var clickDebugLink = function( targetsGroupId, obj) { |
|---|
| 892 | var sectionDivs = document.getElementById( targetsGroupId ).childNodes; |
|---|
| 893 | for ( var i = 0; i < sectionDivs.length; i++ ) { |
|---|
| 894 | @@ -158,4 +167,4 @@ |
|---|
| 895 | return $out; |
|---|
| 896 | } |
|---|
| 897 | |
|---|
| 898 | -?> |
|---|
| 899 | \ No newline at end of file |
|---|
| 900 | +?> |
|---|
| 901 | Index: wp-includes/admin-bar/admin-bar-superadmin.php |
|---|
| 902 | =================================================================== |
|---|
| 903 | --- wp-includes/admin-bar/admin-bar-superadmin.php (revision 16029) |
|---|
| 904 | +++ wp-includes/admin-bar/admin-bar-superadmin.php (working copy) |
|---|
| 905 | @@ -1,19 +1,5 @@ |
|---|
| 906 | <?php |
|---|
| 907 | -/** |
|---|
| 908 | - * Use the $wp_admin_bar global to add a menu for site admins and administrator controls. |
|---|
| 909 | - */ |
|---|
| 910 | -function wp_admin_bar_superadmin_menus() { |
|---|
| 911 | - global $wp_admin_bar, $wpdb; |
|---|
| 912 | |
|---|
| 913 | - if ( !is_object( $wp_admin_bar ) || !is_super_admin() ) |
|---|
| 914 | - return false; |
|---|
| 915 | - |
|---|
| 916 | - /* Add the "Super Admin" settings sub menu */ |
|---|
| 917 | - if ( is_multisite() ) |
|---|
| 918 | - wp_admin_bar_superadmin_settings_menu(); |
|---|
| 919 | -} |
|---|
| 920 | -add_action( 'wp_before_admin_bar_render', 'wp_admin_bar_superadmin_menus', 1000 ); |
|---|
| 921 | - |
|---|
| 922 | /** |
|---|
| 923 | * |
|---|
| 924 | * Use the $wp_admin_bar global to add the super admin menu, providing admin options only visible to super admins. |
|---|
| 925 | @@ -21,35 +7,75 @@ |
|---|
| 926 | function wp_admin_bar_superadmin_settings_menu() { |
|---|
| 927 | global $wp_admin_bar, $current_blog, $current_user; |
|---|
| 928 | |
|---|
| 929 | - if ( !is_object( $wp_admin_bar ) || !is_super_admin() ) |
|---|
| 930 | - return false; |
|---|
| 931 | - |
|---|
| 932 | /* Add the main superadmin menu item */ |
|---|
| 933 | - $wp_admin_bar->add_menu( array( 'id' => 'superadmin', 'title' => 'μ', 'href' => '', 'meta' => array( 'class' => 'ab-sadmin' ) ) ); |
|---|
| 934 | + $wp_admin_bar->add_menu( array( |
|---|
| 935 | + 'id' => 'superadmin', |
|---|
| 936 | + 'title' => 'μ', |
|---|
| 937 | + 'href' => '', |
|---|
| 938 | + 'meta' => array( 'class' => 'ab-sadmin' ), |
|---|
| 939 | + ) ); |
|---|
| 940 | |
|---|
| 941 | wp_admin_bar_build_snackmenu(); |
|---|
| 942 | |
|---|
| 943 | /* Get the settings we need for the current site */ |
|---|
| 944 | $matureaction = $current_blog->mature ? 'unmatureblog' : 'matureblog'; |
|---|
| 945 | - $maturetext = $current_blog->mature ? esc_attr__('Unmark as mature') : esc_attr__('Mark as mature'); |
|---|
| 946 | - $suspendtext = $current_blog->spam ? esc_attr('Unsuspend site') : esc_attr('Suspend site'); |
|---|
| 947 | + $maturetext_confirm = $current_blog->mature ? |
|---|
| 948 | + sprintf( |
|---|
| 949 | + esc_attr__( 'Are you sure you want to unmark %s as mature?' ), |
|---|
| 950 | + $current_blog->domain |
|---|
| 951 | + ) : |
|---|
| 952 | + sprintf( |
|---|
| 953 | + esc_attr__( 'Are you sure you want to mark %s as mature?' ), |
|---|
| 954 | + $current_blog->domain |
|---|
| 955 | + ); |
|---|
| 956 | + |
|---|
| 957 | $suspendaction = $current_blog->spam ? 'unspamblog' : 'spamblog'; |
|---|
| 958 | - $mature_url = network_admin_url( "edit.php?action=confirm&action2={$matureaction}&id={$current_blog->blog_id}&msg=" . urlencode( 'Are you sure you want to ' . strtolower( $maturetext ) . " {$current_blog->domain} as mature?" ) ); |
|---|
| 959 | - $suspend_url = network_admin_url( "edit.php?action=confirm&action2={$suspendaction}&id={$current_blog->blog_id}&msg=" . urlencode( 'Are you sure you want to ' . strtolower( $suspendtext ) . " {$current_blog->domain} ?" ) ); |
|---|
| 960 | + $suspendtext_confirm = $current_blog->spam ? |
|---|
| 961 | + sprintf( |
|---|
| 962 | + esc_attr__( 'Are you sure you want to unsuspend site %s?' ), |
|---|
| 963 | + $current_blog->domain |
|---|
| 964 | + ) : |
|---|
| 965 | + sprintf( |
|---|
| 966 | + esc_attr__( 'Are you sure you want to suspend site %s?' ), |
|---|
| 967 | + $current_blog->domain |
|---|
| 968 | + ); |
|---|
| 969 | + |
|---|
| 970 | + $mature_url = network_admin_url( "edit.php?action=confirm&action2={$matureaction}&id={$current_blog->blog_id}&msg=" . urlencode( $maturetext_confirm ) ); |
|---|
| 971 | + $suspend_url = network_admin_url( "edit.php?action=confirm&action2={$suspendaction}&id={$current_blog->blog_id}&msg=" . urlencode( $suspendtext_confirm ) ); |
|---|
| 972 | |
|---|
| 973 | /* Add the submenu items to the Super Admin menu */ |
|---|
| 974 | - $wp_admin_bar->add_menu( array( 'parent' => 'superadmin', 'title' => __( 'Site Dashboard' ), 'href' => admin_url(), 'position' => 10 ) ); |
|---|
| 975 | - $wp_admin_bar->add_menu( array( 'parent' => 'superadmin', 'title' => __( 'Site Options' ), 'href' => network_admin_url( "sites.php?action=blogs&searchaction=id&s={$current_blog->blog_id}" ), 'position' => 30 ) ); |
|---|
| 976 | - $wp_admin_bar->add_menu( array( 'parent' => 'superadmin', 'title' => "$maturetext", 'href' => $mature_url, 'position' => 50 ) ); |
|---|
| 977 | - $wp_admin_bar->add_menu( array( 'parent' => 'superadmin', 'title' => "$suspendtext", 'href' => $suspend_url, 'position' => 80 ) ); |
|---|
| 978 | + $wp_admin_bar->add_menu( array( |
|---|
| 979 | + 'parent' => 'superadmin', |
|---|
| 980 | + 'title' => __( 'Site Dashboard' ), |
|---|
| 981 | + 'href' => admin_url(), |
|---|
| 982 | + 'position' => 10, |
|---|
| 983 | + ) ); |
|---|
| 984 | + |
|---|
| 985 | + $wp_admin_bar->add_menu( array( |
|---|
| 986 | + 'parent' => 'superadmin', |
|---|
| 987 | + 'title' => __( 'Site Options' ), |
|---|
| 988 | + 'href' => network_admin_url( "sites.php?action=blogs&searchaction=id&s={$current_blog->blog_id}" ), |
|---|
| 989 | + 'position' => 30, |
|---|
| 990 | + ) ); |
|---|
| 991 | + |
|---|
| 992 | + $wp_admin_bar->add_menu( array( |
|---|
| 993 | + 'parent' => 'superadmin', |
|---|
| 994 | + 'title' => ( $current_blog->mature ? __('Unmark as mature') : __('Mark as mature') ), |
|---|
| 995 | + 'href' => $mature_url, |
|---|
| 996 | + 'position' => 50, |
|---|
| 997 | + ) ); |
|---|
| 998 | + |
|---|
| 999 | + $wp_admin_bar->add_menu( array( |
|---|
| 1000 | + 'parent' => 'superadmin', |
|---|
| 1001 | + 'title' => ( $current_blog->spam ? __('Unsuspend site') : __('Suspend site') ), |
|---|
| 1002 | + 'href' => $suspend_url, |
|---|
| 1003 | + 'position' => 80, |
|---|
| 1004 | + ) ); |
|---|
| 1005 | } |
|---|
| 1006 | |
|---|
| 1007 | function wp_admin_bar_build_snackmenu() { |
|---|
| 1008 | global $wp_admin_bar, $menu, $submenu, $pagenow; |
|---|
| 1009 | |
|---|
| 1010 | - if ( !is_object( $wp_admin_bar ) || !is_super_admin() ) |
|---|
| 1011 | - return false; |
|---|
| 1012 | - |
|---|
| 1013 | // Hide moderation count, filter removed at the bottom of this function |
|---|
| 1014 | add_filter( 'wp_count_comments', 'wp_admin_bar_removemodcount' ); |
|---|
| 1015 | |
|---|
| 1016 | @@ -60,7 +86,11 @@ |
|---|
| 1017 | require_once( ABSPATH . 'wp-admin/menu.php' ); |
|---|
| 1018 | |
|---|
| 1019 | /* Add the snack menu submenu to the superadmin menu */ |
|---|
| 1020 | - $wp_admin_bar->add_menu( array( 'parent' => 'superadmin', 'title' => 'Snack Menu', 'href' => '/wp-admin/' ) ); |
|---|
| 1021 | + $wp_admin_bar->add_menu( array( |
|---|
| 1022 | + 'parent' => 'superadmin', |
|---|
| 1023 | + 'title' => __( 'Snack Menu' ), |
|---|
| 1024 | + 'href' => '/wp-admin/', |
|---|
| 1025 | + ) ); |
|---|
| 1026 | |
|---|
| 1027 | /* Loop through the submenus and add them */ |
|---|
| 1028 | foreach ( (array) $menu as $key => $item ) { |
|---|
| 1029 | @@ -74,11 +104,30 @@ |
|---|
| 1030 | |
|---|
| 1031 | if ( false !== $pos = strpos($menu_file, '?') ) |
|---|
| 1032 | $menu_file = substr($menu_file, 0, $pos); |
|---|
| 1033 | - if ( ( ('index.php' != $submenu[$item[2]][0][2]) && file_exists(WP_PLUGIN_DIR . "/$menu_file") ) || !empty($menu_hook)) { |
|---|
| 1034 | + |
|---|
| 1035 | + if ( |
|---|
| 1036 | + ( |
|---|
| 1037 | + 'index.php' != $submenu[$item[2]][0][2] && |
|---|
| 1038 | + file_exists( WP_PLUGIN_DIR . "/$menu_file" ) |
|---|
| 1039 | + ) || |
|---|
| 1040 | + ! empty( $menu_hook ) |
|---|
| 1041 | + ) { |
|---|
| 1042 | + |
|---|
| 1043 | $admin_is_parent = true; |
|---|
| 1044 | - $wp_admin_bar->add_menu( array( 'parent' => 'snack-menu', 'title' => $item[0], 'href' => admin_url("admin.php?page={$submenu[$item[2]][0][2]}") ) ); |
|---|
| 1045 | + $wp_admin_bar->add_menu( array( |
|---|
| 1046 | + 'parent' => 'snack-menu', |
|---|
| 1047 | + 'title' => $item[0], |
|---|
| 1048 | + 'href' => admin_url("admin.php?page={$submenu[$item[2]][0][2]}"), |
|---|
| 1049 | + ) ); |
|---|
| 1050 | + |
|---|
| 1051 | } else { |
|---|
| 1052 | - $wp_admin_bar->add_menu( array( 'parent' => 'snack-menu', 'title' => $item[0], 'href' => admin_url("{$submenu[$item[2]][0][2]}") ) ); |
|---|
| 1053 | + |
|---|
| 1054 | + $wp_admin_bar->add_menu( array( |
|---|
| 1055 | + 'parent' => 'snack-menu', |
|---|
| 1056 | + 'title' => $item[0], |
|---|
| 1057 | + 'href' => admin_url("{$submenu[$item[2]][0][2]}"), |
|---|
| 1058 | + ) ); |
|---|
| 1059 | + |
|---|
| 1060 | } |
|---|
| 1061 | } else if ( current_user_can($item[1]) ) { |
|---|
| 1062 | $menu_hook = get_plugin_page_hook($item[2], 'admin.php'); |
|---|
| 1063 | @@ -86,15 +135,34 @@ |
|---|
| 1064 | |
|---|
| 1065 | if ( false !== $pos = strpos($menu_file, '?') ) |
|---|
| 1066 | $menu_file = substr($menu_file, 0, $pos); |
|---|
| 1067 | - if ( ('index.php' != $item[2]) && file_exists(WP_PLUGIN_DIR . "/$menu_file") || !empty($menu_hook) ) { |
|---|
| 1068 | + |
|---|
| 1069 | + if ( |
|---|
| 1070 | + ( |
|---|
| 1071 | + 'index.php' != $item[2] && |
|---|
| 1072 | + file_exists( WP_PLUGIN_DIR . "/$menu_file" ) |
|---|
| 1073 | + ) || |
|---|
| 1074 | + ! empty($menu_hook) |
|---|
| 1075 | + ) { |
|---|
| 1076 | + |
|---|
| 1077 | $admin_is_parent = true; |
|---|
| 1078 | - $wp_admin_bar->add_menu( array( 'parent' => 'snack-menu', 'title' => $item[0], 'href' => admin_url("admin.php?page={$item[2]}") ) ); |
|---|
| 1079 | + $wp_admin_bar->add_menu( array( |
|---|
| 1080 | + 'parent' => 'snack-menu', |
|---|
| 1081 | + 'title' => $item[0], |
|---|
| 1082 | + 'href' => admin_url("admin.php?page={$item[2]}"), |
|---|
| 1083 | + ) ); |
|---|
| 1084 | + |
|---|
| 1085 | } else { |
|---|
| 1086 | - $wp_admin_bar->add_menu( array( 'parent' => 'snack-menu', 'title' => $item[0], 'href' => admin_url("{$item[2]}") ) ); |
|---|
| 1087 | + |
|---|
| 1088 | + $wp_admin_bar->add_menu( array( |
|---|
| 1089 | + 'parent' => 'snack-menu', |
|---|
| 1090 | + 'title' => $item[0], |
|---|
| 1091 | + 'href' => admin_url("{$item[2]}"), |
|---|
| 1092 | + ) ); |
|---|
| 1093 | + |
|---|
| 1094 | } |
|---|
| 1095 | } |
|---|
| 1096 | |
|---|
| 1097 | - if ( !empty($submenu[$item[2]]) ) { |
|---|
| 1098 | + if ( ! empty($submenu[$item[2]]) ) { |
|---|
| 1099 | $first = true; |
|---|
| 1100 | $unique_submenu = array(); |
|---|
| 1101 | |
|---|
| 1102 | @@ -113,21 +181,51 @@ |
|---|
| 1103 | |
|---|
| 1104 | $menu_hook = get_plugin_page_hook($sub_item[2], $item[2]); |
|---|
| 1105 | $sub_file = $sub_item[2]; |
|---|
| 1106 | + |
|---|
| 1107 | if ( false !== $pos = strpos($sub_file, '?') ) |
|---|
| 1108 | $sub_file = substr($sub_file, 0, $pos); |
|---|
| 1109 | |
|---|
| 1110 | - if ( ( ('index.php' != $sub_item[2]) && file_exists(WP_PLUGIN_DIR . "/$sub_file") ) || ! empty($menu_hook) ) { |
|---|
| 1111 | + if ( |
|---|
| 1112 | + ( |
|---|
| 1113 | + 'index.php' != $sub_item[2] && |
|---|
| 1114 | + file_exists( WP_PLUGIN_DIR . "/$sub_file" ) |
|---|
| 1115 | + ) || |
|---|
| 1116 | + ! empty($menu_hook) |
|---|
| 1117 | + ) { |
|---|
| 1118 | // If admin.php is the current page or if the parent exists as a file in the plugins or admin dir |
|---|
| 1119 | - |
|---|
| 1120 | - $parent_exists = (!$admin_is_parent && file_exists(WP_PLUGIN_DIR . "/$menu_file") && !is_dir(WP_PLUGIN_DIR . "/{$item[2]}") ) || file_exists($menu_file); |
|---|
| 1121 | - if ( $parent_exists ) |
|---|
| 1122 | - $wp_admin_bar->add_menu( array( 'parent' => sanitize_title( $item[0] ), 'title' => $sub_item[0], 'href' => admin_url("{$item[2]}?page={$sub_item[2]}") ) ); |
|---|
| 1123 | - elseif ( 'admin.php' == $pagenow || !$parent_exists ) |
|---|
| 1124 | - $wp_admin_bar->add_menu( array( 'parent' => sanitize_title( $item[0] ), 'title' => $sub_item[0], 'href' => admin_url("admin.php?page={$sub_item[2]}") ) ); |
|---|
| 1125 | - else |
|---|
| 1126 | - $wp_admin_bar->add_menu( array( 'parent' => sanitize_title( $item[0] ), 'title' => $sub_item[0], 'href' => admin_url("{$item[2]}?page={$sub_item[2]}") ) ); |
|---|
| 1127 | + if ( |
|---|
| 1128 | + ( |
|---|
| 1129 | + ! $admin_is_parent && |
|---|
| 1130 | + file_exists(WP_PLUGIN_DIR . "/$menu_file") && |
|---|
| 1131 | + ! is_dir(WP_PLUGIN_DIR . "/{$item[2]}") |
|---|
| 1132 | + ) || |
|---|
| 1133 | + file_exists( $menu_file ) |
|---|
| 1134 | + ) { |
|---|
| 1135 | + |
|---|
| 1136 | + $wp_admin_bar->add_menu( array( |
|---|
| 1137 | + 'parent' => sanitize_title( $item[0] ), |
|---|
| 1138 | + 'title' => $sub_item[0], |
|---|
| 1139 | + 'href' => admin_url("{$item[2]}?page={$sub_item[2]}"), |
|---|
| 1140 | + ) ); |
|---|
| 1141 | + |
|---|
| 1142 | + } else { |
|---|
| 1143 | + |
|---|
| 1144 | + $wp_admin_bar->add_menu( array( |
|---|
| 1145 | + 'parent' => sanitize_title( $item[0] ), |
|---|
| 1146 | + 'title' => $sub_item[0], |
|---|
| 1147 | + 'href' => admin_url("admin.php?page={$sub_item[2]}"), |
|---|
| 1148 | + ) ); |
|---|
| 1149 | + |
|---|
| 1150 | + } |
|---|
| 1151 | + |
|---|
| 1152 | } else { |
|---|
| 1153 | - $wp_admin_bar->add_menu( array( 'parent' => sanitize_title( $item[0] ), 'title' => $sub_item[0], 'href' => admin_url("{$sub_item[2]}") ) ); |
|---|
| 1154 | + |
|---|
| 1155 | + $wp_admin_bar->add_menu( array( |
|---|
| 1156 | + 'parent' => sanitize_title( $item[0] ), |
|---|
| 1157 | + 'title' => $sub_item[0], |
|---|
| 1158 | + 'href' => admin_url("{$sub_item[2]}"), |
|---|
| 1159 | + ) ); |
|---|
| 1160 | + |
|---|
| 1161 | } |
|---|
| 1162 | } |
|---|
| 1163 | } |
|---|
| 1164 | @@ -153,4 +251,4 @@ |
|---|
| 1165 | return (object) $stats; |
|---|
| 1166 | } |
|---|
| 1167 | |
|---|
| 1168 | -?> |
|---|
| 1169 | \ No newline at end of file |
|---|
| 1170 | +?> |
|---|
| 1171 | Index: wp-includes/admin-bar/admin-bar-css.php |
|---|
| 1172 | =================================================================== |
|---|
| 1173 | --- wp-includes/admin-bar/admin-bar-css.php (revision 16029) |
|---|
| 1174 | +++ wp-includes/admin-bar/admin-bar-css.php (working copy) |
|---|
| 1175 | @@ -1,453 +0,0 @@ |
|---|
| 1176 | -<?php |
|---|
| 1177 | - header( 'Content-type: text/css' ); |
|---|
| 1178 | - $proto = ( empty( $_GET['p'] ) ) ? 'http://' : 'https://'; |
|---|
| 1179 | - $text_direction = $_GET['td']; |
|---|
| 1180 | - if ( 'ltr' == $text_direction || empty( $_GET['td'] ) ) |
|---|
| 1181 | - $sprite = $_GET['inc'] . 'images/admin-bar-sprite.png?d=08102010'; |
|---|
| 1182 | - else |
|---|
| 1183 | - $sprite = $_GET['inc'] . 'images/admin-bar-sprite-rtl.png?d=08102010'; |
|---|
| 1184 | -?> |
|---|
| 1185 | - |
|---|
| 1186 | -#wpadminbar { direction:ltr; background:#666 url(<?php echo $sprite; ?>) 0 -222px repeat-x; color:#ddd; font:12px Arial, Helvetica, sans-serif; height:28px; left:0; margin:0; position:fixed; top:0; width:100%; z-index:99999; min-width: 960px; } |
|---|
| 1187 | -#wpadminbar ul, #wpadminbar ul li { position: relative; z-index: 99999; } |
|---|
| 1188 | -#wpadminbar ul li img { vertical-align: middle !important; margin-right: 8px !important; border: none !important; padding: 0 !important; } |
|---|
| 1189 | -#wpadminbar .quicklinks > ul > li > a { border-right: 1px solid #686868; border-left: 1px solid #808080; } |
|---|
| 1190 | -#wpadminbar .quicklinks > ul > li.ab-subscriptions > a, #wpadminbar .quicklinks > ul > li:last-child > a { border-right: none; } |
|---|
| 1191 | -#wpadminbar .quicklinks > ul > li.hover > a { border-left-color: #707070; } |
|---|
| 1192 | -#wpadminbar a { outline: none; } |
|---|
| 1193 | -#wpadminbar .avatar {border:1px solid #999 !important;padding:0 !important;margin:-3px 5px 0 0 !important;vertical-align:middle;float:none;display:inline !important; } |
|---|
| 1194 | -#wpadminbar .menupop ul li a {color:#555 !important;text-shadow:none;font-weight:normal;white-space:nowrap;} |
|---|
| 1195 | -#wpadminbar .menupop a > span {background:url(<?php echo $sprite; ?>) 100% 100.4% no-repeat;padding-right:.8em;line-height: 28px;} |
|---|
| 1196 | -#wpadminbar .menupop ul li a > span { display: block; background:url(<?php echo $sprite; ?>) 100% 97.2% no-repeat;padding-right:1.5em;line-height: 28px;} |
|---|
| 1197 | -#wpadminbar .menupop ul li a span#awaiting-mod { display: inline; background: #aaa; color: #fff; padding: 1px 5px; font-size: 10px; font-family: verdana; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; } |
|---|
| 1198 | -#wpadminbar .menupop ul li a:hover span#awaiting-mod { background: #fff; color: #888; } |
|---|
| 1199 | -#wpadminbar .menupop ul {-moz-box-shadow:0 4px 8px rgba(0,0,0,0.1);-webkit-box-shadow:0 4px 8px rgba(0,0,0,0.1);background:#fff;display:none;position:absolute;border:1px solid #dfdfdf;border-top:none !important;float:none} |
|---|
| 1200 | -html>body #wpadminbar .menupop ul {background:rgba(255,255,255,0.97);border-color:rgba(0,0,0,0.1);} |
|---|
| 1201 | -#wpadminbar .menupop.ab-my-account ul, #wpadminbar .menupop.ab-my-dash ul, #wpadminbar .menupop.ab-new-post ul {min-width:140px} |
|---|
| 1202 | -#wpadminbar .menupop li {float:none;margin:0;padding:0;background-image:none;} |
|---|
| 1203 | -#wpadminbar .quicklinks a {border:none;color:#ddd !important;text-shadow:#555 0px -1px 0px;display:block;font:13px Arial, Helvetica, sans-serif;font-weight:normal;letter-spacing:normal;padding:0 0.85em;line-height:28px;text-decoration:none !important;} |
|---|
| 1204 | -#wpadminbar .quicklinks a:hover {text-shadow:#333 0px -1px 0px;} |
|---|
| 1205 | -#wpadminbar li.ab-privacy { float: right; background: #333; } |
|---|
| 1206 | -#wpadminbar li.ab-privacy > a > span { background: none; padding: 0; } |
|---|
| 1207 | -#wpadminbar li.ab-privacy span#priv-icon { display: block; text-indent: -999em; background:url(<?php echo $sprite; ?>) 40% 59.7% no-repeat; padding: 0; width: 13px; margin-right: -3px; } |
|---|
| 1208 | - |
|---|
| 1209 | -#wpadminbar li.ab-sadmin { float: right; background: #555 } |
|---|
| 1210 | -#wpadminbar li.ab-sadmin ul, #wpadminbar li.ab-privacy ul { right: 0; float: right; } |
|---|
| 1211 | -#wpadminbar li.ab-sadmin > a { font-size: 11px !important; padding: 0 7px !important; border: none !important; border-left: 1px solid #666 !important; } |
|---|
| 1212 | - |
|---|
| 1213 | -#wpadminbar li.ab-sadmin ul a, #wpadminbar li.ab-privacy a { border-right: none !important; border-left: none !important; } |
|---|
| 1214 | -#wpadminbar li.ab-sadmin ul li { right: 0; float: right; text-align: left; width: 100%; } |
|---|
| 1215 | -#wpadminbar li.ab-sadmin ul li a { padding-left: 1.75em; } |
|---|
| 1216 | -#wpadminbar li.ab-sadmin ul li a > span { background:url(<?php echo $sprite; ?>) 0% 101.8% no-repeat;padding-left: 1.25em; margin-left: -1.25em; line-height: 28px; padding-right: 0 !important; } |
|---|
| 1217 | -#wpadminbar li a.loading { background: url(</ajax-loader.gif) 10px 50% no-repeat !important; padding-left: 29px; } |
|---|
| 1218 | -#wpadminbar li.subscribed a strong { background:url(<?php echo $sprite; ?>) 32% 59.8% no-repeat !important; text-indent: -999em; overflow: hidden; padding: 0 16px 0 0; height: 28px; display: block; float: left; margin-right: 2px; } |
|---|
| 1219 | - |
|---|
| 1220 | -#wpadminbar li:hover {background: #555 url(<?php echo $sprite; ?>) 0 -282px repeat-x;} |
|---|
| 1221 | -#wpadminbar li li:hover { color:#fff !important; background: #888 url(<?php echo $sprite; ?>) 0 -222px repeat-x !important;text-shadow: #666 0px -1px 0px;} |
|---|
| 1222 | -#wpadminbar li li:hover > a { color:#fff !important; } |
|---|
| 1223 | -.quicklinks ul {list-style:none;margin:0;padding:0;text-align:left} |
|---|
| 1224 | -.quicklinks ul li {float:left;margin:0} |
|---|
| 1225 | - |
|---|
| 1226 | -#adminbarlogin {float:left;display:inline;} |
|---|
| 1227 | - |
|---|
| 1228 | -#adminbarsearch {float:right; } |
|---|
| 1229 | -#adminbarsearch {height: 18px;padding: 3px;} |
|---|
| 1230 | -#adminbarsearch * {color: #555;font-size:12px;} |
|---|
| 1231 | -#adminbarsearch label, #adminbarsearch a { height: 28px; color: #ccc; display:block;float:left;padding:3px 4px;text-shadow:0px -1px 0px #444;} |
|---|
| 1232 | -#adminbarsearch a {text-decoration:underline;} |
|---|
| 1233 | -#adminbarsearch a:hover {color:#fff;} |
|---|
| 1234 | - |
|---|
| 1235 | -#wpadminbar li.ab-me:hover, #wpadminbar li.ab-blog:hover { background:none;} |
|---|
| 1236 | -#wpadminbar li.ab-me > a, #wpadminbar li.ab-blog > a { line-height: 18px !important; border: none !important; background:url(<?php echo $sprite; ?>) 100% 59.8% no-repeat; height: 28px; padding: 0 1.15em 0 0.7em; } |
|---|
| 1237 | -#wpadminbar li.ab-me > a.hover, #wpadminbar li.ab-blog > a.hover { background-position: 67% 59.8%; } |
|---|
| 1238 | -#wpadminbar li.ab-me img.avatar, #wpadminbar li.ab-blog img.avatar { margin: 4px 0 0 0 !important; vertical-align: middle; background: #eee; width: 16px !important; height: 16px !important; } |
|---|
| 1239 | -#wpadminbar li.ab-my-account a, #wpadminbar li.ab-bloginfo a { border-left: none !important; padding-left: 0.7em !important; margin-top: 0 !important; } |
|---|
| 1240 | -#wpadminbar li.ab-my-account > ul, #wpadminbar li.ab-bloginfo > ul { left: -7px; } |
|---|
| 1241 | -#wpadminbar ul li img { width: 16px !important; height: 16px !important; } |
|---|
| 1242 | - |
|---|
| 1243 | -#wpadminbar ul li a strong.count { text-shadow: none; background: #ddd; color: #555; margin-left: 5px; padding: 1px 6px; top: -1px; position: relative; font-size: 9px; -moz-border-radius: 7px; -webkit-border-radius: 7px; border-radius: 7px; font-weight: normal } |
|---|
| 1244 | - |
|---|
| 1245 | -#wpadminbar #q { |
|---|
| 1246 | - line-height:normal !important; |
|---|
| 1247 | - width:140px !important; |
|---|
| 1248 | - margin-top:0px !important; |
|---|
| 1249 | -} |
|---|
| 1250 | -.adminbar-input { |
|---|
| 1251 | - display:block !important; |
|---|
| 1252 | - float:left !important; |
|---|
| 1253 | - font:12px Arial,Helvetica,sans-serif !important; |
|---|
| 1254 | - border:1px solid #626262 !important; |
|---|
| 1255 | - padding:2px 3px !important; |
|---|
| 1256 | - margin-right:3px !important; |
|---|
| 1257 | - background:#ddd url(<?php echo $sprite; ?>) top left no-repeat !important; |
|---|
| 1258 | - -webkit-border-radius:0 !important; |
|---|
| 1259 | - -khtml-border-radius:0 !important; |
|---|
| 1260 | - -moz-border-radius:0 !important; |
|---|
| 1261 | - border-radius:0 !important; |
|---|
| 1262 | - outline:none; |
|---|
| 1263 | - text-shadow:0 1px 0 #fff; |
|---|
| 1264 | -} |
|---|
| 1265 | -button.adminbar-button { |
|---|
| 1266 | - position:relative; |
|---|
| 1267 | - border:0; |
|---|
| 1268 | - cursor:pointer; |
|---|
| 1269 | - overflow:visible; |
|---|
| 1270 | - margin:0 !important; |
|---|
| 1271 | - float:left; |
|---|
| 1272 | - background:url(<?php echo $sprite; ?>) right -107px no-repeat; |
|---|
| 1273 | - padding:0 14px 0 0; |
|---|
| 1274 | - text-align:center; |
|---|
| 1275 | -} |
|---|
| 1276 | -button.adminbar-button span { |
|---|
| 1277 | - position:relative; |
|---|
| 1278 | - display:block; |
|---|
| 1279 | - white-space:nowrap; |
|---|
| 1280 | - height:19px; |
|---|
| 1281 | - background:url(<?php echo $sprite; ?>) left -69px no-repeat; |
|---|
| 1282 | - padding:3px 0 0 14px; |
|---|
| 1283 | - font:12px Arial,Helvetica,sans-serif !important; |
|---|
| 1284 | - font-weight:bold !important; |
|---|
| 1285 | - color:#444 !important; |
|---|
| 1286 | - text-shadow:0px 1px 0px #eee !important; |
|---|
| 1287 | -} |
|---|
| 1288 | -button.adminbar-button:active { |
|---|
| 1289 | - background-position:right -184px !important; |
|---|
| 1290 | - text-shadow:0px 1px 0px #eee !important; |
|---|
| 1291 | -} |
|---|
| 1292 | -button.adminbar-button:hover span { |
|---|
| 1293 | - color:#000 !important; |
|---|
| 1294 | -} |
|---|
| 1295 | -button.adminbar-button:active span { |
|---|
| 1296 | - background-position:left -146px !important; |
|---|
| 1297 | -} |
|---|
| 1298 | -button.adminbar-button::-moz-focus-inner { |
|---|
| 1299 | - border:none; |
|---|
| 1300 | -} |
|---|
| 1301 | -@media screen and (-webkit-min-device-pixel-ratio:0) { |
|---|
| 1302 | - button.adminbar-button span { |
|---|
| 1303 | - margin-top: -1px; |
|---|
| 1304 | - } |
|---|
| 1305 | -} |
|---|
| 1306 | - |
|---|
| 1307 | -<?php if ( 'rtl' == $text_direction ) : ?> |
|---|
| 1308 | - #wpadminbar { |
|---|
| 1309 | - direction:rtl; |
|---|
| 1310 | - font-family: Tahoma, Arial ,sans-serif; |
|---|
| 1311 | - right:0; |
|---|
| 1312 | - left:auto; |
|---|
| 1313 | - } |
|---|
| 1314 | - #wpadminbar div, #wpadminbar ul, #wpadminbar ul li { |
|---|
| 1315 | - min-height: 0; |
|---|
| 1316 | - } |
|---|
| 1317 | - #wpadminbar ul li img { margin-left: 8px !important; margin-right: 0 !important; } |
|---|
| 1318 | - #wpadminbar .quicklinks > ul > li > a { border-left: 1px solid #686868; border-right: 1px solid #808080;} |
|---|
| 1319 | - #wpadminbar .quicklinks > ul > li.ab-subscriptions > a, #wpadminbar .quicklinks > ul > li:last-child > a { border-left: none; border-right: 1px solid #808080;} |
|---|
| 1320 | - #wpadminbar .quicklinks > ul > li.hover > a { border-right-color: #707070; border-left-color: #686868; } |
|---|
| 1321 | - #wpadminbar .avatar {margin: -3px 0 0 5px !important; float:none; } |
|---|
| 1322 | - #wpadminbar .menupop a > span {background-position: 0 100.4%; padding-left:.8em;} |
|---|
| 1323 | - #wpadminbar .menupop ul li a > span { background-position: 0% 97.2%; padding-right:0;padding-left:1.5em } |
|---|
| 1324 | - #wpadminbar .menupop ul {right: 0; width:100%; min-width:150px;} |
|---|
| 1325 | - #wpadminbar .ab-my-account ul { width:200px;} |
|---|
| 1326 | - #wpadminbar .ab-my-blogs ul { width:300px;} |
|---|
| 1327 | - #wpadminbar .ab-my-blogs ul ul { width:200px;} |
|---|
| 1328 | - #wpadminbar .ab-subscribe ul { width:150px;} |
|---|
| 1329 | - #wpadminbar .ab-bloginfo ul { width:200px;} |
|---|
| 1330 | - #wpadminbar .ab-subscribe ul { width:150px;} |
|---|
| 1331 | - #wpadminbar .ab-subscriptions ul { width:200px;} |
|---|
| 1332 | - #wpadminbar .menupop ul li {width:auto} |
|---|
| 1333 | - #wpadminbar .quicklinks a {font-family: Tahoma, Arial, Helvetica, sans-serif;} |
|---|
| 1334 | - #wpadminbar li.ab-privacy { float: left; } |
|---|
| 1335 | - #wpadminbar li.ab-privacy span#priv-icon { text-indent: 999em; background-position: 60% 59.7%; padding: 0; margin-right: 0; margin-left: -3px;} |
|---|
| 1336 | - |
|---|
| 1337 | - #wpadminbar li.ab-sadmin { float: left; } |
|---|
| 1338 | - #wpadminbar li.ab-sadmin ul, #wpadminbar li.ab-privacy ul { right: auto; left: 0; float: left; } |
|---|
| 1339 | - #wpadminbar li.ab-sadmin > a { border-right: 1px solid #666 !important; border-left:none !important;} |
|---|
| 1340 | - |
|---|
| 1341 | - #wpadminbar li.ab-sadmin ul a, #wpadminbar li.ab-privacy a { border-right: none !important; border-left: none !important; } |
|---|
| 1342 | - #wpadminbar li.ab-sadmin ul li { left: 0; right:auto; float: left; text-align: right; } |
|---|
| 1343 | - |
|---|
| 1344 | - |
|---|
| 1345 | - #wpadminbar li.ab-sadmin ul li a { padding-right: 1.75em; padding-left: 0 } |
|---|
| 1346 | - #wpadminbar li.ab-sadmin ul li a > span { background-position: 100% 101.8%; padding-right: 1.25em !important; padding-left: 0 !important; margin-right: -1.25em; margin-left: 0; } |
|---|
| 1347 | - #wpadminbar li a.loading { background-position: right 50% !important; padding-right: 29px; padding-left: 0;} |
|---|
| 1348 | - #wpadminbar li.subscribed a strong { background-position: 68% 59.8% !important; padding: 0 0 0 16px; float: right; margin-left: 2px; } |
|---|
| 1349 | - |
|---|
| 1350 | - |
|---|
| 1351 | - .quicklinks ul {text-align:right} |
|---|
| 1352 | - .quicklinks ul li {float:right;} |
|---|
| 1353 | - |
|---|
| 1354 | - #adminbarlogin {float:right;} |
|---|
| 1355 | - |
|---|
| 1356 | - #adminbarsearch {display:none;} |
|---|
| 1357 | - #adminbarsearch label, #adminbarsearch a { float:right;} |
|---|
| 1358 | - |
|---|
| 1359 | - #wpadminbar li.ab-me > a, #wpadminbar li.ab-blog > a { background-position:0% 59.8%; padding: 0 0.7em 0 1.15em; } |
|---|
| 1360 | - #wpadminbar li.ab-me > a.hover, #wpadminbar li.ab-blog > a.hover { background-position: 33% 59.8%; } |
|---|
| 1361 | - #wpadminbar li.ab-my-account a, #wpadminbar li.ab-bloginfo a { border-right: none !important; padding-right: 0.7em !important; } |
|---|
| 1362 | - #wpadminbar li.ab-my-account > ul, #wpadminbar li.ab-bloginfo > ul { right: -7px; left:auto;} |
|---|
| 1363 | - |
|---|
| 1364 | - #wpadminbar ul li a strong.count { margin-right: 5px; margin-left: 0; position:static} |
|---|
| 1365 | - |
|---|
| 1366 | - |
|---|
| 1367 | - .adminbar-input { |
|---|
| 1368 | - float:right !important; |
|---|
| 1369 | - font-family: Tahoma, Arial,Helvetica,sans-serif !important; |
|---|
| 1370 | - margin-right:3px !important; |
|---|
| 1371 | - margin-left:0 !important; |
|---|
| 1372 | - background-position: right top !important; |
|---|
| 1373 | - } |
|---|
| 1374 | - button.adminbar-button { |
|---|
| 1375 | - float:right; |
|---|
| 1376 | - background-position: left -107px; |
|---|
| 1377 | - padding:0 0 0 14px; |
|---|
| 1378 | - } |
|---|
| 1379 | - button.adminbar-button span { |
|---|
| 1380 | - background-position: right -69px; |
|---|
| 1381 | - padding:3px 14px 0 0; |
|---|
| 1382 | - font-family: Tahoma, Arial,Helvetica,sans-serif !important; |
|---|
| 1383 | - } |
|---|
| 1384 | - button.adminbar-button:active { |
|---|
| 1385 | - background-position:left -184px !important; |
|---|
| 1386 | - } |
|---|
| 1387 | - button.adminbar-button:active span { |
|---|
| 1388 | - background-position:right -146px !important; |
|---|
| 1389 | - } |
|---|
| 1390 | -<?php |
|---|
| 1391 | -endif; |
|---|
| 1392 | - |
|---|
| 1393 | -$current_theme = str_replace( '+', ' ', $_GET['t'] ); |
|---|
| 1394 | -$is_admin = $_GET['a']; |
|---|
| 1395 | -$is_super_admin = $_GET['sa']; |
|---|
| 1396 | - |
|---|
| 1397 | -if ( ( empty($_GET['nobump']) || $is_admin ) && !strpos( $_SERVER['REQUEST_URI'], 'media-upload.php' ) ) : ?> |
|---|
| 1398 | - body { padding-top: 28px !important; } |
|---|
| 1399 | -<?php endif; ?> |
|---|
| 1400 | - |
|---|
| 1401 | -<?php if ( in_array( $current_theme, array('H3', 'H4', 'The Journalist v1.9') ) ) { ?> |
|---|
| 1402 | - body { padding-top: 28px; background-position: 0px 28px; } |
|---|
| 1403 | -<?php } ?> |
|---|
| 1404 | - |
|---|
| 1405 | -<?php if ( $is_super_admin ) : ?> |
|---|
| 1406 | - #querylist { |
|---|
| 1407 | - font-family: Arial, Tahoma, sans-serif; |
|---|
| 1408 | - display: none; |
|---|
| 1409 | - position: absolute; |
|---|
| 1410 | - top: 50px; |
|---|
| 1411 | - left: 50px; |
|---|
| 1412 | - right: 50px; |
|---|
| 1413 | - background: #fff; |
|---|
| 1414 | - padding: 20px; |
|---|
| 1415 | - -moz-box-shadow: 0 0 15px #888; |
|---|
| 1416 | - -webkit-box-shadow: 0 0 15px #888; |
|---|
| 1417 | - box-shadow: 0 0 15px #888; |
|---|
| 1418 | - z-index: 99999; |
|---|
| 1419 | - border: 10px solid #f0f0f0; |
|---|
| 1420 | - color: #000; |
|---|
| 1421 | - line-height: 150% !important; |
|---|
| 1422 | - } |
|---|
| 1423 | - #querylist pre { |
|---|
| 1424 | - font-size: 12px; |
|---|
| 1425 | - padding: 10px; |
|---|
| 1426 | - } |
|---|
| 1427 | - |
|---|
| 1428 | - #querylist h1 { |
|---|
| 1429 | - font-family: georgia, times, serif; |
|---|
| 1430 | - text-align: center; |
|---|
| 1431 | - font-size: 24px; |
|---|
| 1432 | - padding: 20px 5px; |
|---|
| 1433 | - background: #eee; |
|---|
| 1434 | - color: #555; |
|---|
| 1435 | - margin: 0; |
|---|
| 1436 | - } |
|---|
| 1437 | - #querylist div#debug-status { |
|---|
| 1438 | - background: #ccc; |
|---|
| 1439 | - color: #fff; |
|---|
| 1440 | - overflow: hidden; |
|---|
| 1441 | - height: 21px; |
|---|
| 1442 | - font-size: 14px; |
|---|
| 1443 | - font-family: georgia, times, serif; |
|---|
| 1444 | - padding: 7px 15px; |
|---|
| 1445 | - } |
|---|
| 1446 | - #querylist .left { float: left; } |
|---|
| 1447 | - #querylist .right { float: right; } |
|---|
| 1448 | - |
|---|
| 1449 | - #querylist h1, #querylist h2, #querylist h3 { |
|---|
| 1450 | - font-weight: normal; |
|---|
| 1451 | - } |
|---|
| 1452 | - |
|---|
| 1453 | - #querylist ul.debug-menu-links { |
|---|
| 1454 | - clear: left; |
|---|
| 1455 | - background: #ccc; |
|---|
| 1456 | - padding: 10px 15px 0; |
|---|
| 1457 | - overflow: hidden; |
|---|
| 1458 | - list-style: none; |
|---|
| 1459 | - margin: 0; |
|---|
| 1460 | - padding: 0 0 0 15px; |
|---|
| 1461 | - } |
|---|
| 1462 | - #querylist ul.debug-menu-links li { |
|---|
| 1463 | - float: left; |
|---|
| 1464 | - margin-right: 10px; |
|---|
| 1465 | - margin-bottom: 0 !important; |
|---|
| 1466 | - } |
|---|
| 1467 | - |
|---|
| 1468 | - #querylist ul.debug-menu-links li a { |
|---|
| 1469 | - outline: none; |
|---|
| 1470 | - display: block; |
|---|
| 1471 | - padding: 5px 9px; |
|---|
| 1472 | - margin-right: 0; |
|---|
| 1473 | - background: #bbb; |
|---|
| 1474 | - color: #fff !important; |
|---|
| 1475 | - text-decoration: none !important; |
|---|
| 1476 | - font-weight: normal; |
|---|
| 1477 | - font-size: 12px; |
|---|
| 1478 | - color: #555; |
|---|
| 1479 | - -webkit-border-top-right-radius: 4px; |
|---|
| 1480 | - -webkit-border-top-left-radius: 4px; |
|---|
| 1481 | - -moz-border-radius-topright: 4px; |
|---|
| 1482 | - -moz-border-radius-topleft: 4px; |
|---|
| 1483 | - } |
|---|
| 1484 | - #querylist ul.debug-menu-links li.current a { |
|---|
| 1485 | - background: #fff; |
|---|
| 1486 | - color: #555 !important; |
|---|
| 1487 | - } |
|---|
| 1488 | - |
|---|
| 1489 | - #querylist h2 { |
|---|
| 1490 | - float: left; |
|---|
| 1491 | - min-width: 150px; |
|---|
| 1492 | - border: 1px solid #eee; |
|---|
| 1493 | - padding: 5px 10px 15px; |
|---|
| 1494 | - clear: none; important; |
|---|
| 1495 | - text-align: center; |
|---|
| 1496 | - font-family: georgia, times, serif; |
|---|
| 1497 | - font-size: 28px; |
|---|
| 1498 | - margin: 15px 10px 15px 0 !important; |
|---|
| 1499 | - } |
|---|
| 1500 | - #querylist h2 span { |
|---|
| 1501 | - font-size: 12px; |
|---|
| 1502 | - color: #888; |
|---|
| 1503 | - text-transform: uppercase; |
|---|
| 1504 | - white-space: nowrap; |
|---|
| 1505 | - display: block; |
|---|
| 1506 | - margin-bottom: 5px; |
|---|
| 1507 | - } |
|---|
| 1508 | - |
|---|
| 1509 | - #object-cache-stats h2 { |
|---|
| 1510 | - border: none; |
|---|
| 1511 | - float: none; |
|---|
| 1512 | - text-align: left; |
|---|
| 1513 | - font-size: 22px; |
|---|
| 1514 | - margin-bottom: 0; |
|---|
| 1515 | - } |
|---|
| 1516 | - |
|---|
| 1517 | - #object-cache-stats ul.debug-menu-links { |
|---|
| 1518 | - padding: 0; |
|---|
| 1519 | - margin: 0; |
|---|
| 1520 | - background: none; |
|---|
| 1521 | - } |
|---|
| 1522 | - #object-cache-stats ul.debug-menu-links li { |
|---|
| 1523 | - float: left; |
|---|
| 1524 | - margin-bottom: 10px !important; |
|---|
| 1525 | - background: none !important; |
|---|
| 1526 | - border: 1px solid #eee !important; |
|---|
| 1527 | - color: #555 !important; |
|---|
| 1528 | - } |
|---|
| 1529 | - #object-cache-stats ul.debug-menu-links li.current a { |
|---|
| 1530 | - background: #ccc !important; |
|---|
| 1531 | - color: #fff !important; |
|---|
| 1532 | - -webkit-border-top-right-radius: 0; |
|---|
| 1533 | - -webkit-border-top-left-radius: 0; |
|---|
| 1534 | - -moz-border-radius-topright: 0; |
|---|
| 1535 | - -moz-border-radius-topleft: 0; |
|---|
| 1536 | - } |
|---|
| 1537 | - |
|---|
| 1538 | - #object-cache-stats ul.debug-menu-links li a { |
|---|
| 1539 | - background: none; |
|---|
| 1540 | - color: #555 !important; |
|---|
| 1541 | - overflow: hidden; |
|---|
| 1542 | - } |
|---|
| 1543 | - |
|---|
| 1544 | - #querylist h3 { |
|---|
| 1545 | - margin-bottom: 15px; |
|---|
| 1546 | - } |
|---|
| 1547 | - |
|---|
| 1548 | - #querylist ol#wpd-queries { |
|---|
| 1549 | - padding: 0 !important; |
|---|
| 1550 | - margin: 0 !important; |
|---|
| 1551 | - list-style: none; |
|---|
| 1552 | - clear: left; |
|---|
| 1553 | - } |
|---|
| 1554 | - #querylist ol#wpd-queries li { |
|---|
| 1555 | - padding: 10px; |
|---|
| 1556 | - background: #f0f0f0; |
|---|
| 1557 | - margin: 0 0 10px 0; |
|---|
| 1558 | - } |
|---|
| 1559 | - #querylist ol#wpd-queries li div.qdebug { |
|---|
| 1560 | - background: #e8e8e8; |
|---|
| 1561 | - margin: 10px -10px -10px -10px; |
|---|
| 1562 | - padding: 5px 150px 5px 5px; |
|---|
| 1563 | - font-size: 11px; |
|---|
| 1564 | - position: relative; |
|---|
| 1565 | - min-height: 20px; |
|---|
| 1566 | - } |
|---|
| 1567 | - |
|---|
| 1568 | - #querylist ol#wpd-queries li div.qdebug span { |
|---|
| 1569 | - position: absolute; |
|---|
| 1570 | - right: 10px; |
|---|
| 1571 | - top: 5px; |
|---|
| 1572 | - white-space: nowrap; |
|---|
| 1573 | - } |
|---|
| 1574 | - |
|---|
| 1575 | - #querylist a { |
|---|
| 1576 | - text-decoration: underline !important; |
|---|
| 1577 | - color: blue !important; |
|---|
| 1578 | - } |
|---|
| 1579 | - #querylist a:hover { |
|---|
| 1580 | - text-decoration: none !important; |
|---|
| 1581 | - } |
|---|
| 1582 | - #querylist .debug-menu-target { |
|---|
| 1583 | - display: none; |
|---|
| 1584 | - } |
|---|
| 1585 | - |
|---|
| 1586 | - #querylist ol { |
|---|
| 1587 | - font: 12px Monaco, "Courier New", Courier, Fixed !important; |
|---|
| 1588 | - line-height: 180% !important; |
|---|
| 1589 | - } |
|---|
| 1590 | - |
|---|
| 1591 | - #wpadminbar #admin-bar-micro ul li { |
|---|
| 1592 | - list-style-type: none; |
|---|
| 1593 | - position: relative; |
|---|
| 1594 | - margin: 0; |
|---|
| 1595 | - padding: 0; |
|---|
| 1596 | - } |
|---|
| 1597 | - #wpadminbar #admin-bar-micro ul ul, #wpadminbar #admin-bar-micro #awaiting-mod, #wpadminbar .ab-sadmin .count-0 { |
|---|
| 1598 | - display: none !important; |
|---|
| 1599 | - } |
|---|
| 1600 | - #wpadminbar #admin-bar-micro ul li:hover > ul { |
|---|
| 1601 | - display: block; |
|---|
| 1602 | - position: absolute; |
|---|
| 1603 | - top: -1px; |
|---|
| 1604 | - left: 100%; |
|---|
| 1605 | - } |
|---|
| 1606 | - #wpadminbar #admin-bar-micro li a { |
|---|
| 1607 | - display: block; |
|---|
| 1608 | - text-decoration: none; |
|---|
| 1609 | - } |
|---|
| 1610 | - #wpadminbar #admin-bar-micro li li a { |
|---|
| 1611 | - background: #ddd; |
|---|
| 1612 | - } |
|---|
| 1613 | - #wpadminbar #admin-bar-micro li li li a { |
|---|
| 1614 | - background: #fff; |
|---|
| 1615 | - } |
|---|
| 1616 | - |
|---|
| 1617 | - <?php if ( 'rtl' == $text_direction ) : ?> |
|---|
| 1618 | - |
|---|
| 1619 | - #querylist { |
|---|
| 1620 | - direction: ltr; |
|---|
| 1621 | - } |
|---|
| 1622 | - |
|---|
| 1623 | - #wpadminbar #admin-bar-micro ul li:hover > ul { |
|---|
| 1624 | - left: auto; |
|---|
| 1625 | - right: 100%; |
|---|
| 1626 | - } |
|---|
| 1627 | - <?php endif; ?> |
|---|
| 1628 | -<?php endif; ?> |
|---|
| 1629 | \ No newline at end of file |
|---|
| 1630 | Index: wp-includes/images/ajax-loader.gif |
|---|
| 1631 | =================================================================== |
|---|
| 1632 | --- wp-includes/images/ajax-loader.gif (revision 0) |
|---|
| 1633 | +++ wp-includes/images/ajax-loader.gif (revision 0) |
|---|
| 1634 | @@ -0,0 +1,5 @@ |
|---|
| 1635 | +GIF89a¢ÿÿÿïïïÞÞÞ½½½1Îÿÿÿ!ÿNETSCAPE2.0!ù,+Xºû°ÁeWÔg-Úd>B*Là ®P{Î%Ú[ >uÇ¿Sí!ù,XºûÌA!TS(ZoÖ[µdP©è`©j&!ù,XZ"û«Á2%UÔg-Úd |
|---|
| 1636 | + ç |
|---|
| 1637 | +$!ù,8SÜÚn!Ø£RÈ{øÝr'!ù,XZ3«Í½öªX¼¬íÁ£*iÕ> !ù,Xº:>=k ±pA±qWVÊV¡Â2 !ù, |
|---|
| 1638 | +ÕÞ½Ikow±
¶Wó5uV&è$!ù ,XºÜþ |
|---|
| 1639 | +Èä¤ñâzÀÞ· læ9©¬#¼ÉL; |
|---|
| 1640 | \ No newline at end of file |
|---|
| 1641 | |
|---|
| 1642 | Property changes on: wp-includes/images/ajax-loader.gif |
|---|
| 1643 | ___________________________________________________________________ |
|---|
| 1644 | Added: svn:mergeinfo |
|---|
| 1645 | |
|---|
| 1646 | Index: wp-includes/css/super-admin-bar.dev.css |
|---|
| 1647 | =================================================================== |
|---|
| 1648 | --- wp-includes/css/super-admin-bar.dev.css (revision 0) |
|---|
| 1649 | +++ wp-includes/css/super-admin-bar.dev.css (revision 0) |
|---|
| 1650 | @@ -0,0 +1,222 @@ |
|---|
| 1651 | +/** |
|---|
| 1652 | + * Super admin styling |
|---|
| 1653 | + */ |
|---|
| 1654 | +#querylist { |
|---|
| 1655 | + font-family: Arial, Tahoma, sans-serif; |
|---|
| 1656 | + display: none; |
|---|
| 1657 | + position: absolute; |
|---|
| 1658 | + top: 50px; |
|---|
| 1659 | + left: 50px; |
|---|
| 1660 | + right: 50px; |
|---|
| 1661 | + background: #fff; |
|---|
| 1662 | + padding: 20px; |
|---|
| 1663 | + -moz-box-shadow: 0 0 15px #888; |
|---|
| 1664 | + -webkit-box-shadow: 0 0 15px #888; |
|---|
| 1665 | + box-shadow: 0 0 15px #888; |
|---|
| 1666 | + z-index: 99999; |
|---|
| 1667 | + border: 10px solid #f0f0f0; |
|---|
| 1668 | + color: #000; |
|---|
| 1669 | + line-height: 150% !important; |
|---|
| 1670 | +} |
|---|
| 1671 | +#querylist pre { |
|---|
| 1672 | + font-size: 12px; |
|---|
| 1673 | + padding: 10px; |
|---|
| 1674 | +} |
|---|
| 1675 | + |
|---|
| 1676 | +#querylist h1 { |
|---|
| 1677 | + font-family: georgia, times, serif; |
|---|
| 1678 | + text-align: center; |
|---|
| 1679 | + font-size: 24px; |
|---|
| 1680 | + padding: 20px 5px; |
|---|
| 1681 | + background: #eee; |
|---|
| 1682 | + color: #555; |
|---|
| 1683 | + margin: 0; |
|---|
| 1684 | +} |
|---|
| 1685 | +#querylist div#debug-status { |
|---|
| 1686 | + background: #ccc; |
|---|
| 1687 | + color: #fff; |
|---|
| 1688 | + overflow: hidden; |
|---|
| 1689 | + height: 21px; |
|---|
| 1690 | + font-size: 14px; |
|---|
| 1691 | + font-family: georgia, times, serif; |
|---|
| 1692 | + padding: 7px 15px; |
|---|
| 1693 | +} |
|---|
| 1694 | +#querylist .left { |
|---|
| 1695 | + float: left; |
|---|
| 1696 | +} |
|---|
| 1697 | +#querylist .right { |
|---|
| 1698 | + float: right; |
|---|
| 1699 | +} |
|---|
| 1700 | + |
|---|
| 1701 | +#querylist h1, #querylist h2, #querylist h3 { |
|---|
| 1702 | + font-weight: normal; |
|---|
| 1703 | +} |
|---|
| 1704 | + |
|---|
| 1705 | +#querylist ul.debug-menu-links { |
|---|
| 1706 | + clear: left; |
|---|
| 1707 | + background: #ccc; |
|---|
| 1708 | + padding: 10px 15px 0; |
|---|
| 1709 | + overflow: hidden; |
|---|
| 1710 | + list-style: none; |
|---|
| 1711 | + margin: 0; |
|---|
| 1712 | + padding: 0 0 0 15px; |
|---|
| 1713 | +} |
|---|
| 1714 | + #querylist ul.debug-menu-links li { |
|---|
| 1715 | + float: left; |
|---|
| 1716 | + margin-right: 10px; |
|---|
| 1717 | + margin-bottom: 0 !important; |
|---|
| 1718 | + } |
|---|
| 1719 | + |
|---|
| 1720 | + #querylist ul.debug-menu-links li a { |
|---|
| 1721 | + outline: none; |
|---|
| 1722 | + display: block; |
|---|
| 1723 | + padding: 5px 9px; |
|---|
| 1724 | + margin-right: 0; |
|---|
| 1725 | + background: #bbb; |
|---|
| 1726 | + color: #fff !important; |
|---|
| 1727 | + text-decoration: none !important; |
|---|
| 1728 | + font-weight: normal; |
|---|
| 1729 | + font-size: 12px; |
|---|
| 1730 | + color: #555; |
|---|
| 1731 | + -webkit-border-top-right-radius: 4px; |
|---|
| 1732 | + -webkit-border-top-left-radius: 4px; |
|---|
| 1733 | + -moz-border-radius-topright: 4px; |
|---|
| 1734 | + -moz-border-radius-topleft: 4px; |
|---|
| 1735 | + } |
|---|
| 1736 | + #querylist ul.debug-menu-links li.current a { |
|---|
| 1737 | + background: #fff; |
|---|
| 1738 | + color: #555 !important; |
|---|
| 1739 | + } |
|---|
| 1740 | + |
|---|
| 1741 | +#querylist h2 { |
|---|
| 1742 | + float: left; |
|---|
| 1743 | + min-width: 150px; |
|---|
| 1744 | + border: 1px solid #eee; |
|---|
| 1745 | + padding: 5px 10px 15px; |
|---|
| 1746 | + clear: none; |
|---|
| 1747 | + important; |
|---|
| 1748 | + text-align: center; |
|---|
| 1749 | + font-family: georgia, times, serif; |
|---|
| 1750 | + font-size: 28px; |
|---|
| 1751 | + margin: 15px 10px 15px 0 !important; |
|---|
| 1752 | +} |
|---|
| 1753 | + #querylist h2 span { |
|---|
| 1754 | + font-size: 12px; |
|---|
| 1755 | + color: #888; |
|---|
| 1756 | + text-transform: uppercase; |
|---|
| 1757 | + white-space: nowrap; |
|---|
| 1758 | + display: block; |
|---|
| 1759 | + margin-bottom: 5px; |
|---|
| 1760 | + } |
|---|
| 1761 | + |
|---|
| 1762 | +#object-cache-stats h2 { |
|---|
| 1763 | + border: none; |
|---|
| 1764 | + float: none; |
|---|
| 1765 | + text-align: left; |
|---|
| 1766 | + font-size: 22px; |
|---|
| 1767 | + margin-bottom: 0; |
|---|
| 1768 | +} |
|---|
| 1769 | + |
|---|
| 1770 | +#object-cache-stats ul.debug-menu-links { |
|---|
| 1771 | + padding: 0; |
|---|
| 1772 | + margin: 0; |
|---|
| 1773 | + background: none; |
|---|
| 1774 | +} |
|---|
| 1775 | + #object-cache-stats ul.debug-menu-links li { |
|---|
| 1776 | + float: left; |
|---|
| 1777 | + margin-bottom: 10px !important; |
|---|
| 1778 | + background: none !important; |
|---|
| 1779 | + border: 1px solid #eee !important; |
|---|
| 1780 | + color: #555 !important; |
|---|
| 1781 | + } |
|---|
| 1782 | + #object-cache-stats ul.debug-menu-links li.current a { |
|---|
| 1783 | + background: #ccc !important; |
|---|
| 1784 | + color: #fff !important; |
|---|
| 1785 | + -webkit-border-top-right-radius: 0; |
|---|
| 1786 | + -webkit-border-top-left-radius: 0; |
|---|
| 1787 | + -moz-border-radius-topright: 0; |
|---|
| 1788 | + -moz-border-radius-topleft: 0; |
|---|
| 1789 | + } |
|---|
| 1790 | + |
|---|
| 1791 | + #object-cache-stats ul.debug-menu-links li a { |
|---|
| 1792 | + background: none; |
|---|
| 1793 | + color: #555 !important; |
|---|
| 1794 | + overflow: hidden; |
|---|
| 1795 | + } |
|---|
| 1796 | + |
|---|
| 1797 | +#querylist h3 { |
|---|
| 1798 | + margin-bottom: 15px; |
|---|
| 1799 | +} |
|---|
| 1800 | + |
|---|
| 1801 | +#querylist ol#wpd-queries { |
|---|
| 1802 | + padding: 0 !important; |
|---|
| 1803 | + margin: 0 !important; |
|---|
| 1804 | + list-style: none; |
|---|
| 1805 | + clear: left; |
|---|
| 1806 | +} |
|---|
| 1807 | + #querylist ol#wpd-queries li { |
|---|
| 1808 | + padding: 10px; |
|---|
| 1809 | + background: #f0f0f0; |
|---|
| 1810 | + margin: 0 0 10px 0; |
|---|
| 1811 | + } |
|---|
| 1812 | + #querylist ol#wpd-queries li div.qdebug { |
|---|
| 1813 | + background: #e8e8e8; |
|---|
| 1814 | + margin: 10px -10px -10px -10px; |
|---|
| 1815 | + padding: 5px 150px 5px 5px; |
|---|
| 1816 | + font-size: 11px; |
|---|
| 1817 | + position: relative; |
|---|
| 1818 | + min-height: 20px; |
|---|
| 1819 | + } |
|---|
| 1820 | + |
|---|
| 1821 | + #querylist ol#wpd-queries li div.qdebug span { |
|---|
| 1822 | + position: absolute; |
|---|
| 1823 | + right: 10px; |
|---|
| 1824 | + top: 5px; |
|---|
| 1825 | + white-space: nowrap; |
|---|
| 1826 | + } |
|---|
| 1827 | + |
|---|
| 1828 | +#querylist a { |
|---|
| 1829 | + text-decoration: underline !important; |
|---|
| 1830 | + color: blue !important; |
|---|
| 1831 | +} |
|---|
| 1832 | +#querylist a:hover { |
|---|
| 1833 | + text-decoration: none !important; |
|---|
| 1834 | +} |
|---|
| 1835 | +#querylist .debug-menu-target { |
|---|
| 1836 | + display: none; |
|---|
| 1837 | +} |
|---|
| 1838 | + |
|---|
| 1839 | +#querylist ol { |
|---|
| 1840 | + font: 12px Monaco, "Courier New", Courier, Fixed !important; |
|---|
| 1841 | + line-height: 180% !important; |
|---|
| 1842 | +} |
|---|
| 1843 | + |
|---|
| 1844 | +#wpadminbar #admin-bar-micro ul li { |
|---|
| 1845 | + list-style-type: none; |
|---|
| 1846 | + position: relative; |
|---|
| 1847 | + margin: 0; |
|---|
| 1848 | + padding: 0; |
|---|
| 1849 | +} |
|---|
| 1850 | +#wpadminbar #admin-bar-micro ul ul, #wpadminbar #admin-bar-micro #awaiting-mod, #wpadminbar .ab-sadmin .count-0 { |
|---|
| 1851 | + display: none !important; |
|---|
| 1852 | +} |
|---|
| 1853 | +#wpadminbar #admin-bar-micro ul li:hover > ul { |
|---|
| 1854 | + display: block; |
|---|
| 1855 | + position: absolute; |
|---|
| 1856 | + top: -1px; |
|---|
| 1857 | + left: 100%; |
|---|
| 1858 | +} |
|---|
| 1859 | +#wpadminbar #admin-bar-micro li a { |
|---|
| 1860 | + display: block; |
|---|
| 1861 | + text-decoration: none; |
|---|
| 1862 | +} |
|---|
| 1863 | +#wpadminbar #admin-bar-micro li li a { |
|---|
| 1864 | + background: #ddd; |
|---|
| 1865 | +} |
|---|
| 1866 | +#wpadminbar #admin-bar-micro li li li a { |
|---|
| 1867 | + background: #fff; |
|---|
| 1868 | +} |
|---|
| 1869 | + |
|---|
| 1870 | +/** |
|---|
| 1871 | +* End super admin styling |
|---|
| 1872 | +*/ |
|---|
| 1873 | Index: wp-includes/css/admin-bar-rtl.dev.css |
|---|
| 1874 | =================================================================== |
|---|
| 1875 | --- wp-includes/css/admin-bar-rtl.dev.css (revision 0) |
|---|
| 1876 | +++ wp-includes/css/admin-bar-rtl.dev.css (revision 0) |
|---|
| 1877 | @@ -0,0 +1,221 @@ |
|---|
| 1878 | +#wpadminbar { |
|---|
| 1879 | + background:#666 url(../images/admin-bar-sprite-rtl.png?d=08102010) 0 -222px repeat-x; |
|---|
| 1880 | + direction:rtl; |
|---|
| 1881 | + font-family: Tahoma, Arial ,sans-serif; |
|---|
| 1882 | + right:0; |
|---|
| 1883 | + left:auto; |
|---|
| 1884 | +} |
|---|
| 1885 | +#wpadminbar div, |
|---|
| 1886 | +#wpadminbar ul, |
|---|
| 1887 | +#wpadminbar ul li { |
|---|
| 1888 | + min-height: 0; |
|---|
| 1889 | +} |
|---|
| 1890 | +#wpadminbar ul li img { |
|---|
| 1891 | + margin-left: 8px !important; |
|---|
| 1892 | + margin-right: 0 !important; |
|---|
| 1893 | +} |
|---|
| 1894 | + |
|---|
| 1895 | +#wpadminbar .quicklinks > ul > li > a { |
|---|
| 1896 | + border-left: 1px solid #686868; |
|---|
| 1897 | + border-right: 1px solid #808080; |
|---|
| 1898 | +} |
|---|
| 1899 | + |
|---|
| 1900 | +#wpadminbar .quicklinks > ul > li:last-child > a { |
|---|
| 1901 | + border-left: none; |
|---|
| 1902 | + border-right: 1px solid #808080; |
|---|
| 1903 | +} |
|---|
| 1904 | + |
|---|
| 1905 | +#wpadminbar .quicklinks > ul > li.hover > a { |
|---|
| 1906 | + border-right-color: #707070; |
|---|
| 1907 | + border-left-color: #686868; |
|---|
| 1908 | +} |
|---|
| 1909 | + |
|---|
| 1910 | +#wpadminbar .avatar { |
|---|
| 1911 | + margin: -3px 0 0 5px !important; |
|---|
| 1912 | + float:none; |
|---|
| 1913 | +} |
|---|
| 1914 | + |
|---|
| 1915 | +#wpadminbar .menupop li:hover > ul { |
|---|
| 1916 | + margin-left:-100%; |
|---|
| 1917 | +} |
|---|
| 1918 | + |
|---|
| 1919 | +#wpadminbar .menupop a > span { |
|---|
| 1920 | + background:url(../images/admin-bar-sprite-rtl.png?d=08102010) 0 100.4% no-repeat; |
|---|
| 1921 | + padding-left:.8em; |
|---|
| 1922 | +} |
|---|
| 1923 | + |
|---|
| 1924 | +#wpadminbar .menupop ul li a > span { |
|---|
| 1925 | + background:url(../images/admin-bar-sprite-rtl.png?d=08102010) 0% 97.2% no-repeat; |
|---|
| 1926 | + padding-right:0; |
|---|
| 1927 | + padding-left:1.5em; |
|---|
| 1928 | +} |
|---|
| 1929 | + |
|---|
| 1930 | +#wpadminbar .menupop ul { |
|---|
| 1931 | + right: 0; |
|---|
| 1932 | + width:100%; |
|---|
| 1933 | + min-width:150px; |
|---|
| 1934 | +} |
|---|
| 1935 | + |
|---|
| 1936 | +#wpadminbar .ab-my-account ul { |
|---|
| 1937 | + width:200px; |
|---|
| 1938 | +} |
|---|
| 1939 | + |
|---|
| 1940 | +#wpadminbar .ab-my-blogs ul { |
|---|
| 1941 | + width:300px; |
|---|
| 1942 | +} |
|---|
| 1943 | + |
|---|
| 1944 | +#wpadminbar .ab-my-blogs ul ul { |
|---|
| 1945 | + width:200px; |
|---|
| 1946 | +} |
|---|
| 1947 | + |
|---|
| 1948 | +#wpadminbar .ab-bloginfo ul { |
|---|
| 1949 | + width:200px; |
|---|
| 1950 | +} |
|---|
| 1951 | + |
|---|
| 1952 | +#wpadminbar .ab-subscribe ul { |
|---|
| 1953 | + width:150px; |
|---|
| 1954 | +} |
|---|
| 1955 | + |
|---|
| 1956 | +#wpadminbar .menupop ul li { |
|---|
| 1957 | + width:auto; |
|---|
| 1958 | +} |
|---|
| 1959 | + |
|---|
| 1960 | +#wpadminbar .quicklinks a { |
|---|
| 1961 | + font-family: Tahoma, Arial, Helvetica, sans-serif; |
|---|
| 1962 | +} |
|---|
| 1963 | + |
|---|
| 1964 | +#wpadminbar li.ab-sadmin { |
|---|
| 1965 | + float: left; |
|---|
| 1966 | +} |
|---|
| 1967 | + |
|---|
| 1968 | +#wpadminbar li.ab-sadmin ul { |
|---|
| 1969 | + right: auto; |
|---|
| 1970 | + left: 0; |
|---|
| 1971 | + float: left; |
|---|
| 1972 | +} |
|---|
| 1973 | + |
|---|
| 1974 | +#wpadminbar li.ab-sadmin > a { |
|---|
| 1975 | + border-right: 1px solid #666 !important; |
|---|
| 1976 | + border-left:none !important; |
|---|
| 1977 | +} |
|---|
| 1978 | + |
|---|
| 1979 | + |
|---|
| 1980 | +#wpadminbar li.ab-sadmin ul a { |
|---|
| 1981 | + border-right: none !important; |
|---|
| 1982 | + border-left: none !important; |
|---|
| 1983 | +} |
|---|
| 1984 | + |
|---|
| 1985 | +#wpadminbar li.ab-sadmin ul li { |
|---|
| 1986 | + left: 0; |
|---|
| 1987 | + right:auto; |
|---|
| 1988 | + float: left; |
|---|
| 1989 | + text-align: right; |
|---|
| 1990 | +} |
|---|
| 1991 | + |
|---|
| 1992 | +#wpadminbar li.ab-sadmin ul li a { |
|---|
| 1993 | + padding-right: 1.75em; |
|---|
| 1994 | + padding-left: 0; |
|---|
| 1995 | +} |
|---|
| 1996 | + |
|---|
| 1997 | +#wpadminbar li.ab-sadmin ul li a > span { |
|---|
| 1998 | + background:url(../images/admin-bar-sprite-rtl.png?d=08102010) 100% 101.8% no-repeat; |
|---|
| 1999 | + padding-right: 1.25em !important; |
|---|
| 2000 | + padding-left: 0 !important; |
|---|
| 2001 | + margin-right: -1.25em; |
|---|
| 2002 | + margin-left: 0; |
|---|
| 2003 | +} |
|---|
| 2004 | + |
|---|
| 2005 | +#wpadminbar li:hover { |
|---|
| 2006 | + background: #555 url(../images/admin-bar-sprite-rtl.png?d=08102010) 0 -282px repeat-x; |
|---|
| 2007 | +} |
|---|
| 2008 | +#wpadminbar li li:hover { |
|---|
| 2009 | + background: #888 url(../images/admin-bar-sprite-rtl.png?d=08102010) 0 -222px repeat-x !important; |
|---|
| 2010 | +} |
|---|
| 2011 | + |
|---|
| 2012 | +.quicklinks ul { |
|---|
| 2013 | + text-align:right; |
|---|
| 2014 | +} |
|---|
| 2015 | + |
|---|
| 2016 | +.quicklinks ul li { |
|---|
| 2017 | + float:right; |
|---|
| 2018 | +} |
|---|
| 2019 | + |
|---|
| 2020 | +#adminbarsearch { |
|---|
| 2021 | + display:none; |
|---|
| 2022 | +} |
|---|
| 2023 | + |
|---|
| 2024 | +#adminbarsearch label, |
|---|
| 2025 | +#adminbarsearch a { |
|---|
| 2026 | + float:right; |
|---|
| 2027 | +} |
|---|
| 2028 | + |
|---|
| 2029 | + |
|---|
| 2030 | +#wpadminbar li.ab-me > a, |
|---|
| 2031 | +#wpadminbar li.ab-blog > a { |
|---|
| 2032 | + background:url(../images/admin-bar-sprite-rtl.png?d=08102010) 0% 59.8% no-repeat; |
|---|
| 2033 | + padding: 0 0.7em 0 1.15em; |
|---|
| 2034 | +} |
|---|
| 2035 | + |
|---|
| 2036 | +#wpadminbar li.ab-me > a.hover, |
|---|
| 2037 | +#wpadminbar li.ab-blog > a.hover { |
|---|
| 2038 | + background-position: 33% 59.8%; |
|---|
| 2039 | +} |
|---|
| 2040 | + |
|---|
| 2041 | +#wpadminbar li.ab-my-account a, |
|---|
| 2042 | +#wpadminbar li.ab-bloginfo a { |
|---|
| 2043 | + border-right: none !important; |
|---|
| 2044 | + padding-right: 0.7em !important; |
|---|
| 2045 | +} |
|---|
| 2046 | + |
|---|
| 2047 | +#wpadminbar li.ab-my-account > ul, |
|---|
| 2048 | +#wpadminbar li.ab-bloginfo > ul { |
|---|
| 2049 | + right: -7px; |
|---|
| 2050 | + left:auto; |
|---|
| 2051 | +} |
|---|
| 2052 | + |
|---|
| 2053 | + |
|---|
| 2054 | +#wpadminbar ul li a strong.count { |
|---|
| 2055 | + margin-right: 5px; |
|---|
| 2056 | + margin-left: 0; |
|---|
| 2057 | + position:static; |
|---|
| 2058 | +} |
|---|
| 2059 | + |
|---|
| 2060 | +.adminbar-input { |
|---|
| 2061 | + background:#ddd url(../images/admin-bar-sprite-rtl.png?d=08102010) right top no-repeat !important; |
|---|
| 2062 | + float:right !important; |
|---|
| 2063 | + font-family: Tahoma, Arial,Helvetica,sans-serif !important; |
|---|
| 2064 | + margin-right:3px !important; |
|---|
| 2065 | + margin-left:0 !important; |
|---|
| 2066 | +} |
|---|
| 2067 | +button.adminbar-button { |
|---|
| 2068 | + background:url(../images/admin-bar-sprite-rtl.png?d=08102010) left -107px no-repeat; |
|---|
| 2069 | + float:right; |
|---|
| 2070 | + padding:0 0 0 14px; |
|---|
| 2071 | +} |
|---|
| 2072 | +button.adminbar-button span { |
|---|
| 2073 | + background:url(../images/admin-bar-sprite-rtl.png?d=08102010) right -69px no-repeat; |
|---|
| 2074 | + padding:3px 14px 0 0; |
|---|
| 2075 | + font-family: Tahoma, Arial,Helvetica,sans-serif !important; |
|---|
| 2076 | +} |
|---|
| 2077 | +button.adminbar-button:active { |
|---|
| 2078 | + background-position:left -184px !important; |
|---|
| 2079 | +} |
|---|
| 2080 | +button.adminbar-button:active span { |
|---|
| 2081 | + background-position:right -146px !important; |
|---|
| 2082 | +} |
|---|
| 2083 | + |
|---|
| 2084 | +/** |
|---|
| 2085 | + * Super admin styling |
|---|
| 2086 | + */ |
|---|
| 2087 | +#querylist { |
|---|
| 2088 | + direction: ltr; |
|---|
| 2089 | +} |
|---|
| 2090 | + |
|---|
| 2091 | +#wpadminbar #admin-bar-micro ul li:hover > ul { |
|---|
| 2092 | + left: auto; |
|---|
| 2093 | + right: 100%; |
|---|
| 2094 | +} |
|---|
| 2095 | + |
|---|
| 2096 | +/** |
|---|
| 2097 | +* End super admin styling |
|---|
| 2098 | +*/ |
|---|
| 2099 | |
|---|
| 2100 | Property changes on: wp-includes/css/admin-bar-rtl.dev.css |
|---|
| 2101 | ___________________________________________________________________ |
|---|
| 2102 | Added: svn:mergeinfo |
|---|
| 2103 | |
|---|
| 2104 | Index: wp-includes/css/admin-bar.dev.css |
|---|
| 2105 | =================================================================== |
|---|
| 2106 | --- wp-includes/css/admin-bar.dev.css (revision 0) |
|---|
| 2107 | +++ wp-includes/css/admin-bar.dev.css (revision 0) |
|---|
| 2108 | @@ -0,0 +1,370 @@ |
|---|
| 2109 | +#wpadminbar { |
|---|
| 2110 | + direction:ltr; |
|---|
| 2111 | + background:#666 url(../images/admin-bar-sprite.png?d=08102010) 0 -222px repeat-x; |
|---|
| 2112 | + color:#ddd; |
|---|
| 2113 | + font:12px Arial, Helvetica, sans-serif; |
|---|
| 2114 | + height:28px; |
|---|
| 2115 | + left:0; |
|---|
| 2116 | + margin:0; |
|---|
| 2117 | + position:fixed; |
|---|
| 2118 | + top:0; |
|---|
| 2119 | + width:100%; |
|---|
| 2120 | + z-index:99999; |
|---|
| 2121 | + min-width: 960px; |
|---|
| 2122 | +} |
|---|
| 2123 | +#wpadminbar ul, |
|---|
| 2124 | +#wpadminbar ul li { |
|---|
| 2125 | + position: relative; |
|---|
| 2126 | + z-index: 99999; |
|---|
| 2127 | +} |
|---|
| 2128 | +#wpadminbar ul li img { |
|---|
| 2129 | + vertical-align: middle !important; |
|---|
| 2130 | + margin-right: 8px !important; |
|---|
| 2131 | + border: none !important; |
|---|
| 2132 | + padding: 0 !important; |
|---|
| 2133 | +} |
|---|
| 2134 | +#wpadminbar .quicklinks > ul > li > a { |
|---|
| 2135 | + border-right: 1px solid #686868; |
|---|
| 2136 | + border-left: 1px solid #808080; |
|---|
| 2137 | +} |
|---|
| 2138 | +#wpadminbar .quicklinks > ul > li:last-child > a { |
|---|
| 2139 | + border-right: none; |
|---|
| 2140 | +} |
|---|
| 2141 | +#wpadminbar .quicklinks > ul > li:hover > a, |
|---|
| 2142 | +#wpadminbar .quicklinks > ul > li.hover > a { |
|---|
| 2143 | + border-left-color: #707070; |
|---|
| 2144 | +} |
|---|
| 2145 | +#wpadminbar a { |
|---|
| 2146 | + outline: none; |
|---|
| 2147 | +} |
|---|
| 2148 | +#wpadminbar .avatar { |
|---|
| 2149 | + border:1px solid #999 !important; |
|---|
| 2150 | + padding:0 !important; |
|---|
| 2151 | + margin:-3px 5px 0 0 !important; |
|---|
| 2152 | + vertical-align:middle; |
|---|
| 2153 | + float:none; |
|---|
| 2154 | + display:inline !important; |
|---|
| 2155 | +} |
|---|
| 2156 | +#wpadminbar li:hover > ul { |
|---|
| 2157 | + display:block; |
|---|
| 2158 | +} |
|---|
| 2159 | + |
|---|
| 2160 | +#wpadminbar .menupop li:hover > ul { |
|---|
| 2161 | + margin-left:100%; |
|---|
| 2162 | + margin-top:-28px; |
|---|
| 2163 | +} |
|---|
| 2164 | + |
|---|
| 2165 | +#wpadminbar .menupop ul li a { |
|---|
| 2166 | + color:#555 !important; |
|---|
| 2167 | + text-shadow:none; |
|---|
| 2168 | + font-weight:normal; |
|---|
| 2169 | + white-space:nowrap; |
|---|
| 2170 | +} |
|---|
| 2171 | +#wpadminbar .menupop a > span { |
|---|
| 2172 | + background:url(../images/admin-bar-sprite.png?d=08102010) 100% 100.4% no-repeat; |
|---|
| 2173 | + padding-right:.8em; |
|---|
| 2174 | + line-height: 28px; |
|---|
| 2175 | +} |
|---|
| 2176 | +#wpadminbar .menupop ul li a > span { |
|---|
| 2177 | + display: block; |
|---|
| 2178 | + background:url(../images/admin-bar-sprite.png?d=08102010) 100% 97.2% no-repeat; |
|---|
| 2179 | + padding-right:1.5em; |
|---|
| 2180 | + line-height: 28px; |
|---|
| 2181 | +} |
|---|
| 2182 | +#wpadminbar .menupop ul li a span#awaiting-mod { |
|---|
| 2183 | + display: inline; |
|---|
| 2184 | + background: #aaa; |
|---|
| 2185 | + color: #fff; |
|---|
| 2186 | + padding: 1px 5px; |
|---|
| 2187 | + font-size: 10px; |
|---|
| 2188 | + font-family: verdana; |
|---|
| 2189 | + -moz-border-radius: 5px; |
|---|
| 2190 | + -webkit-border-radius: 5px; |
|---|
| 2191 | + border-radius: 5px; |
|---|
| 2192 | +} |
|---|
| 2193 | +#wpadminbar .menupop ul li a:hover span#awaiting-mod { |
|---|
| 2194 | + background: #fff; |
|---|
| 2195 | + color: #888; |
|---|
| 2196 | +} |
|---|
| 2197 | +#wpadminbar .menupop ul { |
|---|
| 2198 | + -moz-box-shadow:0 4px 8px rgba(0,0,0,0.1); |
|---|
| 2199 | + -webkit-box-shadow:0 4px 8px rgba(0,0,0,0.1); |
|---|
| 2200 | + background:#fff; |
|---|
| 2201 | + display:none; |
|---|
| 2202 | + position:absolute; |
|---|
| 2203 | + border:1px solid #dfdfdf; |
|---|
| 2204 | + border-top:none !important; |
|---|
| 2205 | + float:none; |
|---|
| 2206 | +} |
|---|
| 2207 | +html>body #wpadminbar .menupop ul { |
|---|
| 2208 | + background:rgba(255,255,255,0.97); |
|---|
| 2209 | + border-color:rgba(0,0,0,0.1); |
|---|
| 2210 | +} |
|---|
| 2211 | +#wpadminbar .menupop.ab-my-account ul, |
|---|
| 2212 | +#wpadminbar .menupop.ab-my-dash ul, |
|---|
| 2213 | +#wpadminbar .menupop.ab-new-post ul { |
|---|
| 2214 | + min-width:140px; |
|---|
| 2215 | +} |
|---|
| 2216 | +#wpadminbar .menupop li { |
|---|
| 2217 | + float:none; |
|---|
| 2218 | + margin:0; |
|---|
| 2219 | + padding:0; |
|---|
| 2220 | + background-image:none; |
|---|
| 2221 | +} |
|---|
| 2222 | +#wpadminbar .quicklinks a { |
|---|
| 2223 | + border:none; |
|---|
| 2224 | + color:#ddd !important; |
|---|
| 2225 | + height:28px; |
|---|
| 2226 | + text-shadow:#555 0px -1px 0px; |
|---|
| 2227 | + display:block; |
|---|
| 2228 | + font:13px Arial, Helvetica, sans-serif; |
|---|
| 2229 | + font-weight:normal; |
|---|
| 2230 | + letter-spacing:normal; |
|---|
| 2231 | + padding:0 0.85em; |
|---|
| 2232 | + line-height:28px; |
|---|
| 2233 | + text-decoration:none !important; |
|---|
| 2234 | +} |
|---|
| 2235 | +#wpadminbar .quicklinks a:hover { |
|---|
| 2236 | + text-shadow:#333 0px -1px 0px; |
|---|
| 2237 | +} |
|---|
| 2238 | + |
|---|
| 2239 | +#wpadminbar li.ab-sadmin { |
|---|
| 2240 | + float: right; |
|---|
| 2241 | + background: #555; |
|---|
| 2242 | +} |
|---|
| 2243 | +#wpadminbar li.ab-sadmin ul { |
|---|
| 2244 | + right: 0; |
|---|
| 2245 | + float: right; |
|---|
| 2246 | +} |
|---|
| 2247 | +#wpadminbar li.ab-sadmin > a { |
|---|
| 2248 | + font-size: 11px !important; |
|---|
| 2249 | + padding: 0 7px !important; |
|---|
| 2250 | + border: none !important; |
|---|
| 2251 | + border-left: 1px solid #666 !important; |
|---|
| 2252 | +} |
|---|
| 2253 | + |
|---|
| 2254 | +#wpadminbar li.ab-sadmin ul a { |
|---|
| 2255 | + border-right: none !important; |
|---|
| 2256 | + border-left: none !important; |
|---|
| 2257 | +} |
|---|
| 2258 | +#wpadminbar li.ab-sadmin ul li { |
|---|
| 2259 | + right: 0; |
|---|
| 2260 | + float: right; |
|---|
| 2261 | + text-align: left; |
|---|
| 2262 | + width: 100%; |
|---|
| 2263 | +} |
|---|
| 2264 | +#wpadminbar li.ab-sadmin ul li a { |
|---|
| 2265 | + padding-left: 1.75em; |
|---|
| 2266 | +} |
|---|
| 2267 | +#wpadminbar li.ab-sadmin ul li a > span { |
|---|
| 2268 | + background:url(../images/admin-bar-sprite.png?d=08102010) 0% 101.8% no-repeat; |
|---|
| 2269 | + padding-left: 1.25em; |
|---|
| 2270 | + margin-left: -1.25em; |
|---|
| 2271 | + line-height: 28px; |
|---|
| 2272 | + padding-right: 0 !important; |
|---|
| 2273 | +} |
|---|
| 2274 | + |
|---|
| 2275 | +#wpadminbar li:hover { |
|---|
| 2276 | + background: #555 url(../images/admin-bar-sprite.png?d=08102010) 0 -282px repeat-x; |
|---|
| 2277 | +} |
|---|
| 2278 | +#wpadminbar li li:hover { |
|---|
| 2279 | + color:#fff !important; |
|---|
| 2280 | + background: #888 url(../images/admin-bar-sprite.png?d=08102010) 0 -222px repeat-x !important; |
|---|
| 2281 | + text-shadow: #666 0px -1px 0px; |
|---|
| 2282 | +} |
|---|
| 2283 | +#wpadminbar li li:hover > a { |
|---|
| 2284 | + color:#fff !important; |
|---|
| 2285 | +} |
|---|
| 2286 | +.quicklinks ul { |
|---|
| 2287 | + list-style:none; |
|---|
| 2288 | + margin:0; |
|---|
| 2289 | + padding:0; |
|---|
| 2290 | + text-align:left; |
|---|
| 2291 | +} |
|---|
| 2292 | +.quicklinks ul li { |
|---|
| 2293 | + float:left; |
|---|
| 2294 | + margin:0; |
|---|
| 2295 | +} |
|---|
| 2296 | + |
|---|
| 2297 | +#adminbarsearch { |
|---|
| 2298 | + float:right; |
|---|
| 2299 | +} |
|---|
| 2300 | +#adminbarsearch { |
|---|
| 2301 | + height: 18px; |
|---|
| 2302 | + padding: 3px; |
|---|
| 2303 | +} |
|---|
| 2304 | +#adminbarsearch * { |
|---|
| 2305 | + color: #555; |
|---|
| 2306 | + font-size:12px; |
|---|
| 2307 | +} |
|---|
| 2308 | +#adminbarsearch label, |
|---|
| 2309 | +#adminbarsearch a { |
|---|
| 2310 | + height: 28px; |
|---|
| 2311 | + color: #ccc; |
|---|
| 2312 | + display:block; |
|---|
| 2313 | + float:left; |
|---|
| 2314 | + padding:3px 4px; |
|---|
| 2315 | + text-shadow:0px -1px 0px #444; |
|---|
| 2316 | +} |
|---|
| 2317 | +#adminbarsearch a { |
|---|
| 2318 | + text-decoration:underline; |
|---|
| 2319 | +} |
|---|
| 2320 | +#adminbarsearch a:hover { |
|---|
| 2321 | + color:#fff; |
|---|
| 2322 | +} |
|---|
| 2323 | + |
|---|
| 2324 | +#wpadminbar li.ab-me:hover, |
|---|
| 2325 | +#wpadminbar li.ab-blog:hover { |
|---|
| 2326 | + background:none; |
|---|
| 2327 | +} |
|---|
| 2328 | +#wpadminbar li.ab-me > a, |
|---|
| 2329 | +#wpadminbar li.ab-blog > a { |
|---|
| 2330 | + line-height: 18px !important; |
|---|
| 2331 | + border: none !important; |
|---|
| 2332 | + background:url(../images/admin-bar-sprite.png?d=08102010) 100% 59.8% no-repeat; |
|---|
| 2333 | + height: 28px; |
|---|
| 2334 | + padding: 0 1.15em 0 0.7em; |
|---|
| 2335 | +} |
|---|
| 2336 | +#wpadminbar li.ab-me > a:hover, |
|---|
| 2337 | +#wpadminbar li.ab-me > a.hover, |
|---|
| 2338 | +#wpadminbar li.ab-blog > a:hover, |
|---|
| 2339 | +#wpadminbar li.ab-blog > a.hover { |
|---|
| 2340 | + background-position: 67% 59.8%; |
|---|
| 2341 | +} |
|---|
| 2342 | +#wpadminbar li.ab-me img.avatar, |
|---|
| 2343 | +#wpadminbar li.ab-blog img.avatar { |
|---|
| 2344 | + margin: 4px 0 0 0 !important; |
|---|
| 2345 | + vertical-align: middle; |
|---|
| 2346 | + background: #eee; |
|---|
| 2347 | + width: 16px !important; |
|---|
| 2348 | + height: 16px !important; |
|---|
| 2349 | +} |
|---|
| 2350 | +#wpadminbar li.ab-my-account a, #wpadminbar li.ab-bloginfo a { |
|---|
| 2351 | + border-left: none !important; |
|---|
| 2352 | + padding-left: 0.7em !important; |
|---|
| 2353 | + margin-top: 0 !important; |
|---|
| 2354 | +} |
|---|
| 2355 | +#wpadminbar li.ab-my-account > ul, #wpadminbar li.ab-bloginfo > ul { |
|---|
| 2356 | + left: -7px; |
|---|
| 2357 | +} |
|---|
| 2358 | +#wpadminbar ul li img { |
|---|
| 2359 | + width: 16px !important; |
|---|
| 2360 | + height: 16px !important; |
|---|
| 2361 | +} |
|---|
| 2362 | + |
|---|
| 2363 | +#wpadminbar ul li a strong.count { |
|---|
| 2364 | + text-shadow: none; |
|---|
| 2365 | + background: #ddd; |
|---|
| 2366 | + color: #555; |
|---|
| 2367 | + margin-left: 5px; |
|---|
| 2368 | + padding: 1px 6px; |
|---|
| 2369 | + top: -1px; |
|---|
| 2370 | + position: relative; |
|---|
| 2371 | + font-size: 9px; |
|---|
| 2372 | + -moz-border-radius: 7px; |
|---|
| 2373 | + -webkit-border-radius: 7px; |
|---|
| 2374 | + border-radius: 7px; |
|---|
| 2375 | + font-weight: normal; |
|---|
| 2376 | +} |
|---|
| 2377 | + |
|---|
| 2378 | +#wpadminbar #adminbar-search { |
|---|
| 2379 | + line-height:normal !important; |
|---|
| 2380 | + width:140px !important; |
|---|
| 2381 | + margin-top:0px !important; |
|---|
| 2382 | +} |
|---|
| 2383 | +.adminbar-input { |
|---|
| 2384 | + display:block !important; |
|---|
| 2385 | + float:left !important; |
|---|
| 2386 | + font:12px Arial,Helvetica,sans-serif !important; |
|---|
| 2387 | + border:1px solid #626262 !important; |
|---|
| 2388 | + padding:2px 3px !important; |
|---|
| 2389 | + margin-right:3px !important; |
|---|
| 2390 | + background:#ddd url(../images/admin-bar-sprite.png?d=08102010) top left no-repeat !important; |
|---|
| 2391 | + -webkit-border-radius:0 !important; |
|---|
| 2392 | + -khtml-border-radius:0 !important; |
|---|
| 2393 | + -moz-border-radius:0 !important; |
|---|
| 2394 | + border-radius:0 !important; |
|---|
| 2395 | + outline:none; |
|---|
| 2396 | + text-shadow:0 1px 0 #fff; |
|---|
| 2397 | +} |
|---|
| 2398 | +button.adminbar-button { |
|---|
| 2399 | + position:relative; |
|---|
| 2400 | + border:0; |
|---|
| 2401 | + cursor:pointer; |
|---|
| 2402 | + overflow:visible; |
|---|
| 2403 | + margin:0 !important; |
|---|
| 2404 | + float:left; |
|---|
| 2405 | + background:url(../images/admin-bar-sprite.png?d=08102010) right -107px no-repeat; |
|---|
| 2406 | + padding:0 14px 0 0; |
|---|
| 2407 | + text-align:center; |
|---|
| 2408 | +} |
|---|
| 2409 | +button.adminbar-button span { |
|---|
| 2410 | + position:relative; |
|---|
| 2411 | + display:block; |
|---|
| 2412 | + white-space:nowrap; |
|---|
| 2413 | + height:19px; |
|---|
| 2414 | + background:url(../images/admin-bar-sprite.png?d=08102010) left -69px no-repeat; |
|---|
| 2415 | + padding:3px 0 0 14px; |
|---|
| 2416 | + font:12px Arial,Helvetica,sans-serif !important; |
|---|
| 2417 | + font-weight:bold !important; |
|---|
| 2418 | + color:#444 !important; |
|---|
| 2419 | + text-shadow:0px 1px 0px #eee !important; |
|---|
| 2420 | +} |
|---|
| 2421 | +button.adminbar-button:active { |
|---|
| 2422 | + background-position:right -184px !important; |
|---|
| 2423 | + text-shadow:0px 1px 0px #eee !important; |
|---|
| 2424 | +} |
|---|
| 2425 | +button.adminbar-button:hover span { |
|---|
| 2426 | + color:#000 !important; |
|---|
| 2427 | +} |
|---|
| 2428 | +button.adminbar-button:active span { |
|---|
| 2429 | + background-position:left -146px !important; |
|---|
| 2430 | +} |
|---|
| 2431 | +button.adminbar-button::-moz-focus-inner { |
|---|
| 2432 | + border:none; |
|---|
| 2433 | +} |
|---|
| 2434 | +@media screen and (-webkit-min-device-pixel-ratio:0) { |
|---|
| 2435 | + button.adminbar-button span { |
|---|
| 2436 | + margin-top: -1px; |
|---|
| 2437 | + } |
|---|
| 2438 | +} |
|---|
| 2439 | + |
|---|
| 2440 | + |
|---|
| 2441 | +/** |
|---|
| 2442 | + * IE 6-targeted rules |
|---|
| 2443 | + */ |
|---|
| 2444 | + |
|---|
| 2445 | +* html #wpadminbar, |
|---|
| 2446 | +* html #wpadminbar .menupop a span, |
|---|
| 2447 | +* html #wpadminbar .menupop ul li a:hover, |
|---|
| 2448 | +* html #wpadminbar .myaccount a, |
|---|
| 2449 | +* html .quicklinks a:hover,#wpadminbar .menupop:hover { |
|---|
| 2450 | + background-image: none !important; |
|---|
| 2451 | +} |
|---|
| 2452 | + |
|---|
| 2453 | +* html #wpadminbar { |
|---|
| 2454 | + overflow:hidden; |
|---|
| 2455 | + position:absolute; |
|---|
| 2456 | +} |
|---|
| 2457 | + |
|---|
| 2458 | +* html #wpadminbar .quicklinks ul li a { |
|---|
| 2459 | + float:left; |
|---|
| 2460 | +} |
|---|
| 2461 | + |
|---|
| 2462 | +* html #adminbarsearch-wrap { |
|---|
| 2463 | + position:absolute; |
|---|
| 2464 | + top:0; |
|---|
| 2465 | +} |
|---|
| 2466 | + |
|---|
| 2467 | +* html #wpadminbar ul, |
|---|
| 2468 | +* html #wpadminbar ul li { |
|---|
| 2469 | + zoom:1; |
|---|
| 2470 | +} |
|---|
| 2471 | + |
|---|
| 2472 | +* html #wpadminbar .myaccount a { |
|---|
| 2473 | + margin-left:0 !important; |
|---|
| 2474 | + padding-left:12px !important; |
|---|
| 2475 | +} |
|---|
| 2476 | +/** |
|---|
| 2477 | + * End IE 6-targeted rules |
|---|
| 2478 | + */ |
|---|
| 2479 | |
|---|
| 2480 | Property changes on: wp-includes/css/admin-bar.dev.css |
|---|
| 2481 | ___________________________________________________________________ |
|---|
| 2482 | Added: svn:mergeinfo |
|---|
| 2483 | |
|---|
| 2484 | Index: wp-includes/script-loader.php |
|---|
| 2485 | =================================================================== |
|---|
| 2486 | --- wp-includes/script-loader.php (revision 16029) |
|---|
| 2487 | +++ wp-includes/script-loader.php (working copy) |
|---|
| 2488 | @@ -456,7 +456,7 @@ |
|---|
| 2489 | |
|---|
| 2490 | $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '.dev' : ''; |
|---|
| 2491 | |
|---|
| 2492 | - $rtl_styles = array( 'wp-admin', 'global', 'colors', 'colors-fresh', 'colors-classic', 'dashboard', 'ie', 'install', 'login', 'media', 'theme-editor', 'upload', 'widgets', 'press-this', 'plugin-install', 'nav-menu', 'farbtastic' ); |
|---|
| 2493 | + $rtl_styles = array( 'wp-admin', 'admin-bar', 'global', 'colors', 'colors-fresh', 'colors-classic', 'dashboard', 'ie', 'install', 'login', 'media', 'theme-editor', 'upload', 'widgets', 'press-this', 'plugin-install', 'nav-menu', 'farbtastic' ); |
|---|
| 2494 | // Any rtl stylesheets that don't have a .dev version for ltr |
|---|
| 2495 | $no_suffix = array( 'farbtastic' ); |
|---|
| 2496 | |
|---|
| 2497 | @@ -475,6 +475,8 @@ |
|---|
| 2498 | $styles->add( 'colors-fresh', "/wp-admin/css/colors-fresh$suffix.css", array(), $colors_version ); |
|---|
| 2499 | $styles->add( 'colors-classic', "/wp-admin/css/colors-classic$suffix.css", array(), $colors_version ); |
|---|
| 2500 | |
|---|
| 2501 | + $styles->add( 'admin-bar', "/wp-includes/css/admin-bar$suffix.css", array(), '20101027' ); |
|---|
| 2502 | + $styles->add( 'super-admin-bar', "/wp-includes/css/super-admin-bar$suffix.css", array(), '20101027' ); |
|---|
| 2503 | $styles->add( 'ms', "/wp-admin/css/ms$suffix.css", array(), '20100528' ); |
|---|
| 2504 | $styles->add( 'global', "/wp-admin/css/global$suffix.css", array(), '20101027' ); |
|---|
| 2505 | $styles->add( 'media', "/wp-admin/css/media$suffix.css", array(), '20101020' ); |
|---|