I would avoid the use of !important. I'd also put the colours in specific classes, like .header-red, .header-green, etc. Then let PHP decide which class to attach to the header. Hardcoded styles like in your example are a lot less flexible and future-proof.<br>
Generally, it's a good idea for plugin authors/developers to just attach relevant (general and specific) classes to every element, and let stylesheets decide the styling specifics. Kind of like Wordpress itself does with the body tag and post divs.<br>
<br><div class="gmail_quote">On Wed, Jun 2, 2010 at 12:30 AM, Alex Hempton-Smith <span dir="ltr"><<a href="mailto:hempsworth@gmail.com">hempsworth@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Quick solution to this:<br><br><?php<br>/*<br>Plugin Name: Site Colors<br>Plugin URI: <a href="http://www.alexhemptonsmith.com" target="_blank">http://www.alexhemptonsmith.com</a><br>Description: Lets you define the header color for specific sites<br>
Author: Alex Hempton-Smith<br>Version: 0.0.1-dev<br>Author URI: <a href="http://www.alexhemptonsmith.com" target="_blank">http://www.alexhemptonsmith.com</a><br>*/<br><br>function site_colors(){<br> <br> $site = get_current_site();<br>
<br> // Site with ID of 1 has a header with a red background<br> if ($site->blog_id == 1)<br> $header_color = 'red';<br><br> // Site with ID of 2 has a header with a black background<br> if ($site->blog_id == 2)<br>
$header_color = '#000';<br><br> if ($header_color)<br> echo "<style type='text/css'>#wphead {background: $header_color !important;}</style>";<br>}<br>add_action('admin_print_styles', 'site_colors');<br>
<br clear="all">-- Alex (Hempsworth)<div><div></div><div class="h5"><br>
<br><br><div class="gmail_quote">On Tue, Jun 1, 2010 at 11:10 PM, andrea_r <span dir="ltr"><<a href="mailto:andrea@ronandandrea.com" target="_blank">andrea@ronandandrea.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div>Or on a site-by-site basis when using the new network feature. ;)<br>
<br>
Yes, the titles are different but color can be a great visual cue.</div></blockquote></div><br>
</div></div><br>_______________________________________________<br>
wp-ui mailing list<br>
<a href="mailto:wp-ui@lists.automattic.com">wp-ui@lists.automattic.com</a><br>
<a href="http://lists.automattic.com/mailman/listinfo/wp-ui" target="_blank">http://lists.automattic.com/mailman/listinfo/wp-ui</a><br>
<br></blockquote></div><br>