function ttw_defaultopt($opt) { global $ttw_optionsList; $ttw_optionsList[$opt] = ttw_getopt_std($opt); /* set to default value */ }
function ttw_output_style($sout) { /* This outputs the CSS overrides. It will output to a file pointer, so it can write to a .css file saved in the user's upload directory - just like the saved style .wvr files. It is included via a standard css include. It needs to be loaded only for the admin page. */ // Put a options that can be overridden by the CSS option at the top! fwrite($sout, sprintf("/* General Options */\n")); /* ttw_after_header */ if (($optVal = ttw_getopt("ttw_after_header")) != ttw_getopt_std("ttw_after_header")) { fwrite($sout, sprintf("#main {padding: %spx 0 0 0;}\n", $optVal)); } /* ttw_bold_menu */ if (ttw_getopt("ttw_bold_menu")) { fwrite($sout, sprintf("#access, #access li ul ul > a {font-weight:bold;}\n")); fwrite($sout, sprintf("#access2, #access2 li ul ul > a {font-weight:bold;}\n")); } /* ttw_contentlist_bullet */ $val = ttw_getopt("ttw_contentlist_bullet"); /* add a new lsit bullet */ if ($val && $val != '' && $val != 'default') { if ($val == 'none' || $val == 'circle' || $val == 'disc' || $val == 'square') { fwrite($sout, sprintf("ul {list-style:%s;}\n", $val)); } else { fwrite($sout, sprintf("ul {list-style:none;list-style-image: url(%s/images/bullets/%s.gif);}\n", get_template_directory_uri(), $val)); } } /* ttw_content_font */ if (($useFont = t_get_font_value('ttw_content_font')) != '') { t_css_fontfamily($sout, 'body, input, textarea, .page-title span, .pingback a.url', $useFont); } /* ttw_fadebody_bg */ if (ttw_getopt('ttw_fadebody_bg')) { fwrite($sout, sprintf("body {background-image: url(%s/images/gr.png); background-attachment: scroll; background-repeat: repeat-x;}\n", get_template_directory_uri())); } /* ttw_gradient_menu */ if (ttw_getopt('ttw_gradient_menu')) { fwrite($sout, sprintf("#access, #access2 { background-image: url(%s/images/weaver/fade.png);}\n", get_template_directory_uri())); fwrite($sout, sprintf("#access ul ul a, #access li:hover > a, #access ul ul :hover > a { background-image: url(%s/images/weaver/fadeup.png);}\n", get_template_directory_uri())); fwrite($sout, sprintf("#access2 ul ul a, #access2 li:hover > a, #access2 ul ul :hover > a { background-image: url(%s/images/weaver/fadeup.png);}\n", get_template_directory_uri())); } /* ttw_hide_post_fill (also used in post icons) */ if (ttw_getopt('ttw_hide_post_fill')) { fwrite($sout, sprintf(".entry-utility-prep {display: none;}\n.meta-prep-author {display:none;}\n.meta-sep {display: none;}\n")); } /* ttw_large_tagline */ if (ttw_getopt('ttw_large_tagline')) { fwrite($sout, sprintf('#site-description {font-size:130%%; font-weight:bold;}')); } /* ttw_list_bullet */ $val = ttw_getopt('ttw_list_bullet'); /* add a new lsit bullet */ if ($val && $val != '' && $val != 'default') { if ($val == 'none' || $val == 'circle' || $val == 'disc' || $val == 'square') { fwrite($sout, sprintf(".widget-area ul ul {list-style:%s;}\n", $val)); } else { fwrite($sout, sprintf(".widget-area ul ul {list-style:none; list-style-position:inside; list-style-image: url(%s/images/bullets/%s.gif);}\n", get_template_directory_uri(), $val)); } } /* ttw_post_icons */ if (ttw_getopt('ttw_post_icons')) { $leftm = '8'; if (!ttw_getopt('ttw_hide_post_fill')) { $leftm = '0'; } // no left margin if not hiding fill in fwrite($sout, sprintf(".cat-links {background: url(%s/images/icons/category-1.png) no-repeat 1px;padding-top:3px;padding-left:23px;}\n", get_template_directory_uri())); fwrite($sout, sprintf(".vcard {background: url(%s/images/icons/author-1.png) no-repeat;padding-top: 2px;padding-left:21px;margin-left:%spx;}\n", get_template_directory_uri(), $leftm)); fwrite($sout, sprintf(".entry-meta {background: url(%s/images/icons/date-1.png) no-repeat 1px;padding-top:1px;padding-left:26px;}\n", get_template_directory_uri())); fwrite($sout, sprintf(".comments-link {background: url(%s/images/icons/comment-1.png) no-repeat 1px; padding-left:24px;padding-top:2px;margin-left:%spx;}\n", get_template_directory_uri(), $leftm)); fwrite($sout, sprintf(".tag-links {background: url(%s/images/icons/tag-1.png) no-repeat 1px;padding-top:2px;padding-left:24px;margin-left:%spx;}\n", get_template_directory_uri(), $leftm)); fwrite($sout, sprintf(".edit-link{ background: url(%s/images/icons/edit-1.png) no-repeat 1px;padding-top:3px;padding-left:21px;margin-left:%spx;}\n", get_template_directory_uri(), $leftm)); } /* ttw_small_content_font */ if (ttw_getopt('ttw_small_content_font')) { fwrite($sout, sprintf("#content {font-size: 120%%; line-height: 125%%; }\n")); /* stange, but true! */ fwrite($sout, sprintf("#comments {font-size: 90%%; line-height: 90%%; }\n")); /* stange, but true! */ } /* ttw_title_font */ if (($useFont = t_get_font_value('ttw_title_font')) != '') { t_css_fontfamily($sout, 'h3#comments-title, h3#reply-title, #access .menu, #access div.menu ul, #access2 .menu, #access2 div.menu ul, #cancel-comment-reply-link, .form-allowed-tags, #site-info, #site-title, #wp-calendar, .comment-meta, .comment-body tr th, .comment-body thead th, .entry-content label, .entry-content tr th, .entry-content thead th, .entry-meta, .entry-title, .entry-utility, #respond label, .navigation, .page-title, .pingback p, .reply, .widget_search label, .widget-title, input[type=submit]', $useFont); } /* ttw_useborders */ if (ttw_getopt('ttw_useborders')) { fwrite($sout, sprintf("#wrapper {border: 1px solid #222222; padding-right: 20px; margin-top: 15px; margin-bottom: 15px;}\n")); fwrite($sout, sprintf("#header {margin-top: 0px;}\n")); fwrite($sout, sprintf("#primary, #secondary, #altleft, #altright, #ttw-top-widget, #ttw-bot-widget, #altleft, #altright {border: 1px solid #222222;}\n")); } /* ttw_rounded_corners */ if (ttw_getopt('ttw_rounded_corners')) { fwrite($sout, sprintf("#container, #primary, #secondary, #altleft, #altright,\n #ttw-top-widget, #ttw-bot-widget {-moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px;}\n")); if (ttw_getopt('ttw_move_menu')) { fwrite($sout, sprintf("#access2 {-moz-border-radius-bottomleft: 7px; -moz-border-radius-bottomright: 7px;\n -webkit-border-bottom-left-radius: 7px; -webkit-border-bottom-right-radius: 7px; border-bottom-left-radius: 7px; border-bottom-right-radius: 7px;}\n")); fwrite($sout, sprintf("#access {-moz-border-radius-topleft: 7px; -moz-border-radius-topright: 7px;\n -webkit-border-top-left-radius: 7px; -webkit-border-top-right-radius: 7px; border-top-left-radius: 7px; border-top-right-radius: 7px;}\n")); } else { fwrite($sout, sprintf("#access {-moz-border-radius-bottomleft: 7px; -moz-border-radius-bottomright: 7px;\n -webkit-border-bottom-left-radius: 7px; -webkit-border-bottom-right-radius: 7px;border-bottom-left-radius: 7px; border-bottom-right-radius: 7px;}\n")); fwrite($sout, sprintf("#access2 {-moz-border-radius-topleft: 7px; -moz-border-radius-topright: 7px;\n -webkit-border-top-left-radius: 7px; -webkit-border-top-right-radius: 7px;border-top-left-radius: 7px; border-top-right-radius: 7px;}\n")); } fwrite($sout, sprintf("#wrapper {-moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px; margin-top: 15px; margin-bottom: 15px;}\n")); } // ------------------------------------------- end of overrideable options ------------------------------- /* Generate the sidebar CSS last since it might override some other settings */ fwrite($sout, sprintf("/* Sidebar arrangement */\n")); ttw_sidebar_css($sout); // complicated code in its own function... /* ttw_title_on_header - needs to be here... */ fwrite($sout, sprintf("/* Color and custom CSS */\n")); if (ttw_getopt('ttw_title_on_header')) { fwrite($sout, sprintf("#site-title {position: absolute; margin-top: 44px; margin-left: 40px; }\n#site-description { text-align:left; clear: both; float: left; position:absolute; margin-top: 90px; margin-left: 40px;}\n")); } /* ttw_body_bgcolor */ if ($optVal = ttw_getopt_newcolor('ttw_body_bgcolor')) { t_css_bgcolor($sout, 'body', $optVal); } if ($optVal = ttw_getopt('ttw_body_bgcolor_css')) { t_css_css($sout, 'body', $optVal); } /* ttw_container_bgcolor */ if ($optVal = ttw_getopt("ttw_container_bgcolor")) { t_css_bgcolor($sout, '#container', $optVal); } if ($optVal = ttw_getopt("ttw_container_bgcolor_css")) { t_css_css($sout, '#container', $optVal); } /* ttw_content_bgcolor */ if ($optVal = ttw_getopt("ttw_content_bgcolor")) { t_css_bgcolor($sout, '#content', $optVal); } if ($optVal = ttw_getopt('ttw_content_bgcolor_css')) { t_css_css($sout, '#content', $optVal); } /* ttw_content_color */ if ($optVal = ttw_getopt_newcolor('ttw_content_color')) { t_css_color($sout, '#content, #content input, #content textarea', $optVal); } if ($optVal = ttw_getopt('ttw_content_color_css')) { t_css_css($sout, '#content, #content input, #content textarea', $optVal); } /* ttw_desc_color */ if ($optVal = ttw_getopt_newcolor('ttw_desc_color')) { fwrite($sout, sprintf("#site-description {color: " . $optVal . ";}\n")); } if ($optVal = ttw_getopt('ttw_desc_color_css')) { t_css_css($sout, "#site-description", $optVal); } /* ttw_excerpt_length - no CSS */ /* ttw_footer_bgcolor */ if ($optVal = ttw_getopt("ttw_footer_bgcolor")) { t_css_bgcolor($sout, '#footer', $optVal); } if ($optVal = ttw_getopt("ttw_footer_bgcolor_css")) { t_css_css($sout, '#footer', $optVal); } /* ttw_footer_border_color */ if ($optVal = ttw_getopt_newcolor('ttw_footer_border_color')) { fwrite($sout, sprintf("#colophon { border-top: 4px solid {$optVal} ; }\n")); } if ($optVal = ttw_getopt("ttw_footer_border_color_css")) { t_css_css($sout, '#colophon', $optVal); } /* ttw_footer_widget_bgcolor */ if ($optVal = ttw_getopt('ttw_footer_widget_bgcolor')) { t_css_bgcolor($sout, '#first,#second, #third, #fourth', $optVal, 'padding-left: 10px; padding-top: 10px; margin-bottom: 5px;'); } if ($optVal = ttw_getopt('ttw_footer_widget_bgcolor_css')) { t_css_css($sout, '#first,#second, #third, #fourth', $optVal); } /* ttw_force_widg_frontpage - no CSS */ /* ttw_header_bgcolor */ if ($optVal = ttw_getopt("ttw_header_bgcolor")) { t_css_bgcolor($sout, '#header', $optVal); } if ($optVal = ttw_getopt("ttw_header_bgcolor_css")) { t_css_css($sout, '#header', $optVal); } /* ttw_header_image_height - no CSS*/ /* ttw_header_image_width - no CSS (used in width calculations, however) */ /* ttw_header_underline */ $val = (int) ttw_getopt('ttw_header_underline'); /* bar under headers */ if ($val != '' && $val != 0) { $titleColor = ttw_getopt('ttw_text_color'); fwrite($sout, sprintf(".entry-title {border-bottom: {$val}" . "px solid {$titleColor};}\n")); } /* ttw_hide_menu - no CSS */ /* ttw_hide_site_title - no CSS */ /* ttw_hide_widg_pages - no CSS */ /* ttw_hide_widg_posts - no CSS */ /* ttw_hr_color */ if ($optVal = ttw_getopt_newcolor('ttw_hr_color')) { t_css_bgcolor($sout, 'hr', $optVal); } if ($optVal = ttw_getopt('ttw_hr_color_css')) { t_css_css($sout, 'hr', $optVal); } /* ttw_ilink_color */ /* ttw_ilink_hover_color */ /* ttw_ilink_visited_color */ if ($optVal = ttw_getopt_newcolor("ttw_ilink_color")) { /* post title links */ t_css_color($sout, '.page-title a:link', $optVal); t_css_color($sout, '.entry-meta a:link', $optVal); t_css_color($sout, '.entry-utility a:link', $optVal); t_css_color($sout, '.navigation a:link', $optVal); t_css_color($sout, '.comment-meta a:link', $optVal); t_css_color($sout, '.reply a:link, a.comment-edit-link:link', $optVal); } if ($optVal = ttw_getopt_newcolor("ttw_ilink_hover_color")) { t_css_color($sout, '.page-title a:active, .page-title a:hover', $optVal); t_css_color($sout, '.entry-meta a:hover, .entry-meta a:active', $optVal); t_css_color($sout, '.entry-utility a:hover, .entry-utility a:active', $optVal); t_css_color($sout, '.navigation a:active, .navigation a:hover', $optVal); t_css_color($sout, '.comment-meta a:active, .comment-meta a:hover', $optVal); t_css_color($sout, '.reply a:active, a.comment-edit-link:active, .reply a:hover, a.comment-edit-link:hover', $optVal); } if ($optVal = ttw_getopt_newcolor("ttw_ilink_visited_color")) { t_css_color($sout, '.page-title a:visited', $optVal); t_css_color($sout, '.entry-meta a:visited', $optVal); t_css_color($sout, '.entry-utility a:visited', $optVal); t_css_color($sout, '.navigation a:visited', $optVal); t_css_color($sout, '.comment-meta a:visited', $optVal); t_css_color($sout, '.reply a:visited, a.comment-edit-link:visited', $optVal); } if ($optVal = ttw_getopt("ttw_ilink_color_css")) { /* post title links */ t_css_css($sout, '.page-title a:link', $optVal); t_css_css($sout, '.entry-meta a:link', $optVal); t_css_css($sout, '.entry-utility a:link', $optVal); t_css_css($sout, '.navigation a:link', $optVal); t_css_css($sout, '.comment-meta a:link', $optVal); t_css_css($sout, '.reply a:link, a.comment-edit-link:link', $optVal); } if ($optVal = ttw_getopt("ttw_ilink_hover_color_css")) { t_css_css($sout, '.page-title a:active, .page-title a:hover', $optVal); t_css_css($sout, '.entry-meta a:hover, .entry-meta a:active', $optVal); t_css_css($sout, '.entry-utility a:hover, .entry-utility a:active', $optVal); t_css_css($sout, '.navigation a:active, .navigation a:hover', $optVal); t_css_css($sout, '.comment-meta a:active, .comment-meta a:hover', $optVal); t_css_css($sout, '.reply a:active, a.comment-edit-link:active, .reply a:hover, a.comment-edit-link:hover', $optVal); } if ($optVal = ttw_getopt("ttw_ilink_visited_color_css")) { t_css_css($sout, '.page-title a:visited', $optVal); t_css_css($sout, '.entry-meta a:visited', $optVal); t_css_css($sout, '.entry-utility a:visited', $optVal); t_css_css($sout, '.navigation a:visited', $optVal); t_css_css($sout, '.comment-meta a:visited', $optVal); t_css_css($sout, '.reply a:visited, a.comment-edit-link:visited', $optVal); } /* ttw_info_color */ if ($infoColor = ttw_getopt_newcolor('ttw_info_color')) { t_css_color($sout, '#comments .pingback p', $infoColor); t_css_color($sout, '#respond label, #respond dt, #respond dd', $infoColor); t_css_color($sout, '.entry-meta, .entry-content label, .entry-utility', $infoColor); t_css_color($sout, '#content .wp-caption, #content .gallery .gallery-caption', $infoColor); t_css_color($sout, '.navigation', $infoColor); } if ($infoColor = ttw_getopt('ttw_info_color_css')) { t_css_css($sout, '#comments .pingback p', $infoColor); t_css_css($sout, '#respond label, #respond dt, #respond dd', $infoColor); t_css_css($sout, '.entry-meta, .entry-content label, .entry-utility', $infoColor); t_css_css($sout, '#content .wp-caption, #content .gallery .gallery-caption', $infoColor); t_css_css($sout, '.navigation', $infoColor); } /* ttw_infotop_bgcolor, ttw_infobottom_bgcolor */ if ($optVal = ttw_getopt('ttw_infotop_bgcolor')) { t_css_bgcolor($sout, '.entry-meta', $optVal); } if ($optVal = ttw_getopt('ttw_infotop_bgcolor_css')) { t_css_css($sout, '.entry-meta', $optVal); } if ($optVal = ttw_getopt('ttw_infobottom_bgcolor')) { t_css_bgcolor($sout, '.entry-utility', $optVal); } if ($optVal = ttw_getopt('ttw_infobottom_bgcolor_css')) { t_css_css($sout, '.entry-utility', $optVal); } /* ttw_input_bgcolor */ if ($optVal = ttw_getopt('ttw_input_bgcolor')) { t_css_bgcolor($sout, 'input[type="text"], textarea, input[type="submit"], ins', $optVal); } if ($optVal = ttw_getopt('ttw_input_bgcolor_css')) { t_css_css($sout, 'input[type="text"], textarea, input[type="submit"], ins', $optVal); } /* ttw_link_color */ /* ttw_link_hover_color */ /* ttw_link_visited_color */ if ($optVal = ttw_getopt_newcolor('ttw_link_color')) { t_css_color($sout, 'a:link', $optVal); } if ($optVal = ttw_getopt_newcolor('ttw_link_hover_color')) { t_css_color($sout, 'a:active, a:hover', $optVal); } if ($optVal = ttw_getopt_newcolor('ttw_link_visited_color')) { t_css_color($sout, 'a:visited', $optVal); } if ($optVal = ttw_getopt('ttw_link_color_css')) { t_css_css($sout, 'a:link', $optVal); } if ($optVal = ttw_getopt('ttw_link_hover_color_css')) { t_css_css($sout, 'a:active, a:hover', $optVal); } if ($optVal = ttw_getopt('ttw_link_visited_color_css')) { t_css_css($sout, 'a:visited', $optVal); } /* ttw_link_site_image - no CSS */ /* ttw_main_bgcolor */ if ($optVal = ttw_getopt('ttw_main_bgcolor')) { t_css_bgcolor($sout, '#main', $optVal); } if ($optVal = ttw_getopt('ttw_main_bgcolor_css')) { t_css_css($sout, '#main', $optVal); } /* ttw_caption_color */ if ($optVal = ttw_getopt_newcolor('ttw_caption_color')) { t_css_color($sout, '#content .wp-caption p.wp-caption-text', $optVal); } if ($optVal = ttw_getopt('ttw_caption_color_css')) { t_css_css($sout, '#content .wp-caption p.wp-caption-text', $optVal); } /* ttw_media_lib_border */ if ($optVal = ttw_getopt('ttw_media_lib_border')) { fwrite($sout, sprintf("#content .size-full, #content .size-large, #content .size-medium, #content .size-thumbnail,#content .size-thumbnail {background-color: %s;}\n", $optVal)); } if ($optVal = ttw_getopt('ttw_media_lib_border_css')) { t_css_css($sout, '#content .size-full, #content .size-large, #content .size-medium, #content .size-thumbnail', $optVal); } /* ttw_media_lib_captioned_border */ if ($optVal = ttw_getopt('ttw_media_lib_captioned_border')) { fwrite($sout, sprintf("#content .wp-caption p.wp-caption-text,\n#content .wp-caption .size-full, #content .wp-caption .size-large, #content .wp-caption .size-medium,\n#content .wp-caption .size-thumbnail, #content .wp-caption .size-thumbnail {background-color: %s;}\n", $optVal)); } if ($optVal = ttw_getopt('ttw_media_lib_captioned_border_css')) { t_css_css($sout, '#content .wp-caption p.wp-caption-text, #content .wp-caption .size-full, #content .wp-caption .size-large, #content .wp-caption .size-medium, #content .wp-caption .size-thumbnail, #content .wp-caption .size-thumbnail', $optVal); } /* ttw_menubar_color */ if ($optVal = ttw_getopt_newcolor('ttw_menubar_color')) { t_css_bgcolor($sout, '#access, #access2', $optVal); } if ($optVal = ttw_getopt('ttw_menubar_color_css')) { t_css_css($sout, '#access, #access2', $optVal); } /* ttw_menubar_curpage_color */ if ($optVal = ttw_getopt_newcolor('ttw_menubar_curpage_color')) { t_css_color($sout, '#access ul li.current_page_item > a, #access ul li.current-menu-ancestor > a, #access ul li.current-menu-item > a, #access ul li.current-menu-parent > a', $optVal); t_css_color($sout, '#access2 ul li.current_page_item > a, #access2 ul li.current-menu-ancestor > a, #access2 ul li.current-menu-item > a, #access ul li.current-menu-parent > a', $optVal); } if ($optVal = ttw_getopt('ttw_menubar_curpage_color_css')) { t_css_css($sout, '#access ul li.current_page_item > a, #access ul li.current-menu-ancestor > a, #access ul li.current-menu-item > a, #access ul li.current-menu-parent > a', $optVal); t_css_css($sout, '#access2 ul li.current_page_item > a, #access2 ul li.current-menu-ancestor > a, #access2 ul li.current-menu-item > a, #access ul li.current-menu-parent > a', $optVal); } /* ttw_menubar_hover_color */ /* ttw_menubar_hoverbg_color */ /* ttw_menubar_text_color */ if ($optVal = ttw_getopt_newcolor('ttw_menubar_hover_color')) { t_css_color($sout, '#access li:hover > a, #access ul ul :hover > a', $optVal); t_css_color($sout, '#access2 li:hover > a, #access2 ul ul :hover > a', $optVal); } if ($optVal = ttw_getopt_newcolor('ttw_menubar_hoverbg_color')) { t_css_bgcolor($sout, '#access ul ul a, #access li:hover > a, #access ul ul :hover > a ', $optVal); t_css_bgcolor($sout, '#access2 ul ul a, #access2 li:hover > a, #access2 ul ul :hover > a ', $optVal); } if ($optVal = ttw_getopt_newcolor('ttw_menubar_text_color')) { t_css_color($sout, '#access a', $optVal); t_css_color($sout, '#access2 a', $optVal); } if ($optVal = ttw_getopt('ttw_menubar_hover_color_css')) { t_css_css($sout, '#access li:hover > a, #access ul ul :hover > a', $optVal); t_css_css($sout, '#access2 li:hover > a, #access2 ul ul :hover > a', $optVal); } if ($optVal = ttw_getopt('ttw_menubar_hoverbg_color_css')) { t_css_css($sout, '#access ul ul a, #access li:hover > a, #access ul ul :hover > a ', $optVal); t_css_css($sout, '#access2 ul ul a, #access2 li:hover > a, #access2 ul ul :hover > a ', $optVal); } if ($optVal = ttw_getopt('ttw_menubar_text_color_css')) { t_css_css($sout, '#access a', $optVal); t_css_css($sout, '#access2 a', $optVal); } /* ttw_move_menu - no CSS (used by rounded corners) */ /* ttw_page_bgcolor */ if ($optVal = ttw_getopt('ttw_page_bgcolor')) { t_css_bgcolor($sout, '#wrapper', $optVal); } if ($optVal = ttw_getopt('ttw_page_bgcolor_css')) { t_css_css($sout, '#wrapper', $optVal); } /* ttw_plink_color */ /* ttw_plink_hover_color */ /* ttw_plink_visited_color */ if ($optVal = ttw_getopt_newcolor('ttw_plink_color')) { /* post title links */ t_css_color($sout, '.entry-title a:link', $optVal); t_css_color($sout, '.widget_rss a.rsswidget:link', $optVal); } if ($optVal = ttw_getopt_newcolor('ttw_plink_hover_color')) { t_css_color($sout, '.entry-title a:active, .entry-title a:hover', $optVal); t_css_color($sout, '.widget_rss a.rsswidget:active, .widget_rss a.rsswidget:hover', $optVal); } if ($optVal = ttw_getopt_newcolor('ttw_plink_visited_color')) { t_css_color($sout, '.entry-title a:visited', $optVal); t_css_color($sout, '.widget_rss a.rsswidget:visited', $optVal); } if ($optVal = ttw_getopt('ttw_plink_color_css')) { /* post title links */ t_css_css($sout, '.entry-title a:link', $optVal); t_css_css($sout, '.widget_rss a.rsswidget:link', $optVal); } if ($optVal = ttw_getopt('ttw_plink_hover_color_css')) { t_css_css($sout, '.entry-title a:active, .entry-title a:hover', $optVal); t_css_css($sout, '.widget_rss a.rsswidget:active, .widget_rss a.rsswidget:hover', $optVal); } if ($optVal = ttw_getopt('ttw_plink_visited_color_css')) { t_css_css($sout, '.entry-title a:visited', $optVal); t_css_css($sout, '.widget_rss a.rsswidget:visited', $optVal); } /* ttw_post_bgcolor */ if ($optVal = ttw_getopt('ttw_post_bgcolor')) { t_css_bgcolor($sout, '.post', $optVal); } if ($optVal = ttw_getopt('ttw_post_bgcolor_css')) { t_css_css($sout, '.post', $optVal); } /* ttw_side1_bgcolor */ /* ttw_side2_bgcolor */ /* ttw_side3_bgcolor */ if ($optVal = ttw_getopt('ttw_side1_bgcolor')) { t_css_bgcolor($sout, '#primary', $optVal, 'padding-left: 10px; padding-top: 10px; margin-bottom: 5px;'); } if ($optVal = ttw_getopt('ttw_side2_bgcolor')) { t_css_bgcolor($sout, '#secondary', $optVal, 'padding-left: 10px; padding-top: 10px; margin-bottom: 5px;'); } if ($optVal = ttw_getopt('ttw_side3_bgcolor')) { t_css_bgcolor($sout, '#altright, #altleft', $optVal, 'padding-left: 10px; padding-top: 10px; margin-bottom: 5px;'); } if ($optVal = ttw_getopt('ttw_side1_bgcolor_css')) { t_css_css($sout, '#primary', $optVal); } if ($optVal = ttw_getopt('ttw_side2_bgcolor_css')) { t_css_css($sout, '#secondary', $optVal); } if ($optVal = ttw_getopt('ttw_side3_bgcolor_css')) { t_css_css($sout, '#altright, #altleft', $optVal); } /* ttw_sidebar_width */ /* ttw_sidebars */ /* The CSS for sidebars is generated last because it might override some other settings */ /* ttw_stickypost_bgcolor */ if ($optVal = ttw_getopt('ttw_stickypost_bgcolor')) { t_css_bgcolor($sout, '.home .sticky, #entry-author-info', $optVal); } if ($optVal = ttw_getopt('ttw_stickypost_bgcolor_css')) { t_css_css($sout, '.home .sticky, #entry-author-info', $optVal); } /* ttw_text_color */ if ($textColor = ttw_getopt_newcolor('ttw_text_color')) { t_css_color($sout, '#content h1, #content h2, #content h3, #content h4, #content h5, #content h6', $textColor); t_css_color($sout, 'h1, h2, h3, h4, h5, h6', $textColor); t_css_color($sout, '.page-title', $textColor); t_css_color($sout, '.page-link', $textColor); t_css_color($sout, '#entry-author-info h2', $textColor); t_css_color($sout, 'h3#comments-title, h3#reply-title', $textColor); t_css_color($sout, '.comment-author cite', $textColor); t_css_color($sout, '.entry-content fieldset legend', $textColor); } if ($textColor = ttw_getopt('ttw_text_color_css')) { t_css_css($sout, '#content h1, #content h2, #content h3, #content h4, #content h5, #content h6', $textColor); t_css_css($sout, 'h1, h2, h3, h4, h5, h6', $textColor); t_css_css($sout, '.page-title', $textColor); t_css_css($sout, '.page-link', $textColor); t_css_css($sout, '#entry-author-info h2', $textColor); t_css_css($sout, 'h3#comments-title, h3#reply-title', $textColor); t_css_css($sout, '.comment-author cite', $textColor); t_css_css($sout, '.entry-content fieldset legend', $textColor); } /* ttw_page_title_color - MUST come after ttw_text_color! */ if ($textColor = ttw_getopt_newcolor('ttw_page_title_color')) { t_css_color($sout, '#content .entry-title', $textColor); } else { if ($textColor = ttw_getopt_newcolor('ttw_text_color')) { // this gives backward compatibility pre-1.5 t_css_color($sout, '#content .entry-title', $textColor); } } if ($textColor = ttw_getopt('ttw_page_title_color_css')) { // not pre-1.5, so no worry t_css_css($sout, '#content .entry-title', $textColor); } /* ttw_title_color */ if ($optVal = ttw_getopt_newcolor('ttw_title_color')) { fwrite($sout, sprintf("#site-title a { color: " . $optVal . "; }\n")); } if ($optVal = ttw_getopt('ttw_title_color_css')) { t_css_css($sout, '#site-title', $optVal); } /* ttw_topbottom_bgcolor */ if ($optVal = ttw_getopt('ttw_topbottom_bgcolor')) { t_css_bgcolor($sout, '#ttw-top-widget, #ttw-bot-widget', $optVal, 'padding-left: 10px; padding-top: 10px; margin-bottom: 10px;'); } if ($optVal = ttw_getopt('ttw_topbottom_bgcolor_css')) { t_css_css($sout, '#ttw-top-widget, #ttw-bot-widget', $optVal); } /* ttw_weaver_tables */ $table = ttw_getopt('ttw_weaver_tables'); if ($table == 'Default' || !$table) { // make backward compatible with 1.4 and before when Twenty Ten was default fwrite($sout, sprintf("#content table {border: 1px solid #e7e7e7;margin: 0 -1px 24px 0;text-align: left;width: 100%%;}\n#content tr th,#content thead th {color: #888;font-size: 12px;font-weight: bold;line-height: 18px;padding: 9px 24px;}\n#content tr td {border-style:none; border-top: 1px solid #e7e7e7; padding: 6px 24px;}\n#content tr.odd td {background: #f2f7fc;}\n")); } else { if ($table == 'Bold Headings') { fwrite($sout, sprintf("#content table {border: 2px solid #888;}\n#content tr th, #content thead th {font-weight: bold;}\n#content tr td {border: 1px solid #888;}\n")); } else { if ($table == 'No Borders') { fwrite($sout, sprintf("#content table {border-style:none;}\n#content tr th, #content thead th {font-weight: bold;border-bottom: 1px solid #888;background-color:transparent;}\n#content tr td {border-style:none;}\n")); } else { if ($table == 'Full Width') { fwrite($sout, sprintf("#content table {width:100%%;}\n#content tr th, #content thead th {font-weight:bold;}\n")); } else { // make backward compatible - checked meant Weaver fwrite($sout, sprintf("/* Weaver Tables - use default style.css */\n")); } } } } /* ttw_wide_top_bottom - used by sidebar calcs */ /* ttw_widget_color */ if ($widgetColor = ttw_getopt_newcolor('ttw_widget_color')) { t_css_color($sout, '.widget-area', $widgetColor); } if ($widgetColor = ttw_getopt('ttw_widget_color_css')) { t_css_css($sout, '.widget-area', $widgetColor); } /* ttw_widget_header_underline */ $val = (int) ttw_getopt('ttw_widget_header_underline'); /* bar under widget */ if ($val != '' && $val != 0) { $titleColor = ttw_getopt('ttw_widget_title_color'); fwrite($sout, sprintf(".widget-title {border-bottom: {$val}" . "px solid {$titleColor}; margin-bottom:5px;}\n")); } /* ttw_widget_item_bgcolor */ if ($optVal = ttw_getopt('ttw_widget_item_bgcolor')) { t_css_bgcolor($sout, '.widget-container', $optVal); } if ($optVal = ttw_getopt('ttw_widget_item_bgcolor_css')) { t_css_css($sout, '.widget-container', $optVal); } /* ttw_widget_title_color */ if ($wigtitleColor = ttw_getopt_newcolor('ttw_widget_title_color')) { t_css_color($sout, '.widget-title', $wigtitleColor); t_css_color($sout, '.widget_search label', $wigtitleColor); t_css_color($sout, '#wp-calendar caption', $wigtitleColor); } if ($wigtitleColor = ttw_getopt_newcolor('ttw_widget_title_color_css')) { t_css_css($sout, '.widget-title', $wigtitleColor); t_css_css($sout, '.widget_search label', $wigtitleColor); t_css_css($sout, '#wp-calendar caption', $wigtitleColor); } /* ttw_wlink_color */ /* ttw_wlink_hover_color */ /* ttw_wlink_visited_color */ if ($optVal = ttw_getopt_newcolor('ttw_wlink_color')) { t_css_color($sout, '#primary a:link, #secondary a:link, #altleft a:link, #altright a:link, #footer-widget-area a:link', $optVal); } if ($optVal = ttw_getopt_newcolor('ttw_wlink_hover_color')) { t_css_color($sout, '#primary a:hover, #secondary a:hover, #altleft a:hover, #altright a:hover, #footer-widget-area a:hover', $optVal); } if ($optVal = ttw_getopt_newcolor('ttw_wlink_visited_color')) { t_css_color($sout, '#primary a:visited, #secondary a:visited, #altleft a:visited, #altright a:visited, #footer-widget-area a:visited', $optVal); } if ($optVal = ttw_getopt('ttw_wlink_color_css')) { t_css_css($sout, '#primary a:link, #secondary a:link, #altleft a:link, #altright a:link, #footer-widget-area a:link', $optVal); } if ($optVal = ttw_getopt('ttw_wlink_hover_color_css')) { t_css_css($sout, '#primary a:hover, #secondary a:hover, #altleft a:hover, #altright a:hover, #footer-widget-area a:hover', $optVal); } if ($optVal = ttw_getopt('ttw_wlink_visited_color_css')) { t_css_css($sout, '#primary a:visited, #secondary a:visited, #altleft a:visited, #altright a:visited, #footer-widget-area a:visited', $optVal); } /* ttw_wrap_shadow */ if (ttw_getopt('ttw_wrap_shadow')) { fwrite($sout, sprintf("#wrapper {box-shadow: 0 0 3px 3px rgba(0,0,0,0.25); -webkit-box-shadow: 0 0 3px 3px rgba(0,0,0,0.25); -moz-box-shadow: 0 0 3px 3px rgba(0,0,0,0.25);}\n")); } }